Browse API not returning expected amount of results, but Finding API does - ebay-api

I am trying to retrieve cars from Ebay GB's Cars category 9801. After testing the Browse API endpoint using Postman, I was unable to retain the results I expected. Please see below for details:
Using the Browse API for search for "Land Rover Range Rover Evoque" using the q param:
URL: https://api.ebay.com/buy/browse/v1/item_summary/search?q=Land%20Rover%20Range%20Rover%20Evoque&category_ids=9801&limit=100
Total Results: 17
Using the Browse API for search for "Land Rover Range Rover Evoque" using aspect filters:
URL: https://api.ebay.com/buy/browse/v1/item_summary/search?aspect_filter=categoryId%3A9801%2CManufacturer%3A%7BLand%20Rover%7D%2CModel%3A%7BRange%20Rover%20Evoque%7D&limit=100&category_ids=9801
Total Results: 15
Using the Traditional API - findItemsAdvanced
URL: https://svcs.ebay.com/services/search/FindingService/v1?SERVICE-VERSION=1.0.0&SECURITY-APPNAME=xxxxxxxxxx&RESPONSE-DATA-FORMAT=JSON&REST-PAYLOAD&categoryId=9801&paginationInput.entriesPerPage=100&GLOBAL-ID=EBAY-GB&OPERATION-NAME=findItemsAdvanced&aspectFilter(0).aspectName=Manufacturer&aspectFilter(0).aspectValueName=Land%20Rover&aspectFilter(1).aspectName=Model&aspectFilter(1).aspectValueName=Range Rover Evoque
Total Results: 100
As you can see from our above experiments, the Browse API does not return anywhere near the expected results.
I would really like to use the Browse API over the Traditional Finding API, anybody else have this issue or see something wrong with my Browse URL's?
Another note: Can I return ItemSpecifics (e.g. car mileage and colour) with this endpoint or do I have to use the Shopping API and use GetMultipleItems using the Product IDs?
Thanks in advance

Related

ebay finding api finditemsbykeywords pagination problem

I tried the following calls:
https://svcs.ebay.com/services/search/FindingService/v1?X-EBAY-SOA-OPERATION-NAME=findItemsByKeywords&SERVICE-VERSION=1.13.0&keywords=waschbecken&RESPONSE-DATA-FORMAT=JSON&GLOBAL-ID=EBAY-DE&outputSelector(0)=ItemSpecifics&paginationInput.entriesPerPage=100&paginationInput.pageNumber=2
then on the ebay API explorer for the post request body,
<findItemsByKeywordsRequest xmlns="http://www.ebay.com/marketplace/search/v1/services">
<keywords>waschbecken</keywords>
<paginationInput>
<entriesPerPage>100</entriesPerPage>
<pageNumber>2</pageNumber>
</paginationInput>
</findItemsByKeywordsRequest>
but I do not get 100 searchResult count per page, in Postman I get 32 searchResult and in API explorer 56; furthermore 2nd page forward I do not get any searchResult count, I am trying to understand is there something wrong that I am writing in the call or there is some another problem or any parameter I am missing.
Thanks for the help.
I am also running into this problem. I am guessing that the pagination results are for the entire store, but not for the search by keywords....Seems like they dropped the ball on this.
Sorry, I did not update on the question, I forgot about it.
The problem was not with the pagination, the problem is the variants.
Simply explained, the output of the query doesn't count for the variants listed on the Ebay search by the same seller. If you have from a same seller the same product with the different variant, the query does not show the variants from those product from the same seller just different variant, as it would if you do an ebay search.
The mechanism of the query is different as that of the product search on Ebay.

How to get with Mediawiki API all images in a category which are not in another one?

I am entirely new to API, so sorry if the question is silly.
I would like to get all images in a category in Commons let's say X, but exclude those which are also in another one (Y). I do not understand if I can actually do this.
https://commons.wikimedia.org/w/api.php?action=query&list=categorymembers&cmtype=file&cmtitle=Category:X
will get all of them, how to exclude some?
moreover I would like in the result to have the description of the images, not just the name of the file, is that possible?
MediaWiki has - by default - no built-in support for category building and querying intersections. To accomplish this task, extensions or external tools or multiple API queries and result processing is required.
CirrusSearch API
On Wikimedia Commons, like on the whole Wikimedia Wiki farm, CirrusSearch powers filtered search, including search for category intersections and is also available through API (action=query&list=search&srsearch=incategory:A+-incategory:B, this is Category:A minus Category:B).
FastCCI
One of the tools I can recommend (because it's a dedicated high-performance solution and actually running) is fastcci, developed by Daniel Schwen; specifically for Wikimedia Commons, there is already a database maintained and a webservice running but it's possible to set it up for any wiki, provided the tool set has a host to run on and has database access.
Query
Consider the following query URL:
https://fastcci.wmflabs.org/?c1=3302993&c2=15516712&d1=0&d2=0&s=200&a=not&t=js
https://fastcci.wmflabs.org/ - Host Wikimedia Commons fastcci runs on
c1 - ID of category 1
c2 - ID of category 2
d1 - depth of category 1 to search in (fastcci by default considers sub-categories)
d2 - depth of category 2 to search in (fastcci by default considers sub-categories)
s - Number or results to return
o - Offset
a - conjunction
t - connection type (t=js for a JSONP response; otherwise assumes being used as websocket)
Response
fastcciCallback( [ 'RESULT 27572680,0,0|1675043,0,0|27577015,0,0|27577043,0,0|27577106,0,0|27576896,0,0|27576790,0,0|23481936,0,0|17560964,0,0|11009066,0,0', 'OUTOF 10', 'DBAGE 378310', 'DONE'] );
RESULT followed by a | separated list of up to 50 integer triplets of the form pageId,depth,tag. Each triplet stands for one image or category
Resources
Sample client side implementation - to see it in action, just visit any category and next to the Good pictures button in any category page.
Example is FilesOf('Category:Saaleck') - FilesOf('Category:Rapeseed fields in Saxony-Anhalt')
Server application
Presentation on YouTube
Slides
A note on pageIDs
page IDs → page titles: GET /w/api.php?action=query&pageids=page_IDs_separated_by_pipe
page titles → page IDs: GET /w/api.php?action=query&titles=Titles_separated_by_pipe
AFAIK, there is no way to get that directly using the API. But, assuming both categories are reasonably small, you could get all images from both of them and then compute the complement in your code.
To retrieve the description, you can use prop=imageinfo&iiprop=extmetadata&iiextmetadatafilter=ImageDescription.
In the context of your example query, it would look like this:
https://commons.wikimedia.org/w/api.php?action=query&generator=categorymembers&gcmtype=file&gcmtitle=Category:X&prop=imageinfo&iiprop=extmetadata&iiextmetadatafilter=ImageDescription

Is there a limit to start option in google custom api CSE list?

using google custom API, I have a problem when I try to get results of more than 100.
I got an error as shown below. The code I am using is below:
res = service.cse().list(
q='lectures',
cx='my custom search engine id',
num=10,
start=100,
).execute()
I want to extract several pages every day.I got this error.
HttpError 400 when requesting .. "Invalid Value">
if I make the start=90 or less it works!
From the documentation for the Google Custom Search API:
https://developers.google.com/custom-search/v1/using_rest
This role is not present if the current results are the last page.
Note: This API returns up to the first 100 results only.

REST API Explore: How to get same list ordered like the search on Foursquare Website?

I'm using the REST API (venues platform) to get a list of the top 5 venues per destination and category, like they are listed in the search results on the foursquare website.
For example i do the following request using the explore api endpoint:
https://api.foursquare.com/v2/venues/explore?near=zurich,CH&query=College %26 University
I'm using the apias a not authenticated. I do not pass a radius, to get the default radius.
Now the results from the api is as follows:
1. ETH Hönggerberg HIL
2. Technopark
3. Kantonsschule Stadelhofen
4. Zürcher Hochschule der Künste, Departement Musik
5. Klubschule Migros
When i search on the Foursquare Website as follow (not logged in!):
https://foursquare.com/explore?near=Zurich%2C%20CH&q=College%20%26%20University
I get the following results listed on the website:
1. SBB Digital
2. Technopark
3. ETH Hönggerberg HIL
4. EF Education First
5. Klubschule Migros
Is it possible to get the same list, as shown on the website (in the same order) also from the api? If yes? how can i do that? how do i call the api or how do i have to sort the results from the api to get the same list?
First i tried to sort the api results by the rating field, but that doesn't do the trick at all. Because in this example no one of the first 30 results does have any rating.
Thank you in advance for your help!
Greets
Tom
Make sure you are making the explore request with the same user account as on the web. Also, it looks like your queries do not match up exactly. One is "College & University and the other is "college" - try matching up the queries and seeing if the results change.
Well meanwhile i got the answer from foursquare.
The trick is very simple: just have to add the following parameters to the api call: time=any and day=any.
Then you get the results ordered exactly the same way as on the foursquare webpage (when not authenticated).
Thank you david from foursquare! :-)

Google custom search REST number of results (num field)

I'm trying to figure out how to force google custom search to give me back 20 results per page.
I've tried to send this REST request configuring my new Custom Search Engine to:
Standard edition: Free, ads are required on results pages.
https://www.googleapis.com/customsearch/v1?key=AIzaSyCgGuZie_Xo-hOECNXOTKp5Yk7deryqro8&cx=015864032944730029962:5ipe0q27hgy&q=test&alt=json&num=20
IT NOT WORKS!
but
https://www.googleapis.com/customsearch/v1?key=AIzaSyCgGuZie_Xo-hOECNXOTKp5Yk7deryqro8&cx=015864032944730029962:5ipe0q27hgy&q=test&alt=json&num=10
IT WORKS!
But reading documentation at
https://developers.google.com/custom-search/docs/xml_results#numsp
it says that:
Optional. The num parameter identifies the number of search results to return.
The default num value is 10, and the maximum value is 20. If you request more than 20 results, only 20 results will be returned.
Note: If the total number of search results is less than the requested number of results, all available search results will be returned.
Someone has experienced this problem?
PS: I've tried also to send that REST request configuring my new Custom Search Engine to:
Site Search: Starts at $100 per year, ads are optional on results pages.
But nothing has changed no way to obtain 20 results in a request/page
This documentation url has descriptions of each parameter. It also says num is restricted to integers between 1 and 10, inclusive.
https://developers.google.com/custom-search/v1/using_rest#query-params