Fishbase-API get-query - api

I would like to use the Fishbase-API in my app.
https://fishbase.ropensci.org/
here is the README for the API...
https://fishbaseapi.readme.io/reference/getting-started
But I don't know how to create a correct query to search for certain “common names” (comnames) and get a list of results?
Thanks a lot!

Related

The first result in Google is not my homepage

When you type hackisition on Google, it returns the following url as first result:
https://www.hackisition.com/en/
// instead of
https://www.hackisition.com/
I'd like to replace that link by the real homepage. How can I do that? Is there a way to specifically ask Google to show this homepage?
I am getting "https://www.hackisition.com/" as first result for "hackisition". I'm not sure why you're getting such result. Try to clear cookies and turn off VPN/Proxy if you're using one.
We are getting result as you said , so I suggest to clear cache
Maybe that is because of User location.
That mean countries preferred English on search would be able to see /en
and other countries that not prefer English will see the non /en result.
Search your website on
Google.ae
Google.DK
you'll see https://www.hackisition.com in result not https://www.hackisition.com/en.
But if you search in Google.com, Google.eu you'll see the result https://www.hackisition.com/en
Hope this would be the solution of your problem.

How to specify multiple values on siteSearch in google custom search api?

I'm using the google custom search api and want to create a search using the siteSearch:
https://www.googleapis.com/customsearch/v1?key=k&cx=cx&q=cocos2d&siteSearch=www.cocos2d-iphone.org&siteSearchFilter=i
and it works fine (returns all the result only from the given site).
Then I want to specify TWO sites to search so I tried to change the :
siteSearch=www.cocos2d-iphone.org
to
siteSearch=www.cocos2d-iphone.org www.XXXXXXXX.org
siteSearch=www.cocos2d-iphone.org|www.XXXXXXXX.org
siteSearch=www.cocos2d-iphone.org||www.XXXXXXXX.org
but none of these works.
hope someone can help here, thanks:)
Currently I don't believe you can specify more site through the query param siteSearch.
nevertheless you can configure your Custom Search Engine here: https://www.google.com/cse/manage/all
in the "Site to search" area.
This also works for excluding, as you can read here: https://support.google.com/customsearch/bin/answer.py?hl=en&answer=2631038&topic=2601037&ctx=topic
You cannot do this with the as_sitesearch parameter as that only accepts a single value. But you can achieve what you want with the as_q parameter, setting it to some value like: "site:google.com OR site:microsoft.com" - that will work in a similar way to this search.
The as_q parameter is documented here as:
The as_q parameter provides search terms to check for in a document.
This parameter is also commonly used to allow users to specify
additional terms to search for within a set of search results.
Examples q=president&as_q=John+Adams
Use "space" as seperator
Below is sample PHP code which works for me
$url="https://www.googleapis.com/customsearch/v1?key=k&cx=cx&q=cocos2d&siteSearch=".urlencode("www.cocos2d-iphone.org www.XXXXXXXX.org")."&siteSearchFilter=i"
Thanks,
Ojal Suthar

Disqus API: get total forum number of comments/posts

I'm trying to get the total number of comments that have been written in a given forum.
Looking at http://disqus.com/api/docs/ I can't see anything like this. Honestly, it sounds weird.
Forum details ( http://disqus.com/api/docs/forums/details/ ) shows anything but.
Any hack/piece of code/hidden API call that would to the trick?
Thanks in advance
The best way I have found is to get the list of all the threads and then sum the number of posts for each one:
curl -0 -L "https://disqus.com/api/3.0/forums/listThreads.json?api_key=YOUR_API_KEY&forum=YOUR_FORUM_NAME&limit=100"
Dont forget to iterate over different pages of results if you get a 'next' cursor (response['cursor']['next']).
See this gist for a full JavaScript example (intended to run on Google Script):
https://gist.github.com/sarfata/5068200

google analytics API, how to extract pageviews for a specific page?

Google Analytics API: how to extract pageviews for a specific page?
I tried using something like
ga:pagePath=~page.php%3fid%3d44 (page.php?id=44)
but it doesn't seem to work... I get "no results found" where I have 20 pageviews for sure
UPDATE
I think I found the solution
ga:pagePath==/website/page.php?id=44
for some reason I had to include the complete path and ==
To use a partial path to match for a page in filters you should use
ga:pagePath=#page.php?id=44
=# tells ga to match a substring.
What you were originally using was incorrect for this.
I think your problem is that you put the hex version of the ? and = characters into your query, which doesn't match how Analytics stores the page paths. If you change these to the normal characters it should work:
ga:pagePath=~page.php?id=44
Your other solution should work as well but is a bit more inflexible in case you wanted to tweak the query to return other pages.

Google Custom Search API, Howto return country specific results only

I am making some PHP code which takes a given search phrase and url and searches through the google search results until it finds the url (only first 100 results). My problem is, this is only working for the US. I have tried adding the "&cr=" option, but it still on returns US results.
The full URL I am using for the request is:
https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=CX_VALUE&q=KEYWORD&cr=COUNTRY&alt=JSON
Does anyone have any experience with this? I want to be able to see UK results. Tried inserting &cr=countryUK , but still only does US results.
Thanks :)
Regards,
Stian
Use the gl=<country code> param to limit it to your country of choice (so gl=gb for the uk).
More info here:
http://googleajaxsearchapi.blogspot.com/2009/10/web-search-in-your-country.html