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.js
CHANGED
|
@@ -3943,6 +3943,101 @@ var RedditClient = class {
|
|
|
3943
3943
|
}
|
|
3944
3944
|
};
|
|
3945
3945
|
|
|
3946
|
+
// src/redfin/client.ts
|
|
3947
|
+
var RedfinClient = class {
|
|
3948
|
+
client;
|
|
3949
|
+
constructor(client) {
|
|
3950
|
+
this.client = client;
|
|
3951
|
+
}
|
|
3952
|
+
/**
|
|
3953
|
+
* Search Redfin for for-sale properties.
|
|
3954
|
+
*
|
|
3955
|
+
* @param location - City/state, ZIP, address or neighborhood (required).
|
|
3956
|
+
* @param options - Optional parameters (page, sort, price/beds/baths/sqft/lot
|
|
3957
|
+
* filters, year built, max days on market, bbox override).
|
|
3958
|
+
* @returns Search response with matching listings, map bounds, and pagination.
|
|
3959
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
3960
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
3961
|
+
*/
|
|
3962
|
+
async search(location, options = {}) {
|
|
3963
|
+
return this.client.request("/v1/redfin/search", {
|
|
3964
|
+
params: {
|
|
3965
|
+
location,
|
|
3966
|
+
page: options.page,
|
|
3967
|
+
sort: options.sort,
|
|
3968
|
+
price_min: options.price_min,
|
|
3969
|
+
price_max: options.price_max,
|
|
3970
|
+
beds_min: options.beds_min,
|
|
3971
|
+
baths_min: options.baths_min,
|
|
3972
|
+
home_type: options.home_type,
|
|
3973
|
+
sqft_min: options.sqft_min,
|
|
3974
|
+
sqft_max: options.sqft_max,
|
|
3975
|
+
lot_min: options.lot_min,
|
|
3976
|
+
lot_max: options.lot_max,
|
|
3977
|
+
year_built_min: options.year_built_min,
|
|
3978
|
+
year_built_max: options.year_built_max,
|
|
3979
|
+
max_days_on_market: options.max_days_on_market,
|
|
3980
|
+
north: options.north,
|
|
3981
|
+
south: options.south,
|
|
3982
|
+
east: options.east,
|
|
3983
|
+
west: options.west
|
|
3984
|
+
}
|
|
3985
|
+
});
|
|
3986
|
+
}
|
|
3987
|
+
/**
|
|
3988
|
+
* Get a single Redfin property's full detail by id or URL.
|
|
3989
|
+
*
|
|
3990
|
+
* Provide either `propertyId` or `options.url`.
|
|
3991
|
+
*
|
|
3992
|
+
* @param propertyId - The Redfin property id.
|
|
3993
|
+
* @param options - Optional parameters (url).
|
|
3994
|
+
* @returns Property detail response.
|
|
3995
|
+
* @throws NotFoundError - If the property doesn't exist.
|
|
3996
|
+
*/
|
|
3997
|
+
async getProperty(propertyId, options = {}) {
|
|
3998
|
+
if (options.url) {
|
|
3999
|
+
return this.client.request("/v1/redfin/property", {
|
|
4000
|
+
params: { url: options.url }
|
|
4001
|
+
});
|
|
4002
|
+
}
|
|
4003
|
+
return this.client.request(`/v1/redfin/property/${propertyId}`);
|
|
4004
|
+
}
|
|
4005
|
+
/**
|
|
4006
|
+
* Get a Redfin agent's profile and their active listings.
|
|
4007
|
+
*
|
|
4008
|
+
* Provide either `agentId` or `options.url`.
|
|
4009
|
+
*
|
|
4010
|
+
* @param agentId - The Redfin agent slug.
|
|
4011
|
+
* @param options - Optional parameters (url).
|
|
4012
|
+
* @returns Agent profile response with the agent and their listings.
|
|
4013
|
+
* @throws NotFoundError - If the agent doesn't exist.
|
|
4014
|
+
*/
|
|
4015
|
+
async getAgent(agentId, options = {}) {
|
|
4016
|
+
return this.client.request("/v1/redfin/agent", {
|
|
4017
|
+
params: { agent_id: agentId, url: options.url }
|
|
4018
|
+
});
|
|
4019
|
+
}
|
|
4020
|
+
/**
|
|
4021
|
+
* Resolve a search term to Redfin locations.
|
|
4022
|
+
*
|
|
4023
|
+
* @param query - Partial location — city, ZIP, address, or neighborhood.
|
|
4024
|
+
* @returns Autocomplete response with location suggestions.
|
|
4025
|
+
*/
|
|
4026
|
+
async autocomplete(query) {
|
|
4027
|
+
return this.client.request("/v1/redfin/autocomplete", {
|
|
4028
|
+
params: { query }
|
|
4029
|
+
});
|
|
4030
|
+
}
|
|
4031
|
+
/**
|
|
4032
|
+
* Get all supported Redfin coverage markets.
|
|
4033
|
+
*
|
|
4034
|
+
* @returns Markets response with all supported markets.
|
|
4035
|
+
*/
|
|
4036
|
+
async listMarkets() {
|
|
4037
|
+
return this.client.request("/v1/redfin/markets");
|
|
4038
|
+
}
|
|
4039
|
+
};
|
|
4040
|
+
|
|
3946
4041
|
// src/amazon/search.ts
|
|
3947
4042
|
var SearchClient4 = class {
|
|
3948
4043
|
client;
|
|
@@ -6379,6 +6474,8 @@ var ScrapeBadger = class {
|
|
|
6379
6474
|
google;
|
|
6380
6475
|
/** Reddit scraper API client */
|
|
6381
6476
|
reddit;
|
|
6477
|
+
/** Redfin scraper API client — search, property, agent, autocomplete, markets (redfin.com, US) */
|
|
6478
|
+
redfin;
|
|
6382
6479
|
/** Amazon scraper API client — 14 endpoints */
|
|
6383
6480
|
amazon;
|
|
6384
6481
|
/** Shopee scraper API client — 6 endpoints across 11 markets */
|
|
@@ -6438,6 +6535,7 @@ var ScrapeBadger = class {
|
|
|
6438
6535
|
this.vinted = new VintedClient(this.baseClient);
|
|
6439
6536
|
this.google = new GoogleClient(this.baseClient);
|
|
6440
6537
|
this.reddit = new RedditClient(this.baseClient);
|
|
6538
|
+
this.redfin = new RedfinClient(this.baseClient);
|
|
6441
6539
|
this.amazon = new AmazonClient(this.baseClient);
|
|
6442
6540
|
this.shopee = new ShopeeClient(this.baseClient);
|
|
6443
6541
|
this.tiktok = new TikTokClient(this.baseClient);
|
|
@@ -6511,6 +6609,7 @@ exports.RedditPostsClient = PostsClient;
|
|
|
6511
6609
|
exports.RedditSearchClient = SearchClient3;
|
|
6512
6610
|
exports.RedditSubredditsClient = SubredditsClient;
|
|
6513
6611
|
exports.RedditUsersClient = UsersClient3;
|
|
6612
|
+
exports.RedfinClient = RedfinClient;
|
|
6514
6613
|
exports.ScrapeBadger = ScrapeBadger;
|
|
6515
6614
|
exports.ScrapeBadgerError = ScrapeBadgerError;
|
|
6516
6615
|
exports.ServerError = ServerError;
|