LinkedIn Shares API - Pagination not working properly - api

Shares API call has some issues regarding the records returned with pagination. I passed different numbers as count but it didn't return exact number of records in element attribute.
Eg:
API call with count 10 - returns 10 or less amount of records
API call with count 50 - returns 45 records
API call with count 100 - returns 70 records
API call with count 120 - returns Bad request(400) error
What is the reason for this issue? Is there a maximum limit for count parameter? Could you please assist on this issue?

Related

Getting all the records via api

I have open api mention in link below
https://npiregistry.cms.hhs.gov/registry/help-api
Considering I need to extract all the records for below api query for city= Baltimore
https://npiregistry.cms.hhs.gov/api/?version=2.1&city=baltimore
Using limit and skip
https://npiregistry.cms.hhs.gov/api/?version=2.1&city=baltimore&limit=200&skip=1000
Problem is by using skip and limit,I can get only 1200 records in 6 iteration skipping 0,200,400,600,800 and Max 1000 for each Max limit of 200 as mention in website.
I am sure it has more than 1200 record, Can someone please help me how to get all the data for city= Baltimore .
Thanks in advance.
Create a variable to pass the offset value dynamically in the URL and increment the offset value each time by looping in until activity.
Loop the until activity, until the response of the API request is empty.
Example:
#concat('https://npiregistry.cms.hhs.gov/api/?version=2.1&city=baltimore&limit=200&skip=',variables('skip_value'))
You can also use pagination to provide the offset range. Refer this document for more information.

how i can retrieve 50 records using Tumblr API?

by default Tumblr API retrieve 20 records:
https://api.tumblr.com/v2/tagged?tag=love&api_key=Key
and I want to get 50 records and I have also tried this:
https://api.tumblr.com/v2/tagged?tag=love&limit=50&api_key=Key
but still getting 20 records. anybody tell me how I can get 50 records?
The Tumblr API's /tagged endpoint only allows limits between 1-20 inclusive. If you ask for any other limits, it looks like it defaults to their default value, which in this case is 20.
You could use the oldest retrieved post's timestamp, to then ask for 20 more posts from before-the-oldest-returned-post's-timestamp (since the endpoint supports a before query parameter). That would look something like this:
GET 20 posts
Find the oldest post from the response
GET 20 more posts before that oldest post (something like https://api.tumblr.com/v2/tagged?tag=love&api_key=Key&before=...oldest-post's-timestamp...)
Repeat
But other than that there's no way to bypass their limit.

eBay finding API GET returning few results

I am trying to get the results from the api to match the website and the API is always returning fewer results than displayed on the website. I know of the 30 day limition of the API. Can someone help spot the error in my call?
I am looking for completed listings that have been sold
Returns 0 results:
http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findCompletedItems&SERVICE-VERSION=1.13.0&SECURITY-APPNAME=######&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=mike+trout+2009+auto&paginationInput.entriesPerPage=100&itemFilter(0).name=SoldItemsOnly&itemFilter(0).value=true&sortOrder=EndTimeSoonest
Returns 30 results for within 30 days:
http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&LH_Complete=1&LH_Sold=1&_nkw=mike%20trout%202009%20auto&_pppn=r1&scp=ce0
Returns 1 result:
http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findCompletedItems&SERVICE-VERSION=1.13.0&SECURITY-APPNAME=######&RESPONSE-DATA-FORMAT=XML&REST-PAYLOAD&keywords=2011+bryce+harper+autograph&paginationInput.entriesPerPage=100&itemFilter(0).name=SoldItemsOnly&itemFilter(0).value=true&sortOrder=EndTimeSoonest
Returns 52 results:
http://www.ebay.com/sch/i.html?_from=R40&_sacat=0&LH_Complete=1&LH_Sold=1&_nkw=2011%20bryce%20harper%20autograph&_pppn=r1&scp=ce0
It turns out that lots of users are reporting the same issue, so it is a eBay fault. Thanks for looking!
https://forums.developer.ebay.com/questions/18851/is-anyone-else-having-problems-with-their-findcomp.html?page=3&pageSize=10&sort=votes

Foursquare users/self endpoint returning incorrect friends count

Currently the user/self returns a friends block for my account with a count of 10, while the users/self/friends returns a count of 65.
Typically the "count" value represents the total number of elements in the set not just the number of elements returned. Is this a known issue?
This bug has been resolved by the foursquare api team.

Google Web Search API returns only the first 100 result set

Is there a way to search and retrieve all results for a particular query in Google? I want to use Custom Search API, but the starting index of the result set can be 99 at most (http://code.google.com/apis/customsearch/v1/using_rest.html) Which means I can retrieve only the first 100 items. In my case, there are around 4000 items in the result set.
Thanks.
You can retrieve about 1000 results: 100 pages with 10 results each. See: http://code.google.com/apis/customsearch/v1/using_rest.html#query-params
It seems as if you can't go beyond that, though.
UPDATE: I stand corrected. It's only 100.
BTW - The new Google API can return more than 10 results per page, limited by 20 results per page, using num=20
http://www.google.com/cse/docs/resultsxml.html