scrapebadger 0.73.0 → 0.75.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/README.md CHANGED
@@ -104,6 +104,7 @@ Etsy and AliExpress category navigation is separate from search: their search me
104
104
  | **Vinted** | Search items, get details, user profiles, and reference data across all Vinted markets | [Vinted Guide](docs/vinted.md) |
105
105
  | **Wallapop** | 10 endpoints across 3 markets (es, it, pt) — listing search with Wallapop's own filters (incl. cars: year, km, gearbox, horsepower), listing detail, seller profile/listings/reviews, autocomplete, categories, search filters and filter options, markets | [Wallapop Docs](https://docs.scrapebadger.com/wallapop/overview) |
106
106
  | **Reddit** | Search posts/subreddits/users, subreddit details, post comments, user profiles, wiki pages, trophies | [Reddit Guide](docs/reddit.md) |
107
+ | **GitHub** | 2 endpoints — public user and organization profiles (overview with README and contributions, repositories, and user stars tabs) and public repository detail (identity, fork comparison, latest commit and checks, README, root files, languages, latest release, contributors, dependents, funding, community files). E.g. `client.github.getRepository("octocat", "Hello-World")` | [GitHub Docs](https://docs.scrapebadger.com/github/overview) |
107
108
  | **Instagram** | User profile/about/related/posts/videos/reels/tagged/pinned/followers/following/stories/highlights, media detail/comments/replies/likers/oEmbed, search (users/hashtags/places/top/reels/music/autocomplete), hashtag/location/audio feeds | [Instagram Guide](docs/instagram.md) |
108
109
  | **Amazon** | 14 endpoints — search, autocomplete, product detail, offers, reviews, bestsellers, new releases, deals, category browse, seller profile/products/feedback, markets, categories | [Amazon Guide](docs/amazon.md) |
109
110
  | **Shopee** | 6 endpoints across 11 markets (sg, my, ph, id, vn, th, tw, br, co, cl, mx) — product search, category items, product detail, reviews, category tree, markets | [Shopee Guide](docs/shopee.md) |
@@ -112,6 +113,7 @@ Etsy and AliExpress category navigation is separate from search: their search me
112
113
  | **Walmart** | 11 endpoints (walmart.com, US-only) — search, category browse, deals feed, autocomplete, product detail, reviews, seller profile/products, store detail with nearby stores, markets |
113
114
  | **Gumtree** | 9 endpoints across gumtree.com, gumtree.com.au and gumtree.co.za (`market: "uk"` default, `"au"`, `"za"`) — search (category, location/postcode radius, price, seller type, urgent/photos, category-specific filters), search filters with live counts, listing detail (full vehicle spec, seller rating/verification, masked phone), seller listings, keyword and location autocomplete, location and category trees, markets. E.g. `client.gumtree.search({ market: "au", category: "18320", location: "3003435", distance: 10 })` or `client.gumtree.search({ market: "za", category: "p6dnh", location: "dkp8y" })` (za ids are refs) | [Gumtree Docs](https://docs.scrapebadger.com/gumtree/overview) |
114
115
  | **AutoScout24** | 4 endpoints — search, listing detail (URL or UUID), filters, markets | [AutoScout24 Docs](https://docs.scrapebadger.com/autoscout24/overview) |
116
+ | **Yelp** | 2 endpoints — business search (location, query, category alias, sort, price, 8 feature refinements, pages 1–11, ads separate) and markets (us, ca). E.g. `client.yelp.searchBusinesses({ location: "San Francisco, CA", query: "pizza" })` | [Yelp Docs](https://docs.scrapebadger.com/yelp/overview) |
115
117
  | **Bing** | 6 endpoints — web search (with ads + related searches), image search, video search, news vertical, autocomplete, markets |
116
118
  | **DuckDuckGo** | 7 endpoints — web search (with instant-answer abstract), image search, news vertical, video search, autocomplete, instant answers, regions |
117
119
  | **Yahoo** | 6 endpoints across 35 markets — web search (with ads + related searches), image search, video search, news vertical, autocomplete, markets | [Yahoo Docs](https://docs.scrapebadger.com/yahoo/overview) |
package/dist/index.cjs 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.73.0";
12
+ var SDK_VERSION = "0.75.0";
13
13
 
14
14
  // src/internal/exceptions.ts
15
15
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -366,6 +366,9 @@ var BaseClient = class _BaseClient {
366
366
  async handleResponse(response) {
367
367
  let data;
368
368
  const contentType = response.headers.get("content-type");
369
+ if (response.ok && contentType?.includes("text/html")) {
370
+ return await response.text();
371
+ }
369
372
  if (contentType?.includes("application/json")) {
370
373
  data = await response.json();
371
374
  } else {
@@ -3536,73 +3539,17 @@ var SearchClient2 = class {
3536
3539
  constructor(client) {
3537
3540
  this.client = client;
3538
3541
  }
3539
- /**
3540
- * Search Google and get a structured SERP response with organic results,
3541
- * knowledge graph, People Also Ask, related searches, AI overview, and
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
- * ```
3578
- */
3579
3542
  async search(params) {
3580
- return this.client.request("/v1/google/search", { params: { ...params } });
3543
+ return this.client.request("/v1/google/search", {
3544
+ params: { ...params }
3545
+ });
3581
3546
  }
3582
- /**
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}.
3593
- *
3594
- * Returns `{ search_information, organic_results, related_searches,
3595
- * pagination }`.
3596
- *
3597
- * @example
3598
- * ```typescript
3599
- * const lite = await client.google.search.light({ q: "python 3.13" });
3600
- * ```
3601
- */
3602
3547
  async light(params) {
3603
3548
  const light = { ...params };
3604
3549
  for (const key of FULL_SEARCH_ONLY) delete light[key];
3605
- return this.client.request("/v1/google/light/search", { params: light });
3550
+ return this.client.request("/v1/google/light/search", {
3551
+ params: light
3552
+ });
3606
3553
  }
3607
3554
  };
3608
3555
 
@@ -4638,6 +4585,10 @@ var Autoscout24Client = class {
4638
4585
  async listSearchFilters(params = {}) {
4639
4586
  return this.client.request("/v1/autoscout24/filters", { params });
4640
4587
  }
4588
+ /** Get listing. Generated from the OpenAPI spec; returns the raw response object. */
4589
+ async getListing(params = {}) {
4590
+ return this.client.request("/v1/autoscout24/listing", { params });
4591
+ }
4641
4592
  /** List markets. Generated from the OpenAPI spec; returns the raw response object. */
4642
4593
  async listMarkets(params = {}) {
4643
4594
  return this.client.request("/v1/autoscout24/markets", { params });
@@ -8598,6 +8549,22 @@ var YandexClient = class {
8598
8549
  }
8599
8550
  };
8600
8551
 
8552
+ // src/yelp/client.ts
8553
+ var YelpClient = class {
8554
+ client;
8555
+ constructor(client) {
8556
+ this.client = client;
8557
+ }
8558
+ /** List markets. Generated from the OpenAPI spec; returns the raw response object. */
8559
+ async listMarkets(params = {}) {
8560
+ return this.client.request("/v1/yelp/markets", { params });
8561
+ }
8562
+ /** Search businesses. Generated from the OpenAPI spec; returns the raw response object. */
8563
+ async searchBusinesses(params = {}) {
8564
+ return this.client.request("/v1/yelp/search", { params });
8565
+ }
8566
+ };
8567
+
8601
8568
  // src/youtube/search.ts
8602
8569
  var SearchClient15 = class {
8603
8570
  client;
@@ -10788,6 +10755,8 @@ var ScrapeBadger = class {
10788
10755
  yahoo;
10789
10756
  /** Yandex scraper API client — web search, image search, reverse-image (CBIR), markets (tr/com/ru/by/kz/uz) */
10790
10757
  yandex;
10758
+ /** Yelp API client. (Generated from the OpenAPI spec.) */
10759
+ yelp;
10791
10760
  /** YouTube scraper API client — 39 endpoints */
10792
10761
  youtube;
10793
10762
  /** Realtor scraper API client — 4 endpoints across 2 markets (us, ca) */
@@ -10888,6 +10857,7 @@ var ScrapeBadger = class {
10888
10857
  this.naver = new NaverClient(this.baseClient);
10889
10858
  this.yahoo = new YahooClient(this.baseClient);
10890
10859
  this.yandex = new YandexClient(this.baseClient);
10860
+ this.yelp = new YelpClient(this.baseClient);
10891
10861
  this.youtube = new YoutubeClient(this.baseClient);
10892
10862
  this.realtor = new RealtorClient(this.baseClient);
10893
10863
  this.leboncoin = new LeboncoinClient(this.baseClient);