Skip to Content
Pagination past 240
Open in ChatGPTOpen in ClaudeUpdated November 29, 2026

Pagination past 240 sales

One request returns up to 240 eBay sales. For more, ask for the next page: page=2 returns sales 241 to 480, page=3 returns 481 to 720, and so on, while hasNextPage is true. Each page is one request, and a page that fails or comes back past the end is never counted.

curl -G "https://api.sellercomps.com/scrape" \ --data-urlencode "keyword=nintendo switch oled" \ --data-urlencode "page=2" \ -H "Authorization: Bearer YOUR_API_KEY"

How it works on eBay

Field or parameterMeaning
page1 (default) to 100
countSales per page, 1 to 240. Keep it the same on every page of one search
hasNextPagetrue when eBay has another page for the search
totalResultseBay’s estimate of the matching sales; it can be higher than what pages reach

A page past the last one answers 404 not_found and is not counted, so a loop that stops on hasNextPage: false or on a 404 never pays for an empty page. eBay serves at most about 10,000 results for one search; to reach further, split the search with a price band (minPrice, maxPrice), a date range (soldAfter, soldBefore), a condition or a category, and page each part.

A complete loop

Python

import time, requests API = "https://api.sellercomps.com/scrape" HEADERS = {"Authorization": "Bearer YOUR_API_KEY"} def all_sales(keyword, max_pages=5, **params): sales = [] for page in range(1, max_pages + 1): r = requests.get(API, params={"keyword": keyword, "page": page, **params}, headers=HEADERS, timeout=90) if r.status_code == 404: # past the last page, not counted break if r.status_code in (429, 502, 503, 504): time.sleep(int(r.headers.get("Retry-After", 5))) continue # the failed page was free; try the next one or rerun r.raise_for_status() data = r.json() sales += data["results"] if not data["hasNextPage"]: break return sales rows = all_sales("nintendo switch oled", max_pages=3, itemCondition="used") print(len(rows), "sales")

Node

async function allSales(keyword, maxPages = 5, extra = {}) { const sales = []; for (let page = 1; page <= maxPages; page++) { const url = new URL("https://api.sellercomps.com/scrape"); url.search = new URLSearchParams({ keyword, page: String(page), ...extra }).toString(); const res = await fetch(url, { headers: { Authorization: "Bearer YOUR_API_KEY" } }); if (res.status === 404) break; // past the last page, not counted if (!res.ok) throw new Error(`${res.status} ${await res.text()}`); const data = await res.json(); sales.push(...data.results); if (!data.hasNextPage) break; } return sales; } console.log((await allSales("nintendo switch oled", 3)).length, "sales");

cURL

for page in 1 2 3; do curl -sG "https://api.sellercomps.com/scrape" \ --data-urlencode "keyword=nintendo switch oled" \ --data-urlencode "page=$page" \ -H "Authorization: Bearer YOUR_API_KEY" > "sales-page-$page.json" done

Every endpoint’s paging

EndpointHow to pagePage size
/scrape (eBay sold and active)page 1 to 100 while hasNextPageUp to 240
/sold, /active (shared format)The marketplace’s own way, below; page and hasNextPage are in every answerThe marketplace’s
/history (3 years)page 1 to 200; follow nextPage until it is null10, 20 or 50
/tcgplayer/soldOne answer with up to 250 sales, use soldAfter for new onesUp to 250
/tcgplayer/listingspage 1 to 50Up to 50
/psa/search, /psa/setspage while hasNextPageUp to 20 / 100
/stockx/searchpage 1 to 2540
/goat/searchpage 1 to 50Up to 100
/mercaripage 1 to 100Up to 100
/poshmark/sold, /poshmark/listingspage 1 to 10048
/grailed/sold, /grailed/listingspage while page x count stays at or under 1,000Up to 100
/depop/listingscursor = the previous nextCursorUp to 48
/vinted/listingspage 1 to 1096
/whatnot/listingscursor = the previous nextCursor, or pageUp to 48
/cardhobby/soldpage, while (page - 1) x count is under 60,000Up to 60
/goldin/soldpage 1 to 10050
/fanatics/soldpage 1 to 20050
/pristine/soldpage 1 to 5060
/myslabs/soldOne page; deep=true merges a few hundred salesUp to 72

Costs and speed

  • Every page is one request, whatever its size, so ask for the biggest page the endpoint allows.
  • Pages count toward your per-minute speed like any request. A loop that sends pages one after another stays well under every plan’s speed; for many keywords at once, use batch jobs.