question

lord_juju avatar image
0 Likes"
lord_juju asked

browse items in the UK on ebay motors

I can successfully find US motors

for example this works fine

https://api.ebay.com/buy/browse/v1/item_summary/search?q=kawasaki&limit=2&category_ids=6024&filter=itemLocationCountry%3AUS&sort=newlyListed&offset= 0

However, as soon as I look for items in the UK (the only change is the itemLocationCountry) I get no results - this returns nothing

https://api.ebay.com/buy/browse/v1/item_summary/search?q=kawasaki&limit=2&category_ids=6024&filter=itemLocationCountry%3AGB&sort=newlyListed&offset=0

Why is this? Are category numbers different for US and UK motorbikes? if so how do I find the UK category numbers? thanks

ebay motorsitemlocationcountry
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered

Hi @lord_juju,

For getting the all of the latest and supported category hierarchy for a eBay marketplace, please follow the steps mentioned below:

1. Firstly, you need to call GetDefaultCategoryTreeId to retrieve a reference to the default category tree associated with the specified eBay marketplace ID.

Ref:https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getDefaultCategoryTreeId

2. After getting the category_tree_id make a GetCategoryTree call to retrieve the complete category tree that is identified by the category_tree_id parameter.

Ref: https://developer.ebay.com/api-docs/commerce/taxonomy/resources/category_tree/methods/getCategoryTree

To learn more about the category tree structure, please take an overview of the Taxonomy API by going through the link given below:

Ref: https://developer.ebay.com/api-docs/commerce/taxonomy/static/overview.html

Best regards ,
eBay Developer Support

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

alvisinwales avatar image
0 Likes"
alvisinwales answered

Are you sure you're not getting a warning for category 6024? This cat does not exist - the top level cat for Cars,Motorcyles... is 9800. This is the same for US & UK.


I'm in the UK and I set the header X-EBAY-C-MARKETPLACE-ID: EBAY_GB - not sure if this is necessary.

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

lord_juju avatar image
0 Likes"
lord_juju answered

thanks for your reply, but this does not work for me

I have tried every permutation and combination of category and header I can find

using header X-EBAY-C-MARKETPLACE-ID: EBAY_GB

category 9800 returns an errorid 12009 The 'category_ids' query parameter is invalid

same for category 422 (motorcycles)

it works for other categories though (e.g. 10063 motorcycle parts - returns lots of items)

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

alvisinwales avatar image
0 Likes"
alvisinwales answered

Well after some experimenting I'm none the wiser. If it's any help here's the CURL command I sent:


C:\curl.exe -g -k -X GET

"https://api.ebay.com/buy/browse/v1/item_summary/search?

q=kawasaki

&category_ids=9800

&limit=2

&offset=0

&filter=itemLocationCountry:GB

&sort=newlyListed"

-H "X-EBAY-C-MARKETPLACE-ID: EBAY_GB"

-H "Authorization: Bearer v^1...QAA"

-i -o "C:\TEMPCURLOUT.txt"

and this is part of the response:


{"href":"https://api.ebay.com/buy/browse/v1/item_summary/search?q=kawasaki&limit=2&category_ids=9800&filter=itemLocationCountry%3AGB&sort=newlyListed&offset=0","total":69,"next":"https://api.ebay.com/buy/browse/v1/item_summary/search?q=kawasaki&limit=2&category_ids=9800&filter=itemLocationCountry%3AGB&sort=newlyListed&offset=2","limit":2,"offset":0,"itemSummaries":[{"itemId":"v1|393273800737|0","title":"kawasaki zx10r 2006","image":{"imageUrl":"https://i.ebayimg.com/thumbs/images/g/chMAAOSw0iFgXc7d/s-l225.jpg"},"price":{"value":"4000.00","currency":"GBP"},"itemHref":"https://api.ebay.com/buy/browse/v1/item/v1%7C393273800737%7C0","seller":...


I was debating whether or not to url encode the colon in itemLocationCountry:GB but I didn't.


10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sagar_developersupport avatar image
0 Likes"
sagar_developersupport answered

Hi @lord_juju ,

Please make sure you are making GetCategoryTree call with the following request URL:

https://api.ebay.com/commerce/taxonomy/v1/category_tree/100

After getting the complete category tree, please set X-EBAY-C-MARKETPLACE-ID header to EBAY_MOTORS_US and try again execute browse.Search call.

Best regards ,
eBay Developer Support

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.