scrapebadger 0.16.0 → 0.18.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
@@ -3937,6 +3937,101 @@ var RedditClient = class {
3937
3937
  }
3938
3938
  };
3939
3939
 
3940
+ // src/redfin/client.ts
3941
+ var RedfinClient = class {
3942
+ client;
3943
+ constructor(client) {
3944
+ this.client = client;
3945
+ }
3946
+ /**
3947
+ * Search Redfin for for-sale properties.
3948
+ *
3949
+ * @param location - City/state, ZIP, address or neighborhood (required).
3950
+ * @param options - Optional parameters (page, sort, price/beds/baths/sqft/lot
3951
+ * filters, year built, max days on market, bbox override).
3952
+ * @returns Search response with matching listings, map bounds, and pagination.
3953
+ * @throws AuthenticationError - If the API key is invalid.
3954
+ * @throws ValidationError - If the parameters are invalid.
3955
+ */
3956
+ async search(location, options = {}) {
3957
+ return this.client.request("/v1/redfin/search", {
3958
+ params: {
3959
+ location,
3960
+ page: options.page,
3961
+ sort: options.sort,
3962
+ price_min: options.price_min,
3963
+ price_max: options.price_max,
3964
+ beds_min: options.beds_min,
3965
+ baths_min: options.baths_min,
3966
+ home_type: options.home_type,
3967
+ sqft_min: options.sqft_min,
3968
+ sqft_max: options.sqft_max,
3969
+ lot_min: options.lot_min,
3970
+ lot_max: options.lot_max,
3971
+ year_built_min: options.year_built_min,
3972
+ year_built_max: options.year_built_max,
3973
+ max_days_on_market: options.max_days_on_market,
3974
+ north: options.north,
3975
+ south: options.south,
3976
+ east: options.east,
3977
+ west: options.west
3978
+ }
3979
+ });
3980
+ }
3981
+ /**
3982
+ * Get a single Redfin property's full detail by id or URL.
3983
+ *
3984
+ * Provide either `propertyId` or `options.url`.
3985
+ *
3986
+ * @param propertyId - The Redfin property id.
3987
+ * @param options - Optional parameters (url).
3988
+ * @returns Property detail response.
3989
+ * @throws NotFoundError - If the property doesn't exist.
3990
+ */
3991
+ async getProperty(propertyId, options = {}) {
3992
+ if (options.url) {
3993
+ return this.client.request("/v1/redfin/property", {
3994
+ params: { url: options.url }
3995
+ });
3996
+ }
3997
+ return this.client.request(`/v1/redfin/property/${propertyId}`);
3998
+ }
3999
+ /**
4000
+ * Get a Redfin agent's profile and their active listings.
4001
+ *
4002
+ * Provide either `agentId` or `options.url`.
4003
+ *
4004
+ * @param agentId - The Redfin agent slug.
4005
+ * @param options - Optional parameters (url).
4006
+ * @returns Agent profile response with the agent and their listings.
4007
+ * @throws NotFoundError - If the agent doesn't exist.
4008
+ */
4009
+ async getAgent(agentId, options = {}) {
4010
+ return this.client.request("/v1/redfin/agent", {
4011
+ params: { agent_id: agentId, url: options.url }
4012
+ });
4013
+ }
4014
+ /**
4015
+ * Resolve a search term to Redfin locations.
4016
+ *
4017
+ * @param query - Partial location — city, ZIP, address, or neighborhood.
4018
+ * @returns Autocomplete response with location suggestions.
4019
+ */
4020
+ async autocomplete(query) {
4021
+ return this.client.request("/v1/redfin/autocomplete", {
4022
+ params: { query }
4023
+ });
4024
+ }
4025
+ /**
4026
+ * Get all supported Redfin coverage markets.
4027
+ *
4028
+ * @returns Markets response with all supported markets.
4029
+ */
4030
+ async listMarkets() {
4031
+ return this.client.request("/v1/redfin/markets");
4032
+ }
4033
+ };
4034
+
3940
4035
  // src/amazon/search.ts
3941
4036
  var SearchClient4 = class {
3942
4037
  client;
@@ -6228,6 +6323,138 @@ var ImmobiliareClient = class {
6228
6323
  }
6229
6324
  };
6230
6325
 
6326
+ // src/loopnet/search.ts
6327
+ var SearchClient12 = class {
6328
+ client;
6329
+ constructor(client) {
6330
+ this.client = client;
6331
+ }
6332
+ /**
6333
+ * Search LoopNet for for-lease / for-sale / auction commercial listings.
6334
+ *
6335
+ * Costs 10 credits.
6336
+ *
6337
+ * @param params - Search parameters including location, filters, and pagination.
6338
+ * @returns Search results with listing cards and pagination metadata.
6339
+ * @throws AuthenticationError - If the API key is invalid.
6340
+ * @throws ValidationError - If the parameters are invalid.
6341
+ */
6342
+ async search(params) {
6343
+ return this.client.request("/v1/loopnet/search", {
6344
+ params: {
6345
+ location: params.location,
6346
+ market: params.market,
6347
+ listing_type: params.listing_type,
6348
+ property_type: params.property_type,
6349
+ page: params.page,
6350
+ min_price: params.min_price,
6351
+ max_price: params.max_price,
6352
+ price_type: params.price_type,
6353
+ min_size: params.min_size,
6354
+ max_size: params.max_size
6355
+ }
6356
+ });
6357
+ }
6358
+ };
6359
+
6360
+ // src/loopnet/listings.ts
6361
+ var ListingsClient2 = class {
6362
+ client;
6363
+ constructor(client) {
6364
+ this.client = client;
6365
+ }
6366
+ /**
6367
+ * Get a single LoopNet listing's full detail by listing id.
6368
+ *
6369
+ * Costs 12 credits.
6370
+ *
6371
+ * @param listingId - The LoopNet listing id.
6372
+ * @param params - Optional market selector.
6373
+ * @returns Listing detail response.
6374
+ * @throws NotFoundError - If the listing doesn't exist.
6375
+ */
6376
+ async get(listingId, params = {}) {
6377
+ return this.client.request(`/v1/loopnet/listings/${listingId}`, {
6378
+ params: { market: params.market }
6379
+ });
6380
+ }
6381
+ };
6382
+
6383
+ // src/loopnet/brokers.ts
6384
+ var BrokersClient = class {
6385
+ client;
6386
+ constructor(client) {
6387
+ this.client = client;
6388
+ }
6389
+ /**
6390
+ * Get a LoopNet broker's profile and their active listings.
6391
+ *
6392
+ * Costs 8 credits.
6393
+ *
6394
+ * @param slug - The broker's profile URL slug.
6395
+ * @param brokerId - The LoopNet broker id.
6396
+ * @param params - Optional market selector.
6397
+ * @returns Broker profile response with the broker and their listings.
6398
+ * @throws NotFoundError - If the broker doesn't exist.
6399
+ */
6400
+ async get(slug, brokerId, params = {}) {
6401
+ return this.client.request(`/v1/loopnet/brokers/${slug}/${brokerId}`, {
6402
+ params: { market: params.market }
6403
+ });
6404
+ }
6405
+ };
6406
+
6407
+ // src/loopnet/reference.ts
6408
+ var ReferenceClient10 = class {
6409
+ client;
6410
+ constructor(client) {
6411
+ this.client = client;
6412
+ }
6413
+ /**
6414
+ * List LoopNet coverage markets (us, ca, uk, fr, es).
6415
+ *
6416
+ * Free — costs 0 credits.
6417
+ *
6418
+ * @returns Markets response with all supported coverage markets.
6419
+ */
6420
+ async markets() {
6421
+ return this.client.request("/v1/loopnet/markets");
6422
+ }
6423
+ /**
6424
+ * List LoopNet property-type facets (Office, Retail, Industrial, …).
6425
+ *
6426
+ * Free — costs 0 credits.
6427
+ *
6428
+ * @returns Property-types response with all searchable property-type slugs.
6429
+ */
6430
+ async propertyTypes() {
6431
+ return this.client.request("/v1/loopnet/property-types");
6432
+ }
6433
+ };
6434
+
6435
+ // src/loopnet/client.ts
6436
+ var LoopNetClient = class {
6437
+ /** Client for for-lease / for-sale / auction commercial-listing search */
6438
+ search;
6439
+ /** Client for listing detail (by listing id) */
6440
+ listings;
6441
+ /** Client for broker profile and their active listings */
6442
+ brokers;
6443
+ /** Client for reference data (markets, property types) */
6444
+ reference;
6445
+ /**
6446
+ * Create a new LoopNet client.
6447
+ *
6448
+ * @param client - The base HTTP client for making requests.
6449
+ */
6450
+ constructor(client) {
6451
+ this.search = new SearchClient12(client);
6452
+ this.listings = new ListingsClient2(client);
6453
+ this.brokers = new BrokersClient(client);
6454
+ this.reference = new ReferenceClient10(client);
6455
+ }
6456
+ };
6457
+
6231
6458
  // src/client.ts
6232
6459
  var ScrapeBadger = class {
6233
6460
  baseClient;
@@ -6241,6 +6468,8 @@ var ScrapeBadger = class {
6241
6468
  google;
6242
6469
  /** Reddit scraper API client */
6243
6470
  reddit;
6471
+ /** Redfin scraper API client — search, property, agent, autocomplete, markets (redfin.com, US) */
6472
+ redfin;
6244
6473
  /** Amazon scraper API client — 14 endpoints */
6245
6474
  amazon;
6246
6475
  /** Shopee scraper API client — 6 endpoints across 11 markets */
@@ -6259,6 +6488,8 @@ var ScrapeBadger = class {
6259
6488
  zillow;
6260
6489
  /** Immobiliare scraper API client — 8 endpoints across 4 markets (it, es, gr, lu) */
6261
6490
  immobiliare;
6491
+ /** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */
6492
+ loopnet;
6262
6493
  /**
6263
6494
  * Create a new ScrapeBadger client.
6264
6495
  *
@@ -6298,6 +6529,7 @@ var ScrapeBadger = class {
6298
6529
  this.vinted = new VintedClient(this.baseClient);
6299
6530
  this.google = new GoogleClient(this.baseClient);
6300
6531
  this.reddit = new RedditClient(this.baseClient);
6532
+ this.redfin = new RedfinClient(this.baseClient);
6301
6533
  this.amazon = new AmazonClient(this.baseClient);
6302
6534
  this.shopee = new ShopeeClient(this.baseClient);
6303
6535
  this.tiktok = new TikTokClient(this.baseClient);
@@ -6307,9 +6539,10 @@ var ScrapeBadger = class {
6307
6539
  this.leboncoin = new LeboncoinClient(this.baseClient);
6308
6540
  this.zillow = new ZillowClient(this.baseClient);
6309
6541
  this.immobiliare = new ImmobiliareClient(this.baseClient);
6542
+ this.loopnet = new LoopNetClient(this.baseClient);
6310
6543
  }
6311
6544
  };
6312
6545
 
6313
- export { AccountRestrictedError, AmazonClient, ListingsClient as AmazonListingsClient, ProductsClient2 as AmazonProductsClient, ReferenceClient2 as AmazonReferenceClient, SearchClient4 as AmazonSearchClient, SellersClient as AmazonSellersClient, AuthenticationError, CommunitiesClient, ConflictError, CategoriesClient as EbayCategoriesClient, EbayClient, ItemsClient2 as EbayItemsClient, ReferenceClient5 as EbayReferenceClient, SearchClient7 as EbaySearchClient, SellersClient2 as EbaySellersClient, GeoClient, AiModeClient as GoogleAiModeClient, AutocompleteClient as GoogleAutocompleteClient, GoogleClient, FinanceClient as GoogleFinanceClient, FlightsClient as GoogleFlightsClient, HotelsClient as GoogleHotelsClient, ImagesClient as GoogleImagesClient, JobsClient as GoogleJobsClient, LensClient as GoogleLensClient, MapsClient as GoogleMapsClient, NewsClient as GoogleNewsClient, PatentsClient as GooglePatentsClient, ProductsClient as GoogleProductsClient, ScholarClient as GoogleScholarClient, SearchClient2 as GoogleSearchClient, ShoppingClient as GoogleShoppingClient, ShortsClient as GoogleShortsClient, TrendsClient2 as GoogleTrendsClient, VideosClient as GoogleVideosClient, ImmobiliareClient, InsufficientCreditsError, AdsClient2 as LeboncoinAdsClient, LeboncoinClient, ReferenceClient8 as LeboncoinReferenceClient, SearchClient10 as LeboncoinSearchClient, SellersClient3 as LeboncoinSellersClient, ListsClient, NotFoundError, RateLimitError, RealtorClient, PropertiesClient as RealtorPropertiesClient, ReferenceClient7 as RealtorReferenceClient, SearchClient9 as RealtorSearchClient, RedditClient, PostsClient as RedditPostsClient, SearchClient3 as RedditSearchClient, SubredditsClient as RedditSubredditsClient, UsersClient3 as RedditUsersClient, ScrapeBadger, ScrapeBadgerError, ServerError, ShopeeClient, ProductsClient3 as ShopeeProductsClient, ReferenceClient3 as ShopeeReferenceClient, ReviewsClient as ShopeeReviewsClient, SearchClient5 as ShopeeSearchClient, SpacesClient, StreamClient, AdsClient as TikTokAdsClient, TikTokClient, HashtagsClient as TikTokHashtagsClient, MusicClient as TikTokMusicClient, ReferenceClient4 as TikTokReferenceClient, SearchClient6 as TikTokSearchClient, TrendingClient as TikTokTrendingClient, UsersClient4 as TikTokUsersClient, VideosClient2 as TikTokVideosClient, TimeoutError, TrendsClient, TweetsClient, TwitterClient, UsersClient, ValidationError, VintedClient, ItemsClient as VintedItemsClient, ReferenceClient as VintedReferenceClient, SearchClient as VintedSearchClient, UsersClient2 as VintedUsersClient, WebClient, WebSocketStreamError, ChannelsClient as YoutubeChannelsClient, YoutubeClient, CommunityClient as YoutubeCommunityClient, MusicClient2 as YoutubeMusicClient, PlaylistsClient as YoutubePlaylistsClient, ReferenceClient6 as YoutubeReferenceClient, SearchClient8 as YoutubeSearchClient, ShortsClient2 as YoutubeShortsClient, TrendingClient2 as YoutubeTrendingClient, VideosClient3 as YoutubeVideosClient, AgentClient as ZillowAgentClient, ZillowClient, PropertiesClient2 as ZillowPropertiesClient, ReferenceClient9 as ZillowReferenceClient, SearchClient11 as ZillowSearchClient, collectAll, verifyWebhookSignature };
6546
+ export { AccountRestrictedError, AmazonClient, ListingsClient as AmazonListingsClient, ProductsClient2 as AmazonProductsClient, ReferenceClient2 as AmazonReferenceClient, SearchClient4 as AmazonSearchClient, SellersClient as AmazonSellersClient, AuthenticationError, CommunitiesClient, ConflictError, CategoriesClient as EbayCategoriesClient, EbayClient, ItemsClient2 as EbayItemsClient, ReferenceClient5 as EbayReferenceClient, SearchClient7 as EbaySearchClient, SellersClient2 as EbaySellersClient, GeoClient, AiModeClient as GoogleAiModeClient, AutocompleteClient as GoogleAutocompleteClient, GoogleClient, FinanceClient as GoogleFinanceClient, FlightsClient as GoogleFlightsClient, HotelsClient as GoogleHotelsClient, ImagesClient as GoogleImagesClient, JobsClient as GoogleJobsClient, LensClient as GoogleLensClient, MapsClient as GoogleMapsClient, NewsClient as GoogleNewsClient, PatentsClient as GooglePatentsClient, ProductsClient as GoogleProductsClient, ScholarClient as GoogleScholarClient, SearchClient2 as GoogleSearchClient, ShoppingClient as GoogleShoppingClient, ShortsClient as GoogleShortsClient, TrendsClient2 as GoogleTrendsClient, VideosClient as GoogleVideosClient, ImmobiliareClient, InsufficientCreditsError, AdsClient2 as LeboncoinAdsClient, LeboncoinClient, ReferenceClient8 as LeboncoinReferenceClient, SearchClient10 as LeboncoinSearchClient, SellersClient3 as LeboncoinSellersClient, ListsClient, BrokersClient as LoopNetBrokersClient, LoopNetClient, ListingsClient2 as LoopNetListingsClient, ReferenceClient10 as LoopNetReferenceClient, SearchClient12 as LoopNetSearchClient, NotFoundError, RateLimitError, RealtorClient, PropertiesClient as RealtorPropertiesClient, ReferenceClient7 as RealtorReferenceClient, SearchClient9 as RealtorSearchClient, RedditClient, PostsClient as RedditPostsClient, SearchClient3 as RedditSearchClient, SubredditsClient as RedditSubredditsClient, UsersClient3 as RedditUsersClient, RedfinClient, ScrapeBadger, ScrapeBadgerError, ServerError, ShopeeClient, ProductsClient3 as ShopeeProductsClient, ReferenceClient3 as ShopeeReferenceClient, ReviewsClient as ShopeeReviewsClient, SearchClient5 as ShopeeSearchClient, SpacesClient, StreamClient, AdsClient as TikTokAdsClient, TikTokClient, HashtagsClient as TikTokHashtagsClient, MusicClient as TikTokMusicClient, ReferenceClient4 as TikTokReferenceClient, SearchClient6 as TikTokSearchClient, TrendingClient as TikTokTrendingClient, UsersClient4 as TikTokUsersClient, VideosClient2 as TikTokVideosClient, TimeoutError, TrendsClient, TweetsClient, TwitterClient, UsersClient, ValidationError, VintedClient, ItemsClient as VintedItemsClient, ReferenceClient as VintedReferenceClient, SearchClient as VintedSearchClient, UsersClient2 as VintedUsersClient, WebClient, WebSocketStreamError, ChannelsClient as YoutubeChannelsClient, YoutubeClient, CommunityClient as YoutubeCommunityClient, MusicClient2 as YoutubeMusicClient, PlaylistsClient as YoutubePlaylistsClient, ReferenceClient6 as YoutubeReferenceClient, SearchClient8 as YoutubeSearchClient, ShortsClient2 as YoutubeShortsClient, TrendingClient2 as YoutubeTrendingClient, VideosClient3 as YoutubeVideosClient, AgentClient as ZillowAgentClient, ZillowClient, PropertiesClient2 as ZillowPropertiesClient, ReferenceClient9 as ZillowReferenceClient, SearchClient11 as ZillowSearchClient, collectAll, verifyWebhookSignature };
6314
6547
  //# sourceMappingURL=index.mjs.map
6315
6548
  //# sourceMappingURL=index.mjs.map