Question by champton78 · Feb 13, 2017 at 06:47 PM · api-problemsdk-apipython
ebaysdk: findCompletedListing does not return consistent results
I'm new to the eBay API, but I'm trying to use it to look at completed auctions. I found the Python package ebaysdk and have the most recent version installed and working. However, if I run the query and get back the results, and then run it immediately again, same parameters and everything, I get back completely different results. Also, the first time I run it, I do get back some auctions where the item has sold, but on repeated attempts, I am only getting items that did not sell.
My implementation follows the author's examples that I've seen on GitHub. The only difference that I made was to automatically iterate through the page numbers to get additional results before the first page.
I'm not sure what the issue is, but hopefully someone here does. Small changes between results are understandable, but I can't see to understand why I'm getting COMPLETELY different results running the exact same query multiple times.
from ebaysdk.finding import Connection as Finding
from ebaysdk.exception import ConnectionError
# define eBay API credentials
sandbox_id = '123456789'
prod_id = '123456789'
# test API in sandbox
api = Finding(domain='svcs.sandbox.ebay.com', appid=sandbox_id, config_file=None)
response = api.execute('findCompletedItems', {'categoryId': '6161'})
pprint(response.dict())
# query the API and store results
results = []
page_num = 1
while True:
try:
api = Finding(appid=prod_id, config_file=None)
response = api.execute('findCompletedItems', {'categoryId': '6161', 'paginationInput': {'pageNumber': page_num}})
r = response.dict()
if r['ack'] == "Success":
results.append(r)
else:
print(r)
break
except ConnectionError as e:
print(e)
print(e.r)
break
Answer by clickimusprime · Feb 13, 2017 at 08:25 PM
There are two open threads on this on the front page of this forum.
People who like this
Answer by champton78 · Feb 13, 2017 at 08:38 PM
Thanks for your response. I've seen the other threads, but considering this is my first time interacting with an eBay API, I was hesistant to believe my problem wasn't related to something I was doing wrong. I'll keep an eye on the other threads and hopefully it gets sorted out soon.
People who like this
Answer by catherine_developersupport · Feb 15, 2017 at 12:20 PM
@champton78, As clickimusprime mentioned, there is currently a bug with findCompletedItems, although I am not sure if this is directly related to the issue you are seeing. Once that bug is fix, please try run again and report back if the issue still exist. Thanks
People who like this
Your answer

Follow this Question
Related Questions
Pagination filters not working in Python EbaySDK 3 Answers
findItemsAdvanced no longer working with existing code 1 Answer
Aspect Filters Not Effective With Multi-Listings 3 Answers
is the search on ebay and item_summary/search different? 4 Answers
findcompletedlistings returns less results than website 1 Answer