0

I'm trying to query eBay (UK) using the ebaysdk (eBay developers program) in python. Even with few item filters and broad keywords (see the code I tried below), I get 'ResponseDataObject' object has no attribute 'item' because there were no items returned. If I go to "ebay.co.uk" in the browser I can find multiple pages of results.

From examples and their API documentation (which I find extremely confusing) I have tried this basic example using their finding API:

from ebaysdk.finding import Connection

api = Connection(
    siteid='EBAY-GB',
    domain='svcs.sandbox.ebay.com',
    appid='my_real_app_id_is_here',
    config_file=None)

request = {
    'keywords': "iPhone",
    'itemFilter': [
        {'name': 'Condition', 'value': 'Used'},
    ]
}
response = api.execute('findItemsByKeywords', request)

if response.reply.ack == 'Success':
    for item in response.reply.searchResult.item:
        print(f"""
            Title: {item.title}\n
            Price: {item.sellingStatus.currentPrice.value} {item.sellingStatus.currentPrice.currencyId}\n
            Location: {item.location}\n
            Thumbnail: {item.galleryURL}\n"""
              )

With some very specific keywords I can find some results on 'EBAY-US'. I have also tried other item filters and the API "findItemsAdvanced" API call. Am I doing something wrong or missing something? Why am I receiving no items in the response?

samjarvis
  • 13
  • 3

1 Answers1

1

It seems to work as expected when using the production app ID and domain ("svcs.ebay.com") instead of the sandbox app ID and domain ("svcs.sandbox.ebay.com"). Hope this helps someone at some point in time.

samjarvis
  • 13
  • 3
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – xlmaster Feb 25 '23 at 12:41