eBay Search API
The eBay Search API endpoint will retrieve products for a specified search term from an eBay search page and transform it into usable JSON.
curl --request GET \
--url "https://api.scraperapi.com/structured/ebay/search/v2?\
api_key=API_KEY&query=QUERY&country_code=COUNTRY_CODE&tld=TLD"import requests
payload = {
'api_key': 'APIKEY',
'query': 'QUERY',
'country_code': 'COUNTRY_CODE',
'tld': 'TLD'
}
r = requests.get('https://api.scraperapi.com/structured/ebay/search/v2',params=payload)
print(r.text)import fetch from 'node-fetch';
fetch(`https://api.scraperapi.com/structured/ebay/search/v2?api_key=API_KEY&query=QUERY&country_code=COUNTRY_CODE&tld=TLD`)
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});Supported Parameters
API_KEY (required)
Your API Key.
QUERY (required)
Search query. Example: iPhone
TLD
Top-level Ebay domain to scrape. This is an optional argument and defaults to “com” (ebay.com). Valid values include:
com (ebay.com)
co.uk (ebay.co.uk)
com.au (ebay.com.au)
de (ebay.de)
ca (ebay.ca)
fr (ebay.fr)
it (ebay.it)
es (ebay.es)
at (ebay.at)
ch (ebay.ch)
com.sg (ebay.com.sg)
com.my (ebay.com.my)
ph (ebay.ph)
ie (ebay.ie)
pl (ebay.pl)
nl (ebay.nl)
COUNTRY_CODE
country_code influences the language and the currency of the page. The TLD should be set to ‘com’ if you are using languages that are not used by the TLDs listed above.
OUTPUT_FORMAT
For structured data methods we offer CSV and JSON output. JSON is default if parameter is not added. Options:
csv
json (default)
SORT_BY
Instructs the API to sort the results. Supported values:
ending_soonest newly_listed price_lowest price_highest distance_nearest best_match
PAGE
Page number
ITEMS_PER_PAGE
Number of items returned. Supported values: 60, 120, 240
SELLER_ID
The ‘name’ of the seller. This is a textual id, for example ‘gadget-solutions’
Filter options
CONDITON
Condition of the products. Supported values:
'new', 'used', 'open_box', 'refurbished', 'for_parts', 'not_working’ Note: These categories don’t have the same name for all products.
For example open_box is sometimes called ‘without tag’ on the eBay results page. Please ensure that you are always using the values from the supported list when sending request to the API.
Note2: Multiple options can be used here. So if you want to search for new and open_box products you can use the query param:
’used,open_box’ in an URL encoded form like
&condition=used%2Copen_box
BUYING_FORMAT
Buying format. Supported values:
buy_it_now
auction
accepts_offers
Note: You can specify multiple options just as with the condition parameter.
SHOW_ONLY
Additional filters for search. Supported values:
returns_accepted authorized_seller completed_items sold_items sale_items listed_as_lots search_in_description benefits_charity authenticity_guarantee Note: Multiple options can be used here. So if you want to search for a product where returns are accepted and it’s from an authorized seller the query param: ’returns_accepted,authorized_seller’ in an URL encoded form like &show_only=returns_accepted%2Cauthorized_seller
Sample Response
Last updated

