From 89dc1c0ad5b82d17adc3282b3b68f6b8b90882ba Mon Sep 17 00:00:00 2001 From: kasparasizi1 <132673909+kasparasizi1@users.noreply.github.com> Date: Sat, 25 Jul 2026 12:47:22 +0300 Subject: [PATCH] feat(ebay): expose pagination.has_more; is_sponsored is now nullable has_more is the stop signal for bulk extraction of completed/sold listings: total_pages/total_results are null on that grid, and past the last page eBay re-serves it rather than returning empty, so looping until empty never ends. is_sponsored becomes boolean | null. eBay renders its Sponsored badge into every card as anti-scraping bait, so the API now reports null instead of true-for-everything. --- src/ebay/types.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/ebay/types.ts b/src/ebay/types.ts index 82c8138..e9289fc 100644 --- a/src/ebay/types.ts +++ b/src/ebay/types.ts @@ -37,6 +37,13 @@ export interface Pagination { total_pages: number | null; /** Total number of results, if known */ total_results: number | null; + /** + * True while eBay still offers a next page — the stop signal for bulk + * extraction. `total_pages`/`total_results` are null on the completed/sold + * grid, and past the last page eBay re-serves that page, so looping "until + * empty" alone never terminates. + */ + has_more: boolean | null; } /** @@ -137,7 +144,12 @@ export interface SearchResult { seller_feedback_score: number | null; /** e.g. "eBay Refurbished" */ program_badge: string | null; - is_sponsored: boolean; + /** + * Always null — eBay renders its "Sponsored" badge into every card as + * anti-scraping bait, so promoted placements cannot be distinguished + * from organic results. + */ + is_sponsored: boolean | null; } // =============================================================================