scrapebadger 0.69.1 → 0.72.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.
@@ -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.69.1";
12
+ var SDK_VERSION = "0.72.0";
13
13
 
14
14
  // src/internal/exceptions.ts
15
15
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -3531,6 +3531,7 @@ var ScholarClient = class {
3531
3531
  };
3532
3532
 
3533
3533
  // src/google/search.ts
3534
+ var FULL_SEARCH_ONLY = ["mode", "ai_overview", "expand_related_questions"];
3534
3535
  var SearchClient2 = class {
3535
3536
  constructor(client) {
3536
3537
  this.client = client;
@@ -3539,17 +3540,59 @@ var SearchClient2 = class {
3539
3540
  * Search Google and get a structured SERP response with organic results,
3540
3541
  * knowledge graph, People Also Ask, related searches, AI overview, and
3541
3542
  * pagination.
3543
+ *
3544
+ * The response (untyped, `Record<string, unknown>`) holds, when Google
3545
+ * shows them:
3546
+ * - `search_information`: total_results, time_taken, query_displayed,
3547
+ * organic_results_state (`"no_results"` on an explicit Google
3548
+ * no-results answer, `"Results for relaxed query"` when Google drops
3549
+ * quotes).
3550
+ * - `organic_results`: position, title, link, snippet, displayed_link,
3551
+ * plus `date`, `sitelinks`, `rich_snippet` and `read_more_link`.
3552
+ * - `related_questions`: question, rank, `type` (`"ai_overview"` or
3553
+ * `null`), and `text_blocks` / `references` with
3554
+ * `expand_related_questions`.
3555
+ * - `ai_overview`: `text_blocks` (paragraph, heading and list blocks; list
3556
+ * blocks carry `list_items`) with `reference_indexes` (0-based into
3557
+ * `references`), and `references` (title, link, source, snippet, logo).
3558
+ * - `shopping_results`: position, category, title, price, extracted_price,
3559
+ * original_price, extracted_original_price, source, rating, reviews,
3560
+ * delivery, extensions, thumbnail, product_id, catalog_id, product_link,
3561
+ * scrapebadger_product_detail_link.
3562
+ * - `perspectives`, `discussions_and_forums`, `short_videos`,
3563
+ * `things_to_know`, `ads`, `knowledge_graph`, `people_also_search_for`,
3564
+ * `related_searches`, `local_results`, `inline_videos`, `pagination`.
3565
+ *
3566
+ * A full-mode query with a `site:` operator is answered from Google's Web
3567
+ * tab: organic results, related searches and pagination only, rich blocks
3568
+ * empty (pass `ai_overview: true` for the full page).
3569
+ *
3570
+ * @example
3571
+ * ```typescript
3572
+ * // People Also Ask answers for the first two questions
3573
+ * const serp = await client.google.search.search({
3574
+ * q: "are noise cancelling headphones worth it",
3575
+ * expand_related_questions: 2,
3576
+ * });
3577
+ * ```
3542
3578
  */
3543
3579
  async search(params) {
3544
3580
  return this.client.request("/v1/google/search", { params: { ...params } });
3545
3581
  }
3546
3582
  /**
3547
- * Lightweight Google Search — organic results + related searches only.
3583
+ * Google Light Search — organic results + related searches only.
3584
+ *
3585
+ * Calls the dedicated `/v1/google/light/search` endpoint, billed at the
3586
+ * Light rate (half of full {@link search}; query `/public/pricing` for the
3587
+ * live rate). Skips ads, Knowledge Graph, AI Overview, People Also Ask,
3588
+ * local pack, news, inline videos, and shopping blocks. Has a 12-second
3589
+ * processing budget; past it the API returns `503` with
3590
+ * `Retry-After: 60`. Light cannot be upgraded to full Search, so
3591
+ * `ai_overview` is not sent; AI Overview and People Also Ask answers
3592
+ * (`expand_related_questions`) need {@link search}.
3548
3593
  *
3549
- * ~40% faster than {@link search}. Skips ads, Knowledge Graph, AI
3550
- * Overview, local pack, news, inline videos, and shopping blocks.
3551
- * Credit cost is configured per-endpoint by admins — query
3552
- * `/public/pricing` for the live rate.
3594
+ * Returns `{ search_information, organic_results, related_searches,
3595
+ * pagination }`.
3553
3596
  *
3554
3597
  * @example
3555
3598
  * ```typescript
@@ -3557,9 +3600,9 @@ var SearchClient2 = class {
3557
3600
  * ```
3558
3601
  */
3559
3602
  async light(params) {
3560
- return this.client.request("/v1/google/search", {
3561
- params: { ...params, mode: "fast" }
3562
- });
3603
+ const light = { ...params };
3604
+ for (const key of FULL_SEARCH_ONLY) delete light[key];
3605
+ return this.client.request("/v1/google/light/search", { params: light });
3563
3606
  }
3564
3607
  };
3565
3608
 
@@ -3758,6 +3801,10 @@ var GoogleClient = class {
3758
3801
  async googleFlightsCalendarCheapestFarePerDate(params = {}) {
3759
3802
  return this._gen.request("/v1/google/flights/calendar", { params });
3760
3803
  }
3804
+ /** Google Light web search. Generated from the OpenAPI spec; returns the raw response object. */
3805
+ async googleLightWebSearch(params = {}) {
3806
+ return this._gen.request("/v1/google/light/search", { params });
3807
+ }
3761
3808
  // --- END generated by sdk/codegen/facade ---
3762
3809
  };
3763
3810
 
@@ -4581,6 +4628,26 @@ var AsosClient = class {
4581
4628
  }
4582
4629
  };
4583
4630
 
4631
+ // src/autoscout24/client.ts
4632
+ var Autoscout24Client = class {
4633
+ client;
4634
+ constructor(client) {
4635
+ this.client = client;
4636
+ }
4637
+ /** List search filters. Generated from the OpenAPI spec; returns the raw response object. */
4638
+ async listSearchFilters(params = {}) {
4639
+ return this.client.request("/v1/autoscout24/filters", { params });
4640
+ }
4641
+ /** List markets. Generated from the OpenAPI spec; returns the raw response object. */
4642
+ async listMarkets(params = {}) {
4643
+ return this.client.request("/v1/autoscout24/markets", { params });
4644
+ }
4645
+ /** Search vehicles. Generated from the OpenAPI spec; returns the raw response object. */
4646
+ async searchVehicles(params = {}) {
4647
+ return this.client.request("/v1/autoscout24/search", { params });
4648
+ }
4649
+ };
4650
+
4584
4651
  // src/instagram/users.ts
4585
4652
  var UsersClient4 = class {
4586
4653
  client;
@@ -4983,6 +5050,18 @@ var AccountClient = class {
4983
5050
  async getAccountInfo(params = {}) {
4984
5051
  return this.client.request("/v1/account/me", { params });
4985
5052
  }
5053
+ /** Get the webhook signing secret. Generated from the OpenAPI spec; returns the raw response object. */
5054
+ async getTheWebhookSigningSecret(params = {}) {
5055
+ return this.client.request("/v1/account/webhook-secret", { params });
5056
+ }
5057
+ /** Rotate the webhook signing secret. Generated from the OpenAPI spec; returns the raw response object. */
5058
+ async rotateTheWebhookSigningSecret(body, params = {}) {
5059
+ return this.client.request("/v1/account/webhook-secret/rotate", {
5060
+ method: "POST",
5061
+ params,
5062
+ body
5063
+ });
5064
+ }
4986
5065
  };
4987
5066
 
4988
5067
  // src/agent/client.ts
@@ -6545,6 +6624,10 @@ var FacebookClient = class {
6545
6624
  async listLocations(params = {}) {
6546
6625
  return this.client.request("/v1/facebook/marketplace/locations", { params });
6547
6626
  }
6627
+ /** Resolve a town/postcode to a Marketplace location. Generated from the OpenAPI spec; returns the raw response object. */
6628
+ async resolveATownPostcodeToAMarketplaceLocation(params = {}) {
6629
+ return this.client.request("/v1/facebook/marketplace/locations/resolve", { params });
6630
+ }
6548
6631
  /** Search Marketplace. Generated from the OpenAPI spec; returns the raw response object. */
6549
6632
  async searchMarketplace(params = {}) {
6550
6633
  return this.client.request("/v1/facebook/marketplace/search", { params });
@@ -7325,6 +7408,38 @@ var BookingClient = class {
7325
7408
  }
7326
7409
  };
7327
7410
 
7411
+ // src/brave/client.ts
7412
+ var BraveClient = class {
7413
+ client;
7414
+ constructor(client) {
7415
+ this.client = client;
7416
+ }
7417
+ /** Autocomplete. Generated from the OpenAPI spec; returns the raw response object. */
7418
+ async autocomplete(params = {}) {
7419
+ return this.client.request("/v1/brave/autocomplete", { params });
7420
+ }
7421
+ /** Image search. Generated from the OpenAPI spec; returns the raw response object. */
7422
+ async imageSearch(params = {}) {
7423
+ return this.client.request("/v1/brave/images", { params });
7424
+ }
7425
+ /** List supported locales. Generated from the OpenAPI spec; returns the raw response object. */
7426
+ async listSupportedLocales(params = {}) {
7427
+ return this.client.request("/v1/brave/locales", { params });
7428
+ }
7429
+ /** News search. Generated from the OpenAPI spec; returns the raw response object. */
7430
+ async newsSearch(params = {}) {
7431
+ return this.client.request("/v1/brave/news", { params });
7432
+ }
7433
+ /** Web search. Generated from the OpenAPI spec; returns the raw response object. */
7434
+ async webSearch(params = {}) {
7435
+ return this.client.request("/v1/brave/search", { params });
7436
+ }
7437
+ /** Video search. Generated from the OpenAPI spec; returns the raw response object. */
7438
+ async videoSearch(params = {}) {
7439
+ return this.client.request("/v1/brave/videos", { params });
7440
+ }
7441
+ };
7442
+
7328
7443
  // src/baidu/client.ts
7329
7444
  var BaiduClient = class {
7330
7445
  client;
@@ -7396,6 +7511,18 @@ var BaiduClient = class {
7396
7511
  }
7397
7512
  };
7398
7513
 
7514
+ // src/batch/client.ts
7515
+ var BatchClient = class {
7516
+ client;
7517
+ constructor(client) {
7518
+ this.client = client;
7519
+ }
7520
+ /** Submit a batch of async requests. Generated from the OpenAPI spec; returns the raw response object. */
7521
+ async submitABatchOfAsyncRequests(body, params = {}) {
7522
+ return this.client.request("/v1/batch", { method: "POST", params, body });
7523
+ }
7524
+ };
7525
+
7399
7526
  // src/bestbuy/client.ts
7400
7527
  var BestbuyClient = class {
7401
7528
  client;
@@ -10556,6 +10683,18 @@ var GeminiClient = class {
10556
10683
  // --- END generated by sdk/codegen/facade ---
10557
10684
  };
10558
10685
 
10686
+ // src/github/client.ts
10687
+ var GithubClient = class {
10688
+ client;
10689
+ constructor(client) {
10690
+ this.client = client;
10691
+ }
10692
+ /** Get profile. Generated from the OpenAPI spec; returns the raw response object. */
10693
+ async getProfile(username, params = {}) {
10694
+ return this.client.request(`/v1/github/profiles/${username}`, { params });
10695
+ }
10696
+ };
10697
+
10559
10698
  // src/client.ts
10560
10699
  var ScrapeBadger = class {
10561
10700
  baseClient;
@@ -10579,6 +10718,8 @@ var ScrapeBadger = class {
10579
10718
  app_store;
10580
10719
  /** Asos API client. (Generated from the OpenAPI spec.) */
10581
10720
  asos;
10721
+ /** Autoscout24 API client. (Generated from the OpenAPI spec.) */
10722
+ autoscout24;
10582
10723
  /** Instagram scraper API client — users, media, search, hashtags, locations, audio */
10583
10724
  instagram;
10584
10725
  /** Redfin scraper API client — search, property, agent, autocomplete, markets (redfin.com, US) */
@@ -10619,8 +10760,12 @@ var ScrapeBadger = class {
10619
10760
  bing;
10620
10761
  /** Booking API client. (Generated from the OpenAPI spec.) */
10621
10762
  booking;
10763
+ /** Brave API client. (Generated from the OpenAPI spec.) */
10764
+ brave;
10622
10765
  /** Baidu scraper API client — search, news, images, autocomplete (baidu.com, China's #1 search engine) */
10623
10766
  baidu;
10767
+ /** Batch API client. (Generated from the OpenAPI spec.) */
10768
+ batch;
10624
10769
  /** Bestbuy API client. (Generated from the OpenAPI spec.) */
10625
10770
  bestbuy;
10626
10771
  /** Naver scraper API client — 55 endpoints (search, places, shopping, stores, content, reviews, products, shopping live; naver.com, South Korea) */
@@ -10655,6 +10800,8 @@ var ScrapeBadger = class {
10655
10800
  copilot;
10656
10801
  /** Gemini scraper API client — ask, brand visibility (the real gemini.google.com, anonymous) */
10657
10802
  gemini;
10803
+ /** Github API client. (Generated from the OpenAPI spec.) */
10804
+ github;
10658
10805
  /**
10659
10806
  * Create a new ScrapeBadger client.
10660
10807
  *
@@ -10699,6 +10846,7 @@ var ScrapeBadger = class {
10699
10846
  this.apartments = new ApartmentsClient(this.baseClient);
10700
10847
  this.app_store = new AppStoreClient(this.baseClient);
10701
10848
  this.asos = new AsosClient(this.baseClient);
10849
+ this.autoscout24 = new Autoscout24Client(this.baseClient);
10702
10850
  this.instagram = new InstagramClient(this.baseClient);
10703
10851
  this.redfin = new RedfinClient(this.baseClient);
10704
10852
  this.account = new AccountClient(this.baseClient);
@@ -10719,7 +10867,9 @@ var ScrapeBadger = class {
10719
10867
  this.duckduckgo = new DuckDuckGoClient(this.baseClient);
10720
10868
  this.bing = new BingClient(this.baseClient);
10721
10869
  this.booking = new BookingClient(this.baseClient);
10870
+ this.brave = new BraveClient(this.baseClient);
10722
10871
  this.baidu = new BaiduClient(this.baseClient);
10872
+ this.batch = new BatchClient(this.baseClient);
10723
10873
  this.bestbuy = new BestbuyClient(this.baseClient);
10724
10874
  this.naver = new NaverClient(this.baseClient);
10725
10875
  this.yahoo = new YahooClient(this.baseClient);
@@ -10737,6 +10887,7 @@ var ScrapeBadger = class {
10737
10887
  this.chatgpt = new ChatGPTClient(this.baseClient);
10738
10888
  this.copilot = new CopilotClient(this.baseClient);
10739
10889
  this.gemini = new GeminiClient(this.baseClient);
10890
+ this.github = new GithubClient(this.baseClient);
10740
10891
  }
10741
10892
  };
10742
10893
 
@@ -10910,5 +11061,5 @@ exports.ZillowReferenceClient = ReferenceClient14;
10910
11061
  exports.ZillowSearchClient = SearchClient18;
10911
11062
  exports.collectAll = collectAll;
10912
11063
  exports.verifyWebhookSignature = verifyWebhookSignature;
10913
- //# sourceMappingURL=index.js.map
10914
- //# sourceMappingURL=index.js.map
11064
+ //# sourceMappingURL=index.cjs.map
11065
+ //# sourceMappingURL=index.cjs.map