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.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.0";
13
13
 
14
14
  // src/internal/exceptions.ts
15
15
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -5089,6 +5089,31 @@ var RequestsClient = class {
5089
5089
  data
5090
5090
  };
5091
5091
  }
5092
+ /**
5093
+ * Submit up to 100 GET reads as async requests in one call. Submitting is free.
5094
+ *
5095
+ * Each item runs under this key with the same auth, credit check, rate limit
5096
+ * and price as if sent alone; at most 10 of a batch run at a time.
5097
+ *
5098
+ * @example
5099
+ * ```typescript
5100
+ * const sub = await client.requests.batch(
5101
+ * prompts.map((prompt) => ({ path: "/v1/chatgpt/ask", query: { prompt } })),
5102
+ * { callbackUrl: "https://example.com/hook" }
5103
+ * );
5104
+ * const ids = sub.requests.filter((r) => r.accepted).map((r) => r.request_id);
5105
+ * ```
5106
+ *
5107
+ * @param items - `{ path: "/v1/...", query: {...} }` (method defaults to GET).
5108
+ * @param options - `callbackUrl` for one signed webhook per item.
5109
+ * @returns A request_id (or the refusal) for every item.
5110
+ */
5111
+ async batch(items, options = {}) {
5112
+ return this.client.request("/v1/batch", {
5113
+ method: "POST",
5114
+ body: { requests: items, callback_url: options.callbackUrl }
5115
+ });
5116
+ }
5092
5117
  };
5093
5118
 
5094
5119
  // src/airbnb/client.ts
@@ -10367,6 +10392,38 @@ var ChatGPTClient = class {
10367
10392
  // --- END generated by sdk/codegen/facade ---
10368
10393
  };
10369
10394
 
10395
+ // src/copilot/client.ts
10396
+ function toQuery2(params) {
10397
+ const { strictCountry, ...rest } = params;
10398
+ return strictCountry ? { ...rest, strict_country: true } : rest;
10399
+ }
10400
+ var CopilotClient = class {
10401
+ client;
10402
+ constructor(client) {
10403
+ this.client = client;
10404
+ }
10405
+ /** Ask Copilot a question. Generated from the OpenAPI spec; returns the raw response object. */
10406
+ async askCopilotAQuestion(params = {}) {
10407
+ return this.client.request("/v1/copilot/ask", { params: toQuery2(params) });
10408
+ }
10409
+ /** Ask Copilot a question (POST). Generated from the OpenAPI spec; returns the raw response object. */
10410
+ async askCopilotAQuestionPost(body, params = {}) {
10411
+ return this.client.request("/v1/copilot/ask", { method: "POST", params, body });
10412
+ }
10413
+ /** Measure a brand's visibility in a Copilot answer. Generated from the OpenAPI spec; returns the raw response object. */
10414
+ async measureABrandSVisibilityInACopilotAnswer(params = {}) {
10415
+ return this.client.request("/v1/copilot/brand-visibility", { params: toQuery2(params) });
10416
+ }
10417
+ /** Measure a brand's visibility in a Copilot answer (POST). Generated from the OpenAPI spec; returns the raw response object. */
10418
+ async measureABrandSVisibilityInACopilotAnswerPost(body, params = {}) {
10419
+ return this.client.request("/v1/copilot/brand-visibility", { method: "POST", params, body });
10420
+ }
10421
+ /** List Copilot markets. Generated from the OpenAPI spec; returns the raw response object. */
10422
+ async listCopilotMarkets(params = {}) {
10423
+ return this.client.request("/v1/copilot/markets", { params });
10424
+ }
10425
+ };
10426
+
10370
10427
  // src/gemini/ask.ts
10371
10428
  var AskClient2 = class {
10372
10429
  client;
@@ -10587,6 +10644,8 @@ var ScrapeBadger = class {
10587
10644
  linkedin;
10588
10645
  /** ChatGPT scraper API client — ask, brand visibility, models (the real chatgpt.com, anonymous) */
10589
10646
  chatgpt;
10647
+ /** Copilot scraper API client — ask, brand visibility, markets (Copilot Search in Bing, anonymous) */
10648
+ copilot;
10590
10649
  /** Gemini scraper API client — ask, brand visibility (the real gemini.google.com, anonymous) */
10591
10650
  gemini;
10592
10651
  /**
@@ -10669,6 +10728,7 @@ var ScrapeBadger = class {
10669
10728
  this.wallapop = new WallapopClient(this.baseClient);
10670
10729
  this.linkedin = new LinkedInClient(this.baseClient);
10671
10730
  this.chatgpt = new ChatGPTClient(this.baseClient);
10731
+ this.copilot = new CopilotClient(this.baseClient);
10672
10732
  this.gemini = new GeminiClient(this.baseClient);
10673
10733
  }
10674
10734
  };