Last active
February 19, 2024 03:06
-
-
Save davidtsadler/6993747 to your computer and use it in GitHub Desktop.
A very simple example showing how to make an eBay Finding API request with the ebaysdk-python (https://github.com/timotheus/ebaysdk-python). The example will do a keyword search for 'laptops' across the UK eBay site and restrict the search to the two categories Apple Laptops(111422) and PC Laptops & Netbooks(177). In addition the results are fil…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ebaysdk | |
from ebaysdk import finding | |
api = finding(siteid='EBAY-GB', appid='<REPLACE WITH YOUR OWN APPID>') | |
api.execute('findItemsAdvanced', { | |
'keywords': 'laptop', | |
'categoryId' : ['177', '111422'], | |
'itemFilter': [ | |
{'name': 'Condition', 'value': 'Used'}, | |
{'name': 'MinPrice', 'value': '200', 'paramName': 'Currency', 'paramValue': 'GBP'}, | |
{'name': 'MaxPrice', 'value': '400', 'paramName': 'Currency', 'paramValue': 'GBP'} | |
], | |
'paginationInput': { | |
'entriesPerPage': '25', | |
'pageNumber': '1' | |
}, | |
'sortOrder': 'CurrentPriceHighest' | |
}) | |
dictstr = api.response_dict() | |
for item in dictstr['searchResult']['item']: | |
print "ItemID: %s" % item['itemId'].value | |
print "Title: %s" % item['title'].value | |
print "CategoryID: %s" % item['primaryCategory']['categoryId'].value |
Dhairya40
commented
Jun 12, 2020
via email
Thanks Brian Caudill, have you any project for me ? I'm a PHP & Python
developer. I work on PHP Framework like Codeignitet, Laravel etc. And
python framework Django Also. So if you have a project for me let me know
please.
Thanks
Dheerendra Yadav
PHP & PYTHON Developer
…On Tue, Jun 9, 2020 at 10:23 PM Brian Caudill ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
#This file contains all the above fixes and is working for me as of
09-June-2020
import ebaysdk
from ebaysdk.finding import Connection as finding
api = finding(domain='svcs.sandbox.ebay.com', debug=True,
appid='YOUR_APP_ID', config_file=None)
api.execute('findItemsAdvanced', {
'keywords': 'laptop',
'categoryId' : ['177', '111422'],
'itemFilter': [
{'name': 'Condition', 'value': 'Used'},
{'name': 'MinPrice', 'value': '200', 'paramName': 'Currency',
'paramValue': 'GBP'},
{'name': 'MaxPrice', 'value': '400', 'paramName': 'Currency',
'paramValue': 'GBP'}
],
'paginationInput': {
'entriesPerPage': '25',
'pageNumber': '1'
},
'sortOrder': 'CurrentPriceHighest'
})
dictstr = api.response.dict()
for item in dictstr['searchResult']['item']:
print("ItemID: %s" % item['itemId'])
print("Title: %s" % item['title'])
print("CategoryID: %s" % item['primaryCategory']['categoryId'])
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/6993747#gistcomment-3335991>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANXNKE7K36UWCML36ZCHLHLRVZSHJANCNFSM4IKQCB3Q>
.
How to filter out sellers you don't like?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment