Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.21.0] - 2026-07-17

### Added

- **eBay** — new `sold_date` / `sold_date_at` fields on `SearchResult` cards (search, seller items, category, completed). `sold_date` is the sale date text as rendered by eBay (e.g. `"2 Jul 2026"`, localized on non-English markets, always set on completed/sold cards); `sold_date_at` is a best-effort ISO date (e.g. `"2026-07-02"`, `null` when the market's format isn't English). (SCR-122)

## [0.20.0] - 2026-07-13

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrapebadger",
"version": "0.20.0",
"version": "0.21.0",
"description": "Official Node.js SDK for ScrapeBadger - Async web scraping APIs for Twitter, Google, Vinted, Reddit, and more",
"type": "module",
"main": "./dist/index.js",
Expand Down
4 changes: 4 additions & 0 deletions src/ebay/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ export interface SearchResult {
location: string | null;
returns: string | null;
sold_count: number | null;
/** Sale date text as rendered by eBay, e.g. "2 Jul 2026" (completed/sold cards; localized on non-English markets) */
sold_date: string | null;
/** Best-effort ISO date, e.g. "2026-07-02"; null when the market's format isn't English */
sold_date_at: string | null;
watchers: number | null;
coupon: string | null;
rating: number | null;
Expand Down
5 changes: 5 additions & 0 deletions tests/ebay.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ const SEARCH_RESULT = {
location: "United States",
returns: "30 days",
sold_count: 120,
sold_date: null,
sold_date_at: null,
watchers: 30,
coupon: null,
rating: 4.8,
Expand All @@ -114,6 +116,7 @@ const SEARCH_FIXTURE: EbaySearchResponse = {
const COMPLETED_FIXTURE: EbaySearchResponse = {
...SEARCH_FIXTURE,
sold: true,
results: [{ ...SEARCH_RESULT, sold_date: "2 Jul 2026", sold_date_at: "2026-07-02" }],
};

const ITEM_FIXTURE: EbayItemDetailResponse = {
Expand Down Expand Up @@ -390,6 +393,8 @@ describe("EbayClient.search", () => {
const { url } = capturedRequest();
expect(url).toContain("/v1/ebay/completed");
expect(result.sold).toBe(true);
expect(result.results[0].sold_date).toBe("2 Jul 2026");
expect(result.results[0].sold_date_at).toBe("2026-07-02");
});

it("autocomplete sends GET to /v1/ebay/autocomplete", async () => {
Expand Down
Loading