scrapebadger 0.67.0 → 0.69.0

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.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.67.0";
6
+ var SDK_VERSION = "0.69.0";
7
7
 
8
8
  // src/internal/exceptions.ts
9
9
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -5083,6 +5083,31 @@ var RequestsClient = class {
5083
5083
  data
5084
5084
  };
5085
5085
  }
5086
+ /**
5087
+ * Submit up to 100 GET reads as async requests in one call. Submitting is free.
5088
+ *
5089
+ * Each item runs under this key with the same auth, credit check, rate limit
5090
+ * and price as if sent alone; at most 10 of a batch run at a time.
5091
+ *
5092
+ * @example
5093
+ * ```typescript
5094
+ * const sub = await client.requests.batch(
5095
+ * prompts.map((prompt) => ({ path: "/v1/chatgpt/ask", query: { prompt } })),
5096
+ * { callbackUrl: "https://example.com/hook" }
5097
+ * );
5098
+ * const ids = sub.requests.filter((r) => r.accepted).map((r) => r.request_id);
5099
+ * ```
5100
+ *
5101
+ * @param items - `{ path: "/v1/...", query: {...} }` (method defaults to GET).
5102
+ * @param options - `callbackUrl` for one signed webhook per item.
5103
+ * @returns A request_id (or the refusal) for every item.
5104
+ */
5105
+ async batch(items, options = {}) {
5106
+ return this.client.request("/v1/batch", {
5107
+ method: "POST",
5108
+ body: { requests: items, callback_url: options.callbackUrl }
5109
+ });
5110
+ }
5086
5111
  };
5087
5112
 
5088
5113
  // src/airbnb/client.ts
@@ -10361,6 +10386,38 @@ var ChatGPTClient = class {
10361
10386
  // --- END generated by sdk/codegen/facade ---
10362
10387
  };
10363
10388
 
10389
+ // src/copilot/client.ts
10390
+ function toQuery2(params) {
10391
+ const { strictCountry, ...rest } = params;
10392
+ return strictCountry ? { ...rest, strict_country: true } : rest;
10393
+ }
10394
+ var CopilotClient = class {
10395
+ client;
10396
+ constructor(client) {
10397
+ this.client = client;
10398
+ }
10399
+ /** Ask Copilot a question. Generated from the OpenAPI spec; returns the raw response object. */
10400
+ async askCopilotAQuestion(params = {}) {
10401
+ return this.client.request("/v1/copilot/ask", { params: toQuery2(params) });
10402
+ }
10403
+ /** Ask Copilot a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
10404
+ async askCopilotAQuestionPost(body, params = {}) {
10405
+ return this.client.request("/v1/copilot/ask", { method: "POST", params, body });
10406
+ }
10407
+ /** Measure a brand's visibility in a Copilot answer. Generated from the OpenAPI spec; returns the raw response object. */
10408
+ async measureABrandSVisibilityInACopilotAnswer(params = {}) {
10409
+ return this.client.request("/v1/copilot/brand-visibility", { params: toQuery2(params) });
10410
+ }
10411
+ /** Measure a brand's visibility in a Copilot answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
10412
+ async measureABrandSVisibilityInACopilotAnswerPost(body, params = {}) {
10413
+ return this.client.request("/v1/copilot/brand-visibility", { method: "POST", params, body });
10414
+ }
10415
+ /** List Copilot markets. Generated from the OpenAPI spec; returns the raw response object. */
10416
+ async listCopilotMarkets(params = {}) {
10417
+ return this.client.request("/v1/copilot/markets", { params });
10418
+ }
10419
+ };
10420
+
10364
10421
  // src/gemini/ask.ts
10365
10422
  var AskClient2 = class {
10366
10423
  client;
@@ -10581,6 +10638,8 @@ var ScrapeBadger = class {
10581
10638
  linkedin;
10582
10639
  /** ChatGPT scraper API client — ask, brand visibility, models (the real chatgpt.com, anonymous) */
10583
10640
  chatgpt;
10641
+ /** Copilot scraper API client — ask, brand visibility, markets (Copilot Search in Bing, anonymous) */
10642
+ copilot;
10584
10643
  /** Gemini scraper API client — ask, brand visibility (the real gemini.google.com, anonymous) */
10585
10644
  gemini;
10586
10645
  /**
@@ -10663,6 +10722,7 @@ var ScrapeBadger = class {
10663
10722
  this.wallapop = new WallapopClient(this.baseClient);
10664
10723
  this.linkedin = new LinkedInClient(this.baseClient);
10665
10724
  this.chatgpt = new ChatGPTClient(this.baseClient);
10725
+ this.copilot = new CopilotClient(this.baseClient);
10666
10726
  this.gemini = new GeminiClient(this.baseClient);
10667
10727
  }
10668
10728
  };