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?