scrapebadger 0.33.1 → 0.34.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
@@ -6291,8 +6291,160 @@ var BaiduClient = class {
6291
6291
  }
6292
6292
  };
6293
6293
 
6294
- // src/yandex/search.ts
6294
+ // src/yahoo/search.ts
6295
6295
  var SearchClient12 = class {
6296
+ constructor(client) {
6297
+ this.client = client;
6298
+ }
6299
+ /**
6300
+ * Search yahoo.com — the web SERP.
6301
+ *
6302
+ * Yahoo serves 7 organic results per page, so `offset` moves in steps of 7
6303
+ * (page 2 is `offset: 7`). There is no page-size parameter.
6304
+ *
6305
+ * @param query - Search keywords, e.g. `"coffee machine"`.
6306
+ * @param params - Optional market, offset and safe-search filter.
6307
+ * @returns A page of organic results, ads and related searches.
6308
+ */
6309
+ async search(query, params = {}) {
6310
+ return this.client.request("/v1/yahoo/search", {
6311
+ params: {
6312
+ query,
6313
+ market: params.market,
6314
+ offset: params.offset,
6315
+ safe_search: params.safe_search
6316
+ }
6317
+ });
6318
+ }
6319
+ /**
6320
+ * Yahoo search-box suggestions — the cheapest call in this API.
6321
+ *
6322
+ * @param query - Partial search term, e.g. `"coff"`.
6323
+ * @param params - Optional market.
6324
+ */
6325
+ async autocomplete(query, params = {}) {
6326
+ return this.client.request("/v1/yahoo/autocomplete", {
6327
+ params: {
6328
+ query,
6329
+ market: params.market
6330
+ }
6331
+ });
6332
+ }
6333
+ };
6334
+
6335
+ // src/yahoo/media.ts
6336
+ var MediaClient4 = class {
6337
+ constructor(client) {
6338
+ this.client = client;
6339
+ }
6340
+ /**
6341
+ * Search Yahoo images.
6342
+ *
6343
+ * Yahoo renders ~60 tiles server-side with no native page-size parameter,
6344
+ * so `count` trims the list rather than paginating.
6345
+ *
6346
+ * @param query - Search keywords, e.g. `"cats"`.
6347
+ * @param params - Optional market and count.
6348
+ * @returns Full-size image URLs, thumbnails, pixel dimensions and the
6349
+ * source page each image came from.
6350
+ */
6351
+ async images(query, params = {}) {
6352
+ return this.client.request("/v1/yahoo/images", {
6353
+ params: {
6354
+ query,
6355
+ market: params.market,
6356
+ count: params.count
6357
+ }
6358
+ });
6359
+ }
6360
+ /**
6361
+ * Search Yahoo videos.
6362
+ *
6363
+ * Like images, Yahoo has no native page-size parameter here, so `count`
6364
+ * trims the returned list.
6365
+ *
6366
+ * @param query - Search keywords, e.g. `"cats"`.
6367
+ * @param params - Optional market and count.
6368
+ * @returns Video URLs, thumbnails, duration, host platform and view counts.
6369
+ */
6370
+ async videos(query, params = {}) {
6371
+ return this.client.request("/v1/yahoo/videos", {
6372
+ params: {
6373
+ query,
6374
+ market: params.market,
6375
+ count: params.count
6376
+ }
6377
+ });
6378
+ }
6379
+ };
6380
+
6381
+ // src/yahoo/news.ts
6382
+ var NewsClient3 = class {
6383
+ constructor(client) {
6384
+ this.client = client;
6385
+ }
6386
+ /**
6387
+ * Search the Yahoo news vertical.
6388
+ *
6389
+ * @param query - Search keywords, e.g. `"artificial intelligence"`.
6390
+ * @param params - Optional market.
6391
+ * @returns Articles carrying publisher, syndication source and real URLs.
6392
+ * `published` is a relative age string (`"26 minutes ago"`) — Yahoo
6393
+ * renders no absolute date.
6394
+ */
6395
+ async news(query, params = {}) {
6396
+ return this.client.request("/v1/yahoo/news", {
6397
+ params: {
6398
+ query,
6399
+ market: params.market
6400
+ }
6401
+ });
6402
+ }
6403
+ };
6404
+
6405
+ // src/yahoo/reference.ts
6406
+ var ReferenceClient9 = class {
6407
+ constructor(client) {
6408
+ this.client = client;
6409
+ }
6410
+ /**
6411
+ * Get the supported Yahoo markets.
6412
+ *
6413
+ * Yahoo Japan (`search.yahoo.co.jp`) is a separate engine and is not
6414
+ * covered by this API.
6415
+ *
6416
+ * @returns Every Yahoo market code, name, country and regional search host.
6417
+ */
6418
+ async markets() {
6419
+ return this.client.request("/v1/yahoo/markets");
6420
+ }
6421
+ };
6422
+
6423
+ // src/yahoo/client.ts
6424
+ var YahooClient = class {
6425
+ /** Client for web search and search-box autocomplete */
6426
+ search;
6427
+ /** Client for image search and video search */
6428
+ media;
6429
+ /** Client for the news vertical */
6430
+ news;
6431
+ /** Client for reference data (markets) */
6432
+ reference;
6433
+ /**
6434
+ * Create a new Yahoo client.
6435
+ *
6436
+ * @param client - The base HTTP client for making requests.
6437
+ */
6438
+ constructor(client) {
6439
+ this.search = new SearchClient12(client);
6440
+ this.media = new MediaClient4(client);
6441
+ this.news = new NewsClient3(client);
6442
+ this.reference = new ReferenceClient9(client);
6443
+ }
6444
+ };
6445
+
6446
+ // src/yandex/search.ts
6447
+ var SearchClient13 = class {
6296
6448
  constructor(client) {
6297
6449
  this.client = client;
6298
6450
  }
@@ -6353,7 +6505,7 @@ var ImagesClient2 = class {
6353
6505
  };
6354
6506
 
6355
6507
  // src/yandex/reference.ts
6356
- var ReferenceClient9 = class {
6508
+ var ReferenceClient10 = class {
6357
6509
  constructor(client) {
6358
6510
  this.client = client;
6359
6511
  }
@@ -6379,14 +6531,14 @@ var YandexClient = class {
6379
6531
  * @param client - The base HTTP client for making requests.
6380
6532
  */
6381
6533
  constructor(client) {
6382
- this.search = new SearchClient12(client);
6534
+ this.search = new SearchClient13(client);
6383
6535
  this.images = new ImagesClient2(client);
6384
- this.reference = new ReferenceClient9(client);
6536
+ this.reference = new ReferenceClient10(client);
6385
6537
  }
6386
6538
  };
6387
6539
 
6388
6540
  // src/youtube/search.ts
6389
- var SearchClient13 = class {
6541
+ var SearchClient14 = class {
6390
6542
  client;
6391
6543
  constructor(client) {
6392
6544
  this.client = client;
@@ -6911,7 +7063,7 @@ var MusicClient2 = class {
6911
7063
  };
6912
7064
 
6913
7065
  // src/youtube/reference.ts
6914
- var ReferenceClient10 = class {
7066
+ var ReferenceClient11 = class {
6915
7067
  client;
6916
7068
  constructor(client) {
6917
7069
  this.client = client;
@@ -6979,7 +7131,7 @@ var YoutubeClient = class {
6979
7131
  * @param client - The base HTTP client for making requests.
6980
7132
  */
6981
7133
  constructor(client) {
6982
- this.search = new SearchClient13(client);
7134
+ this.search = new SearchClient14(client);
6983
7135
  this.videos = new VideosClient3(client);
6984
7136
  this.channels = new ChannelsClient(client);
6985
7137
  this.playlists = new PlaylistsClient(client);
@@ -6987,12 +7139,12 @@ var YoutubeClient = class {
6987
7139
  this.shorts = new ShortsClient2(client);
6988
7140
  this.trending = new TrendingClient2(client);
6989
7141
  this.music = new MusicClient2(client);
6990
- this.reference = new ReferenceClient10(client);
7142
+ this.reference = new ReferenceClient11(client);
6991
7143
  }
6992
7144
  };
6993
7145
 
6994
7146
  // src/realtor/search.ts
6995
- var SearchClient14 = class {
7147
+ var SearchClient15 = class {
6996
7148
  client;
6997
7149
  constructor(client) {
6998
7150
  this.client = client;
@@ -7066,7 +7218,7 @@ var PropertiesClient = class {
7066
7218
  };
7067
7219
 
7068
7220
  // src/realtor/reference.ts
7069
- var ReferenceClient11 = class {
7221
+ var ReferenceClient12 = class {
7070
7222
  client;
7071
7223
  constructor(client) {
7072
7224
  this.client = client;
@@ -7095,14 +7247,14 @@ var RealtorClient = class {
7095
7247
  * @param client - The base HTTP client for making requests.
7096
7248
  */
7097
7249
  constructor(client) {
7098
- this.search = new SearchClient14(client);
7250
+ this.search = new SearchClient15(client);
7099
7251
  this.properties = new PropertiesClient(client);
7100
- this.reference = new ReferenceClient11(client);
7252
+ this.reference = new ReferenceClient12(client);
7101
7253
  }
7102
7254
  };
7103
7255
 
7104
7256
  // src/leboncoin/search.ts
7105
- var SearchClient15 = class {
7257
+ var SearchClient16 = class {
7106
7258
  client;
7107
7259
  constructor(client) {
7108
7260
  this.client = client;
@@ -7204,7 +7356,7 @@ var SellersClient4 = class {
7204
7356
  };
7205
7357
 
7206
7358
  // src/leboncoin/reference.ts
7207
- var ReferenceClient12 = class {
7359
+ var ReferenceClient13 = class {
7208
7360
  client;
7209
7361
  constructor(client) {
7210
7362
  this.client = client;
@@ -7275,15 +7427,15 @@ var LeboncoinClient = class {
7275
7427
  * @param client - The base HTTP client for making requests.
7276
7428
  */
7277
7429
  constructor(client) {
7278
- this.search = new SearchClient15(client);
7430
+ this.search = new SearchClient16(client);
7279
7431
  this.ads = new AdsClient2(client);
7280
7432
  this.sellers = new SellersClient4(client);
7281
- this.reference = new ReferenceClient12(client);
7433
+ this.reference = new ReferenceClient13(client);
7282
7434
  }
7283
7435
  };
7284
7436
 
7285
7437
  // src/zillow/search.ts
7286
- var SearchClient16 = class {
7438
+ var SearchClient17 = class {
7287
7439
  client;
7288
7440
  constructor(client) {
7289
7441
  this.client = client;
@@ -7387,7 +7539,7 @@ var AgentClient = class {
7387
7539
  };
7388
7540
 
7389
7541
  // src/zillow/reference.ts
7390
- var ReferenceClient13 = class {
7542
+ var ReferenceClient14 = class {
7391
7543
  client;
7392
7544
  constructor(client) {
7393
7545
  this.client = client;
@@ -7418,10 +7570,10 @@ var ZillowClient = class {
7418
7570
  * @param client - The base HTTP client for making requests.
7419
7571
  */
7420
7572
  constructor(client) {
7421
- this.search = new SearchClient16(client);
7573
+ this.search = new SearchClient17(client);
7422
7574
  this.properties = new PropertiesClient2(client);
7423
7575
  this.agent = new AgentClient(client);
7424
- this.reference = new ReferenceClient13(client);
7576
+ this.reference = new ReferenceClient14(client);
7425
7577
  }
7426
7578
  };
7427
7579
 
@@ -7556,7 +7708,7 @@ var ImmobiliareClient = class {
7556
7708
  };
7557
7709
 
7558
7710
  // src/loopnet/search.ts
7559
- var SearchClient17 = class {
7711
+ var SearchClient18 = class {
7560
7712
  client;
7561
7713
  constructor(client) {
7562
7714
  this.client = client;
@@ -7637,7 +7789,7 @@ var BrokersClient = class {
7637
7789
  };
7638
7790
 
7639
7791
  // src/loopnet/reference.ts
7640
- var ReferenceClient14 = class {
7792
+ var ReferenceClient15 = class {
7641
7793
  client;
7642
7794
  constructor(client) {
7643
7795
  this.client = client;
@@ -7680,10 +7832,10 @@ var LoopNetClient = class {
7680
7832
  * @param client - The base HTTP client for making requests.
7681
7833
  */
7682
7834
  constructor(client) {
7683
- this.search = new SearchClient17(client);
7835
+ this.search = new SearchClient18(client);
7684
7836
  this.listings = new ListingsClient2(client);
7685
7837
  this.brokers = new BrokersClient(client);
7686
- this.reference = new ReferenceClient14(client);
7838
+ this.reference = new ReferenceClient15(client);
7687
7839
  }
7688
7840
  };
7689
7841
 
@@ -8044,7 +8196,7 @@ var BrandClient = class {
8044
8196
  };
8045
8197
 
8046
8198
  // src/chatgpt/reference.ts
8047
- var ReferenceClient15 = class {
8199
+ var ReferenceClient16 = class {
8048
8200
  client;
8049
8201
  constructor(client) {
8050
8202
  this.client = client;
@@ -8090,7 +8242,7 @@ var ChatGPTClient = class {
8090
8242
  constructor(client) {
8091
8243
  this.ask = new AskClient(client);
8092
8244
  this.brand = new BrandClient(client);
8093
- this.reference = new ReferenceClient15(client);
8245
+ this.reference = new ReferenceClient16(client);
8094
8246
  }
8095
8247
  };
8096
8248
 
@@ -8129,6 +8281,8 @@ var ScrapeBadger = class {
8129
8281
  bing;
8130
8282
  /** Baidu scraper API client — search, news, images, autocomplete (baidu.com, China's #1 search engine) */
8131
8283
  baidu;
8284
+ /** Yahoo scraper API client — 6 endpoints (search, images, videos, news, autocomplete, markets) across 35 markets */
8285
+ yahoo;
8132
8286
  /** Yandex scraper API client — web search, image search, reverse-image (CBIR), markets (tr/com/ru/by/kz/uz) */
8133
8287
  yandex;
8134
8288
  /** YouTube scraper API client — 39 endpoints */
@@ -8199,6 +8353,7 @@ var ScrapeBadger = class {
8199
8353
  this.duckduckgo = new DuckDuckGoClient(this.baseClient);
8200
8354
  this.bing = new BingClient(this.baseClient);
8201
8355
  this.baidu = new BaiduClient(this.baseClient);
8356
+ this.yahoo = new YahooClient(this.baseClient);
8202
8357
  this.yandex = new YandexClient(this.baseClient);
8203
8358
  this.youtube = new YoutubeClient(this.baseClient);
8204
8359
  this.realtor = new RealtorClient(this.baseClient);
@@ -8230,7 +8385,7 @@ exports.BingSearchClient = SearchClient11;
8230
8385
  exports.ChatGPTAskClient = AskClient;
8231
8386
  exports.ChatGPTBrandClient = BrandClient;
8232
8387
  exports.ChatGPTClient = ChatGPTClient;
8233
- exports.ChatGPTReferenceClient = ReferenceClient15;
8388
+ exports.ChatGPTReferenceClient = ReferenceClient16;
8234
8389
  exports.CommunitiesClient = CommunitiesClient;
8235
8390
  exports.ConflictError = ConflictError;
8236
8391
  exports.DepopClient = DepopClient;
@@ -8275,22 +8430,22 @@ exports.InstagramUsersClient = UsersClient4;
8275
8430
  exports.InsufficientCreditsError = InsufficientCreditsError;
8276
8431
  exports.LeboncoinAdsClient = AdsClient2;
8277
8432
  exports.LeboncoinClient = LeboncoinClient;
8278
- exports.LeboncoinReferenceClient = ReferenceClient12;
8279
- exports.LeboncoinSearchClient = SearchClient15;
8433
+ exports.LeboncoinReferenceClient = ReferenceClient13;
8434
+ exports.LeboncoinSearchClient = SearchClient16;
8280
8435
  exports.LeboncoinSellersClient = SellersClient4;
8281
8436
  exports.LinkedInClient = LinkedInClient;
8282
8437
  exports.ListsClient = ListsClient;
8283
8438
  exports.LoopNetBrokersClient = BrokersClient;
8284
8439
  exports.LoopNetClient = LoopNetClient;
8285
8440
  exports.LoopNetListingsClient = ListingsClient2;
8286
- exports.LoopNetReferenceClient = ReferenceClient14;
8287
- exports.LoopNetSearchClient = SearchClient17;
8441
+ exports.LoopNetReferenceClient = ReferenceClient15;
8442
+ exports.LoopNetSearchClient = SearchClient18;
8288
8443
  exports.NotFoundError = NotFoundError;
8289
8444
  exports.RateLimitError = RateLimitError;
8290
8445
  exports.RealtorClient = RealtorClient;
8291
8446
  exports.RealtorPropertiesClient = PropertiesClient;
8292
- exports.RealtorReferenceClient = ReferenceClient11;
8293
- exports.RealtorSearchClient = SearchClient14;
8447
+ exports.RealtorReferenceClient = ReferenceClient12;
8448
+ exports.RealtorSearchClient = SearchClient15;
8294
8449
  exports.RedditClient = RedditClient;
8295
8450
  exports.RedditPostsClient = PostsClient;
8296
8451
  exports.RedditSearchClient = SearchClient3;
@@ -8335,25 +8490,30 @@ exports.WalmartSellersClient = SellersClient3;
8335
8490
  exports.WalmartStoresClient = StoresClient;
8336
8491
  exports.WebClient = WebClient;
8337
8492
  exports.WebSocketStreamError = WebSocketStreamError;
8493
+ exports.YahooClient = YahooClient;
8494
+ exports.YahooMediaClient = MediaClient4;
8495
+ exports.YahooNewsClient = NewsClient3;
8496
+ exports.YahooReferenceClient = ReferenceClient9;
8497
+ exports.YahooSearchClient = SearchClient12;
8338
8498
  exports.YandexClient = YandexClient;
8339
8499
  exports.YandexImagesClient = ImagesClient2;
8340
- exports.YandexReferenceClient = ReferenceClient9;
8341
- exports.YandexSearchClient = SearchClient12;
8500
+ exports.YandexReferenceClient = ReferenceClient10;
8501
+ exports.YandexSearchClient = SearchClient13;
8342
8502
  exports.YoutubeChannelsClient = ChannelsClient;
8343
8503
  exports.YoutubeClient = YoutubeClient;
8344
8504
  exports.YoutubeCommunityClient = CommunityClient;
8345
8505
  exports.YoutubeMusicClient = MusicClient2;
8346
8506
  exports.YoutubePlaylistsClient = PlaylistsClient;
8347
- exports.YoutubeReferenceClient = ReferenceClient10;
8348
- exports.YoutubeSearchClient = SearchClient13;
8507
+ exports.YoutubeReferenceClient = ReferenceClient11;
8508
+ exports.YoutubeSearchClient = SearchClient14;
8349
8509
  exports.YoutubeShortsClient = ShortsClient2;
8350
8510
  exports.YoutubeTrendingClient = TrendingClient2;
8351
8511
  exports.YoutubeVideosClient = VideosClient3;
8352
8512
  exports.ZillowAgentClient = AgentClient;
8353
8513
  exports.ZillowClient = ZillowClient;
8354
8514
  exports.ZillowPropertiesClient = PropertiesClient2;
8355
- exports.ZillowReferenceClient = ReferenceClient13;
8356
- exports.ZillowSearchClient = SearchClient16;
8515
+ exports.ZillowReferenceClient = ReferenceClient14;
8516
+ exports.ZillowSearchClient = SearchClient17;
8357
8517
  exports.collectAll = collectAll;
8358
8518
  exports.verifyWebhookSignature = verifyWebhookSignature;
8359
8519
  //# sourceMappingURL=index.js.map