eBay Ranking Search
ebay.search.placements
See the order listings appear in for a search, and which of them are promoted.
At a glance
- Endpoint ID
ebay.search.placements- Price
- 1.5–5 credits per call; failed calls are free
- Runs for up to
- 180 seconds
Request
Send the endpoint ID as capability and its fields as input. Set UPSCRAPE_API_KEY to your key first.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "ebay.search.placements", "input": { "limit": 60, "page": 1, "query": "used laptop" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "ebay.search.placements", "input": { "limit": 60, "page": 1, "query": "used laptop" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "ebay.search.placements", "input": { "limit": 60, "page": 1, "query": "used laptop" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
Input
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
query |
string | yes | Search query. | used laptop |
limit |
integer | no | Maximum number of results to return. Allowed values: 60, 120, 240. |
60 |
page |
integer | no | One-based result page to fetch. From 1 to 100. | 1 |
Response
A finished call answers with HTTP 200; the data is in results[0].data, and billing.credits_charged is what it cost. A call still running after the wait answers 202: see jobs and results.
This is results[0].data from a real run:
{ "placements": [ { "item_id": "286865561827", "leaf_category": "177", "promoted": true, "rank": 0, "variant_id": "588893894930" }, { "item_id": "286601719329", "leaf_category": "177", "promoted": true, "rank": 1, "variant_id": "588649223901" } ]}
Fields
| Field | Type | What it is | Example |
|---|---|---|---|
placements[].item_id |
string | eBay's ID for the listing. | 286865561827 |
placements[].leaf_category |
string | eBay's ID for the listing's most specific category. | 177 |
placements[].promoted |
boolean | Whether the listing is a paid placement. | true |
placements[].rank |
integer | The listing's place in the results, starting at 0. | 0 |
placements[].variant_id |
string | eBay's ID for the listing variant. | 588893894930 |
placements |
array | The promotion slots on the page. | 3 records |
If a call fails
A failed call costs nothing. The response carries an error.code you can branch on; Errors and retries lists every code and which ones to retry.
Other eBay endpoints
ebay.categories.listCategoriesebay.deals.listDealsebay.item.deferred_promotionsAdditional item recommendationsebay.item.promotionsItem recommendationsebay.product.detail.getItemebay.product.reviews.listProduct reviewsebay.products.searchListings searchebay.search.promotionsPromotions searchebay.seller.feedback.listSeller feedbackebay.store.getStoreebay.store.items.listStore items
Something missing or unclear? Ask the team that builds the eBay endpoints.