scrapebadger 0.76.0 → 0.76.2

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
@@ -1200,7 +1200,10 @@ interface GoogleSearchParams {
1200
1200
  tbm?: string;
1201
1201
  /** Google result filter: 14 web, 18 forums. Other verticals require output=html. */
1202
1202
  udm?: string;
1203
- /** Bypass result caches and request a fresh Google fetch. */
1203
+ /**
1204
+ * No effect: ScrapeBadger no longer caches responses, so every call is a
1205
+ * fresh Google fetch. Kept for compatibility.
1206
+ */
1204
1207
  no_cache?: boolean;
1205
1208
  /** Site restriction mode: i includes, e excludes as_sitesearch. */
1206
1209
  as_dt?: string;
@@ -5567,7 +5570,7 @@ declare class AccountClient {
5567
5570
  /**
5568
5571
  * TypeScript types for the agent platform endpoints.
5569
5572
  *
5570
- * Quote, feedback, result re-reads and async-request polling — the
5573
+ * Quote, feedback and async-request polling — the
5571
5574
  * account-level helpers an agent uses around the scraper APIs. None of these
5572
5575
  * calls is ever billed.
5573
5576
  */
@@ -5681,7 +5684,10 @@ interface AsyncRequest<T = unknown> {
5681
5684
  status: number;
5682
5685
  /** Suggested wait before the next poll (running only). */
5683
5686
  retryAfterSeconds: number | null;
5684
- /** `X-Result-ID` of the finished call, for free re-reads via `results.get`. */
5687
+ /**
5688
+ * @deprecated Always `null`: the API stopped sending `X-Result-ID` (and
5689
+ * storing results for re-reads) on 2026-11-09.
5690
+ */
5685
5691
  resultId: string | null;
5686
5692
  /** `X-Credits-Used` of the finished call. */
5687
5693
  creditsUsed: number | null;
@@ -5746,8 +5752,9 @@ interface AgentTrial {
5746
5752
  * Agent platform API clients.
5747
5753
  *
5748
5754
  * Free helpers around the scraper APIs: quote a call before making it, report
5749
- * a bug, re-read a recent result, and poll a call made with
5750
- * `Prefer: respond-async`. None of these calls is ever billed.
5755
+ * a bug, and poll a call made with `Prefer: respond-async`. None of these calls
5756
+ * is ever billed. (`results.get` is deprecated: the API stopped storing results
5757
+ * on 2026-11-09.)
5751
5758
  */
5752
5759
 
5753
5760
  /**
@@ -5797,22 +5804,31 @@ declare class AgentClient$1 {
5797
5804
  reportBug(summary: string, options?: Omit<FeedbackOptions, "type">): Promise<FeedbackReceipt>;
5798
5805
  }
5799
5806
  /**
5800
- * Client for re-reading recent results for free.
5807
+ * Deprecated client for the removed `GET /v1/results/{id}` re-read.
5801
5808
  *
5802
- * Every billed 2xx read carries an `X-Result-ID` header; the body is kept for
5803
- * about 15 minutes and can be replayed — optionally reshaped — without
5804
- * re-running (and re-paying for) the call.
5809
+ * ScrapeBadger no longer stores results: responses carry no `X-Result-ID` and
5810
+ * `GET /v1/results/{id}` answers 410 Gone since 2026-11-09. To get a different
5811
+ * shape of a result, re-run the call with the `jq`, `fields` or `max_items`
5812
+ * view parameters (billed as a normal call).
5813
+ *
5814
+ * @deprecated The API no longer stores results; this client will be removed.
5805
5815
  */
5806
5816
  declare class ResultsClient {
5807
5817
  private readonly client;
5808
5818
  constructor(client: BaseClient);
5809
5819
  /**
5810
- * Replay a recent result, optionally trimmed. Free.
5820
+ * Deprecated: the API no longer stores results, so there is nothing to re-read.
5821
+ *
5822
+ * `GET /v1/results/{id}` was removed from the API on 2026-11-09 and answers
5823
+ * 410 Gone, which this method throws as `ScrapeBadgerError`. Re-run the
5824
+ * original call with the `jq`, `fields` or `max_items` view parameters instead
5825
+ * (billed as a normal call). Kept only so existing code fails with a clear
5826
+ * error; it will be removed in a future release.
5811
5827
  *
5812
- * @param resultId - `X-Result-ID` of the original call.
5828
+ * @deprecated The API no longer stores results; re-run the call with view params.
5829
+ * @param resultId - ID of a stored result (no longer issued by the API).
5813
5830
  * @param options - `jq`, `fields`, `maxItems`, `summary` view params.
5814
- * @returns The original response body, reshaped — any JSON value.
5815
- * @throws NotFoundError - Unknown result, or it expired (~15 minutes).
5831
+ * @throws ScrapeBadgerError - Always (410 Gone `results_removed`) against the current API.
5816
5832
  */
5817
5833
  get<T = unknown>(resultId: string, options?: ResultViewOptions): Promise<T>;
5818
5834
  }
@@ -9470,7 +9486,9 @@ declare class FacebookClient {
9470
9486
  listLocations(params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
9471
9487
  /** Resolve a town/postcode to a Marketplace location. Generated from the OpenAPI spec; returns the raw response object. */
9472
9488
  resolveATownPostcodeToAMarketplaceLocation(params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
9473
- /** Search Marketplace. Generated from the OpenAPI spec; returns the raw response object. */
9489
+ /** Search public Marketplace. Use strict_filters: true to enforce radius (km) and age,
9490
+ * include_details: true for descriptions/photos. Continuations cover price ranges;
9491
+ * search_info reports partial coverage. Sort all collected pages for newest first. */
9474
9492
  searchMarketplace(params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
9475
9493
  /** Get page detail. Generated from the OpenAPI spec; returns the raw response object. */
9476
9494
  getPageDetail(identifier: string, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
@@ -20330,7 +20348,10 @@ declare class ScrapeBadger {
20330
20348
  readonly account: AccountClient;
20331
20349
  /** Quote a call before making it, and report bugs or send feedback. Free. */
20332
20350
  readonly agent: AgentClient$1;
20333
- /** Re-read a recent result (`X-Result-ID`) for free, optionally trimmed. */
20351
+ /**
20352
+ * @deprecated The API no longer stores results (`GET /v1/results/{id}` answers
20353
+ * 410 Gone since 2026-11-09); see `ResultsClient.get`.
20354
+ */
20334
20355
  readonly results: ResultsClient;
20335
20356
  /** Poll a call made with `Prefer: respond-async`. Free. */
20336
20357
  readonly requests: RequestsClient;
package/dist/index.d.ts CHANGED
@@ -1200,7 +1200,10 @@ interface GoogleSearchParams {
1200
1200
  tbm?: string;
1201
1201
  /** Google result filter: 14 web, 18 forums. Other verticals require output=html. */
1202
1202
  udm?: string;
1203
- /** Bypass result caches and request a fresh Google fetch. */
1203
+ /**
1204
+ * No effect: ScrapeBadger no longer caches responses, so every call is a
1205
+ * fresh Google fetch. Kept for compatibility.
1206
+ */
1204
1207
  no_cache?: boolean;
1205
1208
  /** Site restriction mode: i includes, e excludes as_sitesearch. */
1206
1209
  as_dt?: string;
@@ -5567,7 +5570,7 @@ declare class AccountClient {
5567
5570
  /**
5568
5571
  * TypeScript types for the agent platform endpoints.
5569
5572
  *
5570
- * Quote, feedback, result re-reads and async-request polling — the
5573
+ * Quote, feedback and async-request polling — the
5571
5574
  * account-level helpers an agent uses around the scraper APIs. None of these
5572
5575
  * calls is ever billed.
5573
5576
  */
@@ -5681,7 +5684,10 @@ interface AsyncRequest<T = unknown> {
5681
5684
  status: number;
5682
5685
  /** Suggested wait before the next poll (running only). */
5683
5686
  retryAfterSeconds: number | null;
5684
- /** `X-Result-ID` of the finished call, for free re-reads via `results.get`. */
5687
+ /**
5688
+ * @deprecated Always `null`: the API stopped sending `X-Result-ID` (and
5689
+ * storing results for re-reads) on 2026-11-09.
5690
+ */
5685
5691
  resultId: string | null;
5686
5692
  /** `X-Credits-Used` of the finished call. */
5687
5693
  creditsUsed: number | null;
@@ -5746,8 +5752,9 @@ interface AgentTrial {
5746
5752
  * Agent platform API clients.
5747
5753
  *
5748
5754
  * Free helpers around the scraper APIs: quote a call before making it, report
5749
- * a bug, re-read a recent result, and poll a call made with
5750
- * `Prefer: respond-async`. None of these calls is ever billed.
5755
+ * a bug, and poll a call made with `Prefer: respond-async`. None of these calls
5756
+ * is ever billed. (`results.get` is deprecated: the API stopped storing results
5757
+ * on 2026-11-09.)
5751
5758
  */
5752
5759
 
5753
5760
  /**
@@ -5797,22 +5804,31 @@ declare class AgentClient$1 {
5797
5804
  reportBug(summary: string, options?: Omit<FeedbackOptions, "type">): Promise<FeedbackReceipt>;
5798
5805
  }
5799
5806
  /**
5800
- * Client for re-reading recent results for free.
5807
+ * Deprecated client for the removed `GET /v1/results/{id}` re-read.
5801
5808
  *
5802
- * Every billed 2xx read carries an `X-Result-ID` header; the body is kept for
5803
- * about 15 minutes and can be replayed — optionally reshaped — without
5804
- * re-running (and re-paying for) the call.
5809
+ * ScrapeBadger no longer stores results: responses carry no `X-Result-ID` and
5810
+ * `GET /v1/results/{id}` answers 410 Gone since 2026-11-09. To get a different
5811
+ * shape of a result, re-run the call with the `jq`, `fields` or `max_items`
5812
+ * view parameters (billed as a normal call).
5813
+ *
5814
+ * @deprecated The API no longer stores results; this client will be removed.
5805
5815
  */
5806
5816
  declare class ResultsClient {
5807
5817
  private readonly client;
5808
5818
  constructor(client: BaseClient);
5809
5819
  /**
5810
- * Replay a recent result, optionally trimmed. Free.
5820
+ * Deprecated: the API no longer stores results, so there is nothing to re-read.
5821
+ *
5822
+ * `GET /v1/results/{id}` was removed from the API on 2026-11-09 and answers
5823
+ * 410 Gone, which this method throws as `ScrapeBadgerError`. Re-run the
5824
+ * original call with the `jq`, `fields` or `max_items` view parameters instead
5825
+ * (billed as a normal call). Kept only so existing code fails with a clear
5826
+ * error; it will be removed in a future release.
5811
5827
  *
5812
- * @param resultId - `X-Result-ID` of the original call.
5828
+ * @deprecated The API no longer stores results; re-run the call with view params.
5829
+ * @param resultId - ID of a stored result (no longer issued by the API).
5813
5830
  * @param options - `jq`, `fields`, `maxItems`, `summary` view params.
5814
- * @returns The original response body, reshaped — any JSON value.
5815
- * @throws NotFoundError - Unknown result, or it expired (~15 minutes).
5831
+ * @throws ScrapeBadgerError - Always (410 Gone `results_removed`) against the current API.
5816
5832
  */
5817
5833
  get<T = unknown>(resultId: string, options?: ResultViewOptions): Promise<T>;
5818
5834
  }
@@ -9470,7 +9486,9 @@ declare class FacebookClient {
9470
9486
  listLocations(params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
9471
9487
  /** Resolve a town/postcode to a Marketplace location. Generated from the OpenAPI spec; returns the raw response object. */
9472
9488
  resolveATownPostcodeToAMarketplaceLocation(params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
9473
- /** Search Marketplace. Generated from the OpenAPI spec; returns the raw response object. */
9489
+ /** Search public Marketplace. Use strict_filters: true to enforce radius (km) and age,
9490
+ * include_details: true for descriptions/photos. Continuations cover price ranges;
9491
+ * search_info reports partial coverage. Sort all collected pages for newest first. */
9474
9492
  searchMarketplace(params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
9475
9493
  /** Get page detail. Generated from the OpenAPI spec; returns the raw response object. */
9476
9494
  getPageDetail(identifier: string, params?: Record<string, string | number | boolean | undefined>): Promise<Record<string, unknown>>;
@@ -20330,7 +20348,10 @@ declare class ScrapeBadger {
20330
20348
  readonly account: AccountClient;
20331
20349
  /** Quote a call before making it, and report bugs or send feedback. Free. */
20332
20350
  readonly agent: AgentClient$1;
20333
- /** Re-read a recent result (`X-Result-ID`) for free, optionally trimmed. */
20351
+ /**
20352
+ * @deprecated The API no longer stores results (`GET /v1/results/{id}` answers
20353
+ * 410 Gone since 2026-11-09); see `ResultsClient.get`.
20354
+ */
20334
20355
  readonly results: ResultsClient;
20335
20356
  /** Poll a call made with `Prefer: respond-async`. Free. */
20336
20357
  readonly requests: RequestsClient;
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { EventEmitter } from 'events';
3
3
  import WebSocket from 'ws';
4
4
 
5
5
  // src/internal/version.ts
6
- var SDK_VERSION = "0.76.0";
6
+ var SDK_VERSION = "0.76.2";
7
7
 
8
8
  // src/internal/exceptions.ts
9
9
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -5060,19 +5060,32 @@ var AgentClient = class {
5060
5060
  return this.feedback(summary, { ...options, type: "bug" });
5061
5061
  }
5062
5062
  };
5063
+ var resultsGetWarned = false;
5063
5064
  var ResultsClient = class {
5064
5065
  constructor(client) {
5065
5066
  this.client = client;
5066
5067
  }
5067
5068
  /**
5068
- * Replay a recent result, optionally trimmed. Free.
5069
+ * Deprecated: the API no longer stores results, so there is nothing to re-read.
5069
5070
  *
5070
- * @param resultId - `X-Result-ID` of the original call.
5071
+ * `GET /v1/results/{id}` was removed from the API on 2026-11-09 and answers
5072
+ * 410 Gone, which this method throws as `ScrapeBadgerError`. Re-run the
5073
+ * original call with the `jq`, `fields` or `max_items` view parameters instead
5074
+ * (billed as a normal call). Kept only so existing code fails with a clear
5075
+ * error; it will be removed in a future release.
5076
+ *
5077
+ * @deprecated The API no longer stores results; re-run the call with view params.
5078
+ * @param resultId - ID of a stored result (no longer issued by the API).
5071
5079
  * @param options - `jq`, `fields`, `maxItems`, `summary` view params.
5072
- * @returns The original response body, reshaped — any JSON value.
5073
- * @throws NotFoundError - Unknown result, or it expired (~15 minutes).
5080
+ * @throws ScrapeBadgerError - Always (410 Gone `results_removed`) against the current API.
5074
5081
  */
5075
5082
  async get(resultId, options = {}) {
5083
+ if (!resultsGetWarned) {
5084
+ resultsGetWarned = true;
5085
+ console.warn(
5086
+ "[scrapebadger] results.get() is deprecated: ScrapeBadger stopped storing results on 2026-11-09 and GET /v1/results/{id} answers 410 Gone. Re-run the call with jq/fields/max_items view parameters instead."
5087
+ );
5088
+ }
5076
5089
  const { jq, fields, maxItems, summary } = options;
5077
5090
  return this.client.request(`/v1/results/${encodeURIComponent(resultId)}`, {
5078
5091
  params: {
@@ -5108,7 +5121,8 @@ var RequestsClient = class {
5108
5121
  running,
5109
5122
  status: status ?? 200,
5110
5123
  retryAfterSeconds: retryAfter ?? null,
5111
- resultId: headers?.get("X-Result-ID") ?? null,
5124
+ resultId: null,
5125
+ // deprecated: the API no longer sends X-Result-ID
5112
5126
  creditsUsed: credits && /^\d+$/.test(credits) ? Number(credits) : null,
5113
5127
  data
5114
5128
  };
@@ -6573,7 +6587,9 @@ var FacebookClient = class {
6573
6587
  async resolveATownPostcodeToAMarketplaceLocation(params = {}) {
6574
6588
  return this.client.request("/v1/facebook/marketplace/locations/resolve", { params });
6575
6589
  }
6576
- /** Search Marketplace. Generated from the OpenAPI spec; returns the raw response object. */
6590
+ /** Search public Marketplace. Use strict_filters: true to enforce radius (km) and age,
6591
+ * include_details: true for descriptions/photos. Continuations cover price ranges;
6592
+ * search_info reports partial coverage. Sort all collected pages for newest first. */
6577
6593
  async searchMarketplace(params = {}) {
6578
6594
  return this.client.request("/v1/facebook/marketplace/search", { params });
6579
6595
  }
@@ -10704,7 +10720,10 @@ var ScrapeBadger = class {
10704
10720
  account;
10705
10721
  /** Quote a call before making it, and report bugs or send feedback. Free. */
10706
10722
  agent;
10707
- /** Re-read a recent result (`X-Result-ID`) for free, optionally trimmed. */
10723
+ /**
10724
+ * @deprecated The API no longer stores results (`GET /v1/results/{id}` answers
10725
+ * 410 Gone since 2026-11-09); see `ResultsClient.get`.
10726
+ */
10708
10727
  results;
10709
10728
  /** Poll a call made with `Prefer: respond-async`. Free. */
10710
10729
  requests;