scrapebadger 0.68.0 → 0.69.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -8538,8 +8538,17 @@ interface SearchResult$1 {
8538
8538
  sold_count: number | null;
8539
8539
  /** Sale date text as rendered by eBay, e.g. "2 Jul 2026" (completed/sold cards; localized on non-English markets) */
8540
8540
  sold_date: string | null;
8541
- /** Best-effort ISO date, e.g. "2026-07-02"; null when the market's format isn't English */
8541
+ /**
8542
+ * ISO date, e.g. "2026-07-02": a day the item sold, per eBay's "Sold" label.
8543
+ * On a multi-quantity listing eBay labels an earlier sale; bucket by `ended_at`.
8544
+ */
8542
8545
  sold_date_at: string | null;
8546
+ /**
8547
+ * UTC instant, e.g. "2026-11-01T16:05:00Z": when eBay last closed the listing
8548
+ * out (its end, or the latest sale on a live multi-quantity listing).
8549
+ * Completed results are ordered by it, newest first.
8550
+ */
8551
+ ended_at?: string | null;
8543
8552
  watchers: number | null;
8544
8553
  coupon: string | null;
8545
8554
  rating: number | null;
@@ -8875,9 +8884,9 @@ interface EbayCompletedParams {
8875
8884
  category_id?: string;
8876
8885
  /** Page number (1-indexed) */
8877
8886
  page?: number;
8878
- /** Results per page (60, 120 or 240; clamped) */
8887
+ /** Results per page (60, 120 or 200; 240 returns 200) */
8879
8888
  per_page?: number;
8880
- /** Sort order */
8889
+ /** Sort order. Only the price sorts change the order of sold results. */
8881
8890
  sort_by?: EbaySortBy;
8882
8891
  /** Item condition filter */
8883
8892
  condition?: EbayCondition;
@@ -9006,6 +9015,13 @@ declare class SearchClient$b {
9006
9015
  * Pass `query`, `seller` or both. `seller` alone pages through everything
9007
9016
  * that seller sold, e.g. `completed({ seller: "musicmagpie", domain: "co.uk" })`.
9008
9017
  *
9018
+ * Results are ordered by `ended_at` (when eBay last closed the listing out,
9019
+ * UTC), newest first. eBay applies no other time order to sold listings:
9020
+ * `best_match`, `ending_soonest` and `newly_listed` all return this one; the
9021
+ * two price sorts do reorder. One listing is one result, however many units
9022
+ * it sold. eBay's replicas disagree slightly, so a page walk can repeat or
9023
+ * miss a listing; de-duplicate on `item_id`.
9024
+ *
9009
9025
  * @param params - Search parameters including query, seller, filters, and pagination.
9010
9026
  * @returns Search results (with `sold: true`), facets, and pagination.
9011
9027
  */
@@ -19617,6 +19633,41 @@ declare class ChatGPTClient {
19617
19633
  measureABrandSVisibilityInAChatgptAnswerPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
19618
19634
  }
19619
19635
 
19636
+ /**
19637
+ * Copilot API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---
19638
+ */
19639
+
19640
+ /**
19641
+ * Query parameters for the Copilot GET methods.
19642
+ *
19643
+ * `country` is best-effort: when no exit there answers, the last retry may
19644
+ * answer from the US and the response `country` says so. Set
19645
+ * `strictCountry: true` to answer only from an exit in `country` (required
19646
+ * with it); when none answers in time the call fails with HTTP 503
19647
+ * `country_unavailable` and is not billed. `market` (e.g. `ja-JP`) defaults
19648
+ * to the market of `country`. On the POST forms, put `strict_country: true`
19649
+ * in the body.
19650
+ */
19651
+ type CopilotParams = Record<string, string | number | boolean | undefined> & {
19652
+ /** Answer only from an exit in `country`, never another one. Sent only when true. */
19653
+ strictCountry?: boolean;
19654
+ };
19655
+ /** Client for all Copilot API operations. (Generated from the OpenAPI spec.) */
19656
+ declare class CopilotClient {
19657
+ private readonly client;
19658
+ constructor(client: BaseClient);
19659
+ /** Ask Copilot a question. Generated from the OpenAPI spec; returns the raw response object. */
19660
+ askCopilotAQuestion(params?: CopilotParams): Promise<Record<string, unknown>>;
19661
+ /** Ask Copilot a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
19662
+ askCopilotAQuestionPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
19663
+ /** Measure a brand's visibility in a Copilot answer. Generated from the OpenAPI spec; returns the raw response object. */
19664
+ measureABrandSVisibilityInACopilotAnswer(params?: CopilotParams): Promise<Record<string, unknown>>;
19665
+ /** Measure a brand's visibility in a Copilot answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
19666
+ measureABrandSVisibilityInACopilotAnswerPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
19667
+ /** List Copilot markets. Generated from the OpenAPI spec; returns the raw response object. */
19668
+ listCopilotMarkets(params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
19669
+ }
19670
+
19620
19671
  /**
19621
19672
  * TypeScript types for the Gemini API.
19622
19673
  *
@@ -20106,6 +20157,8 @@ declare class ScrapeBadger {
20106
20157
  readonly linkedin: LinkedInClient;
20107
20158
  /** ChatGPT scraper API client — ask, brand visibility, models (the real chatgpt.com, anonymous) */
20108
20159
  readonly chatgpt: ChatGPTClient;
20160
+ /** Copilot scraper API client — ask, brand visibility, markets (Copilot Search in Bing, anonymous) */
20161
+ readonly copilot: CopilotClient;
20109
20162
  /** Gemini scraper API client — ask, brand visibility (the real gemini.google.com, anonymous) */
20110
20163
  readonly gemini: GeminiClient;
20111
20164
  /**
package/dist/index.d.ts CHANGED
@@ -8538,8 +8538,17 @@ interface SearchResult$1 {
8538
8538
  sold_count: number | null;
8539
8539
  /** Sale date text as rendered by eBay, e.g. "2 Jul 2026" (completed/sold cards; localized on non-English markets) */
8540
8540
  sold_date: string | null;
8541
- /** Best-effort ISO date, e.g. "2026-07-02"; null when the market's format isn't English */
8541
+ /**
8542
+ * ISO date, e.g. "2026-07-02": a day the item sold, per eBay's "Sold" label.
8543
+ * On a multi-quantity listing eBay labels an earlier sale; bucket by `ended_at`.
8544
+ */
8542
8545
  sold_date_at: string | null;
8546
+ /**
8547
+ * UTC instant, e.g. "2026-11-01T16:05:00Z": when eBay last closed the listing
8548
+ * out (its end, or the latest sale on a live multi-quantity listing).
8549
+ * Completed results are ordered by it, newest first.
8550
+ */
8551
+ ended_at?: string | null;
8543
8552
  watchers: number | null;
8544
8553
  coupon: string | null;
8545
8554
  rating: number | null;
@@ -8875,9 +8884,9 @@ interface EbayCompletedParams {
8875
8884
  category_id?: string;
8876
8885
  /** Page number (1-indexed) */
8877
8886
  page?: number;
8878
- /** Results per page (60, 120 or 240; clamped) */
8887
+ /** Results per page (60, 120 or 200; 240 returns 200) */
8879
8888
  per_page?: number;
8880
- /** Sort order */
8889
+ /** Sort order. Only the price sorts change the order of sold results. */
8881
8890
  sort_by?: EbaySortBy;
8882
8891
  /** Item condition filter */
8883
8892
  condition?: EbayCondition;
@@ -9006,6 +9015,13 @@ declare class SearchClient$b {
9006
9015
  * Pass `query`, `seller` or both. `seller` alone pages through everything
9007
9016
  * that seller sold, e.g. `completed({ seller: "musicmagpie", domain: "co.uk" })`.
9008
9017
  *
9018
+ * Results are ordered by `ended_at` (when eBay last closed the listing out,
9019
+ * UTC), newest first. eBay applies no other time order to sold listings:
9020
+ * `best_match`, `ending_soonest` and `newly_listed` all return this one; the
9021
+ * two price sorts do reorder. One listing is one result, however many units
9022
+ * it sold. eBay's replicas disagree slightly, so a page walk can repeat or
9023
+ * miss a listing; de-duplicate on `item_id`.
9024
+ *
9009
9025
  * @param params - Search parameters including query, seller, filters, and pagination.
9010
9026
  * @returns Search results (with `sold: true`), facets, and pagination.
9011
9027
  */
@@ -19617,6 +19633,41 @@ declare class ChatGPTClient {
19617
19633
  measureABrandSVisibilityInAChatgptAnswerPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
19618
19634
  }
19619
19635
 
19636
+ /**
19637
+ * Copilot API client. // --- BEGIN generated by sdk/codegen/facade — do not edit ---
19638
+ */
19639
+
19640
+ /**
19641
+ * Query parameters for the Copilot GET methods.
19642
+ *
19643
+ * `country` is best-effort: when no exit there answers, the last retry may
19644
+ * answer from the US and the response `country` says so. Set
19645
+ * `strictCountry: true` to answer only from an exit in `country` (required
19646
+ * with it); when none answers in time the call fails with HTTP 503
19647
+ * `country_unavailable` and is not billed. `market` (e.g. `ja-JP`) defaults
19648
+ * to the market of `country`. On the POST forms, put `strict_country: true`
19649
+ * in the body.
19650
+ */
19651
+ type CopilotParams = Record<string, string | number | boolean | undefined> & {
19652
+ /** Answer only from an exit in `country`, never another one. Sent only when true. */
19653
+ strictCountry?: boolean;
19654
+ };
19655
+ /** Client for all Copilot API operations. (Generated from the OpenAPI spec.) */
19656
+ declare class CopilotClient {
19657
+ private readonly client;
19658
+ constructor(client: BaseClient);
19659
+ /** Ask Copilot a question. Generated from the OpenAPI spec; returns the raw response object. */
19660
+ askCopilotAQuestion(params?: CopilotParams): Promise<Record<string, unknown>>;
19661
+ /** Ask Copilot a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
19662
+ askCopilotAQuestionPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
19663
+ /** Measure a brand's visibility in a Copilot answer. Generated from the OpenAPI spec; returns the raw response object. */
19664
+ measureABrandSVisibilityInACopilotAnswer(params?: CopilotParams): Promise<Record<string, unknown>>;
19665
+ /** Measure a brand's visibility in a Copilot answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
19666
+ measureABrandSVisibilityInACopilotAnswerPost(body?: unknown, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
19667
+ /** List Copilot markets. Generated from the OpenAPI spec; returns the raw response object. */
19668
+ listCopilotMarkets(params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
19669
+ }
19670
+
19620
19671
  /**
19621
19672
  * TypeScript types for the Gemini API.
19622
19673
  *
@@ -20106,6 +20157,8 @@ declare class ScrapeBadger {
20106
20157
  readonly linkedin: LinkedInClient;
20107
20158
  /** ChatGPT scraper API client — ask, brand visibility, models (the real chatgpt.com, anonymous) */
20108
20159
  readonly chatgpt: ChatGPTClient;
20160
+ /** Copilot scraper API client — ask, brand visibility, markets (Copilot Search in Bing, anonymous) */
20161
+ readonly copilot: CopilotClient;
20109
20162
  /** Gemini scraper API client — ask, brand visibility (the real gemini.google.com, anonymous) */
20110
20163
  readonly gemini: GeminiClient;
20111
20164
  /**
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
9
9
  var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
10
10
 
11
11
  // src/internal/version.ts
12
- var SDK_VERSION = "0.67.0";
12
+ var SDK_VERSION = "0.69.1";
13
13
 
14
14
  // src/internal/exceptions.ts
15
15
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -6252,6 +6252,13 @@ var SearchClient8 = class {
6252
6252
  * Pass `query`, `seller` or both. `seller` alone pages through everything
6253
6253
  * that seller sold, e.g. `completed({ seller: "musicmagpie", domain: "co.uk" })`.
6254
6254
  *
6255
+ * Results are ordered by `ended_at` (when eBay last closed the listing out,
6256
+ * UTC), newest first. eBay applies no other time order to sold listings:
6257
+ * `best_match`, `ending_soonest` and `newly_listed` all return this one; the
6258
+ * two price sorts do reorder. One listing is one result, however many units
6259
+ * it sold. eBay's replicas disagree slightly, so a page walk can repeat or
6260
+ * miss a listing; de-duplicate on `item_id`.
6261
+ *
6255
6262
  * @param params - Search parameters including query, seller, filters, and pagination.
6256
6263
  * @returns Search results (with `sold: true`), facets, and pagination.
6257
6264
  */
@@ -10392,6 +10399,38 @@ var ChatGPTClient = class {
10392
10399
  // --- END generated by sdk/codegen/facade ---
10393
10400
  };
10394
10401
 
10402
+ // src/copilot/client.ts
10403
+ function toQuery2(params) {
10404
+ const { strictCountry, ...rest } = params;
10405
+ return strictCountry ? { ...rest, strict_country: true } : rest;
10406
+ }
10407
+ var CopilotClient = class {
10408
+ client;
10409
+ constructor(client) {
10410
+ this.client = client;
10411
+ }
10412
+ /** Ask Copilot a question. Generated from the OpenAPI spec; returns the raw response object. */
10413
+ async askCopilotAQuestion(params = {}) {
10414
+ return this.client.request("/v1/copilot/ask", { params: toQuery2(params) });
10415
+ }
10416
+ /** Ask Copilot a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
10417
+ async askCopilotAQuestionPost(body, params = {}) {
10418
+ return this.client.request("/v1/copilot/ask", { method: "POST", params, body });
10419
+ }
10420
+ /** Measure a brand's visibility in a Copilot answer. Generated from the OpenAPI spec; returns the raw response object. */
10421
+ async measureABrandSVisibilityInACopilotAnswer(params = {}) {
10422
+ return this.client.request("/v1/copilot/brand-visibility", { params: toQuery2(params) });
10423
+ }
10424
+ /** Measure a brand's visibility in a Copilot answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
10425
+ async measureABrandSVisibilityInACopilotAnswerPost(body, params = {}) {
10426
+ return this.client.request("/v1/copilot/brand-visibility", { method: "POST", params, body });
10427
+ }
10428
+ /** List Copilot markets. Generated from the OpenAPI spec; returns the raw response object. */
10429
+ async listCopilotMarkets(params = {}) {
10430
+ return this.client.request("/v1/copilot/markets", { params });
10431
+ }
10432
+ };
10433
+
10395
10434
  // src/gemini/ask.ts
10396
10435
  var AskClient2 = class {
10397
10436
  client;
@@ -10612,6 +10651,8 @@ var ScrapeBadger = class {
10612
10651
  linkedin;
10613
10652
  /** ChatGPT scraper API client — ask, brand visibility, models (the real chatgpt.com, anonymous) */
10614
10653
  chatgpt;
10654
+ /** Copilot scraper API client — ask, brand visibility, markets (Copilot Search in Bing, anonymous) */
10655
+ copilot;
10615
10656
  /** Gemini scraper API client — ask, brand visibility (the real gemini.google.com, anonymous) */
10616
10657
  gemini;
10617
10658
  /**
@@ -10694,6 +10735,7 @@ var ScrapeBadger = class {
10694
10735
  this.wallapop = new WallapopClient(this.baseClient);
10695
10736
  this.linkedin = new LinkedInClient(this.baseClient);
10696
10737
  this.chatgpt = new ChatGPTClient(this.baseClient);
10738
+ this.copilot = new CopilotClient(this.baseClient);
10697
10739
  this.gemini = new GeminiClient(this.baseClient);
10698
10740
  }
10699
10741
  };