scrapebadger 0.17.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.d.cts +458 -5
- package/dist/index.d.ts +458 -5
- package/dist/index.js +99 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +99 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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;
|
|
@@ -6373,6 +6468,8 @@ var ScrapeBadger = class {
|
|
|
6373
6468
|
google;
|
|
6374
6469
|
/** Reddit scraper API client */
|
|
6375
6470
|
reddit;
|
|
6471
|
+
/** Redfin scraper API client — search, property, agent, autocomplete, markets (redfin.com, US) */
|
|
6472
|
+
redfin;
|
|
6376
6473
|
/** Amazon scraper API client — 14 endpoints */
|
|
6377
6474
|
amazon;
|
|
6378
6475
|
/** Shopee scraper API client — 6 endpoints across 11 markets */
|
|
@@ -6432,6 +6529,7 @@ var ScrapeBadger = class {
|
|
|
6432
6529
|
this.vinted = new VintedClient(this.baseClient);
|
|
6433
6530
|
this.google = new GoogleClient(this.baseClient);
|
|
6434
6531
|
this.reddit = new RedditClient(this.baseClient);
|
|
6532
|
+
this.redfin = new RedfinClient(this.baseClient);
|
|
6435
6533
|
this.amazon = new AmazonClient(this.baseClient);
|
|
6436
6534
|
this.shopee = new ShopeeClient(this.baseClient);
|
|
6437
6535
|
this.tiktok = new TikTokClient(this.baseClient);
|
|
@@ -6445,6 +6543,6 @@ var ScrapeBadger = class {
|
|
|
6445
6543
|
}
|
|
6446
6544
|
};
|
|
6447
6545
|
|
|
6448
|
-
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, 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 };
|
|
6449
6547
|
//# sourceMappingURL=index.mjs.map
|
|
6450
6548
|
//# sourceMappingURL=index.mjs.map
|