Skip to content

Adapter: eBay listing pages (price + bid status, read-only) #8

Description

@New1Direction

What

Add an ebay.js adapter for eBay item/listing pages exposing read-only tools: get_listing (title, price, condition, seller), get_price, and get_bid_status (current bid, number of bids, time left for auctions; Buy-It-Now price for fixed-price).

Why it's valuable

From ADAPTERS_WANTED.md (Easy column): pricing and bid status live in the page meta and JSON-LD. Reads only — no cart/bid actions needed — which keeps it newcomer-safe and squarely inside the project's anti-features policy.

Where to start

  1. Copy adapters/_templateadapters/ebay.js, ID = "ebay". Read adapters/CONTRACT.md and adapters/jsonld.js (it already extracts schema.org Product/Offer and OG meta — your adapter can reuse the same field-reading patterns rather than reinventing them).
  2. detect() (sync): match eBay item URLs (ebay.com/itm/<id> and regional TLDs like ebay.co.uk, ebay.de). Return { adapter: ID, itemId, url }. Keep detection sharp so it doesn't fire on eBay search/category pages.
  3. extract(): read price/condition/availability from ctx.jsonld + ctx.meta first; only fetch the page (with CHROME_UA, credentials: "omit") if you need auction-specific fields not present in structured data. For auctions, current bid + time-left may need a small HTML/meta parse — degrade gracefully if absent.
  4. Read-only: export const actions = {} (no bidding — see ADAPTERS_WANTED.md anti-features).
  5. Capture a fixture (one fixed-price + ideally one auction listing) in _fixtures/ per _fixtures/README.md; add detect()/extract() tests to _test/run.mjs; run node adapters/_test/run.mjs; register in worker/src/index.ts.

Acceptance criteria

  • detect() matches ebay.com/itm/... (+ at least one regional TLD) and returns null for search/category/home URLs.
  • extract() returns at least get_listing, get_price, get_bid_status.
  • Auction vs. fixed-price handled (don't emit bid fields as null noise for BIN listings).
  • No actions; no bidding. Fixture + passing test; registered in worker/src/index.ts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions