Start free

How to scrape eBay

Extract eBay listing titles, prices, bids, shipping and seller data as validated JSON, without rebuilding selectors every time the layout changes.

Site:
ebay.com
Difficulty:
Medium
Rendering:
JavaScript-rendered
Anti-bot:
Rate limiting, Bot detection

What you can extract from eBay

These are the fields teams most often pull from ebay.com, and why a hand-written selector for each one tends to break over time.

Field Type Why selectors break
title string Listing titles render inside different containers for auction, Buy It Now and multi-variation listings, so a single selector misses entire listing types.
price string Price markup differs between fixed-price, auction and best-offer listings, and currency is locale-dependent, so a fixed selector grabs the wrong value or none at all.
shipping string Shipping cost can be free, calculated, or location-dependent, and it loads after the main content, defeating selectors that read the DOM too early.
bids number The bid count only exists on auction listings, so a selector written against an auction page throws or returns null on every fixed-price item.
condition string Item condition is shown as free text that varies by category ("New", "Pre-owned", "Open box", "For parts"), so a selector that assumes a fixed vocabulary misclassifies a large share of listings.
seller string The seller block moves between the header and the sidebar depending on listing type, and its feedback score loads asynchronously, so a fixed selector captures the wrong node or an empty one.

The schema-first approach

Instead of maintaining selectors, you hand Extracto a JSON schema describing the shape you want. Here is a schema that works for eBay:

{
  "title": "string",
  "price": "string",
  "currency": "string",
  "shipping": "string",
  "condition": "string",
  "seller": "string"
}
  1. 1

    Describe the eBay fields you want

    Write a small JSON schema listing the fields to pull from ebay.com (for example title, price, shipping). No CSS selectors or XPath needed.

  2. 2

    Send the URL and schema to Extracto

    POST the eBay page URL and your schema to the Extracto API. Extracto renders the page in a real browser, handling JavaScript and dynamic content automatically.

  3. 3

    Get schema-validated JSON back

    Extracto returns JSON that matches your schema exactly, validated before it leaves the API, so your pipeline never receives broken or partial data.

Common pitfalls when scraping eBay

Is it legal to scrape eBay?

eBay's User Agreement restricts automated access, and eBay offers official APIs (Browse, Finding) that are the sanctioned route for most listing data. Public listing fields such as title, price and shipping are facts, but seller usernames and buyer information are personal data. Keep request volume modest, respect robots.txt, avoid authenticated areas, and prefer the official API for anything at scale. Collect only the public fields you actually need.

Extracto follows robots.txt by default and rate-limits politely. You are responsible for compliance with eBay's terms and applicable law (GDPR, CCPA) in your use case.

Scraping eBay: FAQ

Does eBay allow scraping?
eBay's User Agreement restricts automated access and the official Browse and Finding APIs are the sanctioned route for listing data. Reading a small number of public listings politely is lower risk than high-volume scraping, which can trigger blocks and breach the terms. Use the API for anything at scale.
How do I handle eBay auction vs fixed-price listings when scraping?
The two layouts expose different fields, so a schema-based approach is more robust than selectors: you describe optional fields like bids and current price, and Extracto fills in whatever the page actually contains rather than throwing when an element is missing.
Why is my eBay price scraper returning the wrong currency?
eBay localizes prices by visitor region, so the same listing shows different currencies and formats. Capture both a price and a currency field in your schema so the value is unambiguous, and let Extracto read the underlying values rather than parsing display strings.
Can I scrape eBay seller information?
Seller usernames and feedback are public, but treat them as potentially personal data and avoid building profiles of individuals. Limit collection to what your use case strictly needs and comply with eBay's terms and applicable privacy law.
How do I track eBay price changes over time?
Extract a price and currency field on a schedule and store each reading with a timestamp, rather than re-parsing the whole page. Because Extracto returns the same schema every run, you get a clean time series you can diff, without your pipeline breaking when eBay tweaks the listing layout.