scrapebadger 0.15.5 → 0.15.6
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 +964 -113
- package/dist/index.d.ts +964 -113
- package/dist/index.js +151 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +147 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5961,6 +5961,149 @@ var LeboncoinClient = class {
|
|
|
5961
5961
|
}
|
|
5962
5962
|
};
|
|
5963
5963
|
|
|
5964
|
+
// src/zillow/search.ts
|
|
5965
|
+
var SearchClient11 = class {
|
|
5966
|
+
client;
|
|
5967
|
+
constructor(client) {
|
|
5968
|
+
this.client = client;
|
|
5969
|
+
}
|
|
5970
|
+
/**
|
|
5971
|
+
* Search Zillow for properties.
|
|
5972
|
+
*
|
|
5973
|
+
* Beat the ~820-result (20-page) cap by re-issuing the search over
|
|
5974
|
+
* subdivided `north/south/east/west` map-bound boxes returned in
|
|
5975
|
+
* `map_bounds`.
|
|
5976
|
+
*
|
|
5977
|
+
* @param location - City/state, ZIP, address, or neighborhood ("Austin, TX").
|
|
5978
|
+
* @param options - Filters, sorting, pagination, and map bounds.
|
|
5979
|
+
* @returns Search results with pagination and map metadata.
|
|
5980
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
5981
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
5982
|
+
*/
|
|
5983
|
+
async search(location, options = {}) {
|
|
5984
|
+
return this.client.request("/v1/zillow/search", {
|
|
5985
|
+
params: {
|
|
5986
|
+
location,
|
|
5987
|
+
status: options.status,
|
|
5988
|
+
page: options.page,
|
|
5989
|
+
sort: options.sort,
|
|
5990
|
+
price_min: options.priceMin,
|
|
5991
|
+
price_max: options.priceMax,
|
|
5992
|
+
beds_min: options.bedsMin,
|
|
5993
|
+
baths_min: options.bathsMin,
|
|
5994
|
+
home_type: options.homeType,
|
|
5995
|
+
sqft_min: options.sqftMin,
|
|
5996
|
+
sqft_max: options.sqftMax,
|
|
5997
|
+
lot_min: options.lotMin,
|
|
5998
|
+
lot_max: options.lotMax,
|
|
5999
|
+
year_built_min: options.yearBuiltMin,
|
|
6000
|
+
year_built_max: options.yearBuiltMax,
|
|
6001
|
+
hoa_max: options.hoaMax,
|
|
6002
|
+
keywords: options.keywords,
|
|
6003
|
+
days_on: options.daysOn,
|
|
6004
|
+
north: options.north,
|
|
6005
|
+
south: options.south,
|
|
6006
|
+
east: options.east,
|
|
6007
|
+
west: options.west
|
|
6008
|
+
}
|
|
6009
|
+
});
|
|
6010
|
+
}
|
|
6011
|
+
/**
|
|
6012
|
+
* Resolve a search term to Zillow regions/addresses (regionId, lat/lng).
|
|
6013
|
+
*
|
|
6014
|
+
* @param query - Partial location — city, ZIP, address, or neighborhood.
|
|
6015
|
+
* @returns Autocomplete suggestions.
|
|
6016
|
+
*/
|
|
6017
|
+
async autocomplete(query) {
|
|
6018
|
+
return this.client.request("/v1/zillow/autocomplete", {
|
|
6019
|
+
params: { query }
|
|
6020
|
+
});
|
|
6021
|
+
}
|
|
6022
|
+
};
|
|
6023
|
+
|
|
6024
|
+
// src/zillow/properties.ts
|
|
6025
|
+
var PropertiesClient2 = class {
|
|
6026
|
+
client;
|
|
6027
|
+
constructor(client) {
|
|
6028
|
+
this.client = client;
|
|
6029
|
+
}
|
|
6030
|
+
/**
|
|
6031
|
+
* Get a single Zillow property's full detail by its zpid.
|
|
6032
|
+
*
|
|
6033
|
+
* Returns price/valuation, specs, resoFacts (home_facts), price & tax
|
|
6034
|
+
* history, schools, listing agent, mortgage rates and photos.
|
|
6035
|
+
*
|
|
6036
|
+
* @param zpid - The Zillow property id.
|
|
6037
|
+
* @returns Property detail wrapped in `{ property }`.
|
|
6038
|
+
* @throws NotFoundError - If the property doesn't exist.
|
|
6039
|
+
*/
|
|
6040
|
+
async getProperty(zpid) {
|
|
6041
|
+
return this.client.request(`/v1/zillow/property/${zpid}`);
|
|
6042
|
+
}
|
|
6043
|
+
};
|
|
6044
|
+
|
|
6045
|
+
// src/zillow/agent.ts
|
|
6046
|
+
var AgentClient = class {
|
|
6047
|
+
client;
|
|
6048
|
+
constructor(client) {
|
|
6049
|
+
this.client = client;
|
|
6050
|
+
}
|
|
6051
|
+
/**
|
|
6052
|
+
* Get a Zillow real-estate professional's profile and their active listings.
|
|
6053
|
+
*
|
|
6054
|
+
* Provide either a `username` (screen name) or a full `url`.
|
|
6055
|
+
*
|
|
6056
|
+
* @param options - The agent `username` or profile `url`.
|
|
6057
|
+
* @returns Agent profile wrapped in `{ agent }`.
|
|
6058
|
+
* @throws NotFoundError - If the agent doesn't exist.
|
|
6059
|
+
* @throws ValidationError - If neither username nor url is provided.
|
|
6060
|
+
*/
|
|
6061
|
+
async getAgent(options = {}) {
|
|
6062
|
+
return this.client.request("/v1/zillow/agent", {
|
|
6063
|
+
params: { username: options.username, url: options.url }
|
|
6064
|
+
});
|
|
6065
|
+
}
|
|
6066
|
+
};
|
|
6067
|
+
|
|
6068
|
+
// src/zillow/reference.ts
|
|
6069
|
+
var ReferenceClient9 = class {
|
|
6070
|
+
client;
|
|
6071
|
+
constructor(client) {
|
|
6072
|
+
this.client = client;
|
|
6073
|
+
}
|
|
6074
|
+
/**
|
|
6075
|
+
* List Zillow coverage regions (US + Canada, all served via zillow.com).
|
|
6076
|
+
*
|
|
6077
|
+
* @returns Markets response with all supported markets.
|
|
6078
|
+
*/
|
|
6079
|
+
async listMarkets() {
|
|
6080
|
+
return this.client.request("/v1/zillow/markets");
|
|
6081
|
+
}
|
|
6082
|
+
};
|
|
6083
|
+
|
|
6084
|
+
// src/zillow/client.ts
|
|
6085
|
+
var ZillowClient = class {
|
|
6086
|
+
/** Client for property search and location autocomplete */
|
|
6087
|
+
search;
|
|
6088
|
+
/** Client for full property detail */
|
|
6089
|
+
properties;
|
|
6090
|
+
/** Client for agent profile + listings */
|
|
6091
|
+
agent;
|
|
6092
|
+
/** Client for reference data (markets) */
|
|
6093
|
+
reference;
|
|
6094
|
+
/**
|
|
6095
|
+
* Create a new Zillow client.
|
|
6096
|
+
*
|
|
6097
|
+
* @param client - The base HTTP client for making requests.
|
|
6098
|
+
*/
|
|
6099
|
+
constructor(client) {
|
|
6100
|
+
this.search = new SearchClient11(client);
|
|
6101
|
+
this.properties = new PropertiesClient2(client);
|
|
6102
|
+
this.agent = new AgentClient(client);
|
|
6103
|
+
this.reference = new ReferenceClient9(client);
|
|
6104
|
+
}
|
|
6105
|
+
};
|
|
6106
|
+
|
|
5964
6107
|
// src/client.ts
|
|
5965
6108
|
var ScrapeBadger = class {
|
|
5966
6109
|
baseClient;
|
|
@@ -5988,6 +6131,8 @@ var ScrapeBadger = class {
|
|
|
5988
6131
|
realtor;
|
|
5989
6132
|
/** Leboncoin scraper API client — 10 endpoints (France) */
|
|
5990
6133
|
leboncoin;
|
|
6134
|
+
/** Zillow scraper API client — 5 endpoints (search, property, agent, autocomplete, markets) */
|
|
6135
|
+
zillow;
|
|
5991
6136
|
/**
|
|
5992
6137
|
* Create a new ScrapeBadger client.
|
|
5993
6138
|
*
|
|
@@ -6034,6 +6179,7 @@ var ScrapeBadger = class {
|
|
|
6034
6179
|
this.youtube = new YoutubeClient(this.baseClient);
|
|
6035
6180
|
this.realtor = new RealtorClient(this.baseClient);
|
|
6036
6181
|
this.leboncoin = new LeboncoinClient(this.baseClient);
|
|
6182
|
+
this.zillow = new ZillowClient(this.baseClient);
|
|
6037
6183
|
}
|
|
6038
6184
|
};
|
|
6039
6185
|
|
|
@@ -6133,6 +6279,11 @@ exports.YoutubeSearchClient = SearchClient8;
|
|
|
6133
6279
|
exports.YoutubeShortsClient = ShortsClient2;
|
|
6134
6280
|
exports.YoutubeTrendingClient = TrendingClient2;
|
|
6135
6281
|
exports.YoutubeVideosClient = VideosClient3;
|
|
6282
|
+
exports.ZillowAgentClient = AgentClient;
|
|
6283
|
+
exports.ZillowClient = ZillowClient;
|
|
6284
|
+
exports.ZillowPropertiesClient = PropertiesClient2;
|
|
6285
|
+
exports.ZillowReferenceClient = ReferenceClient9;
|
|
6286
|
+
exports.ZillowSearchClient = SearchClient11;
|
|
6136
6287
|
exports.collectAll = collectAll;
|
|
6137
6288
|
exports.verifyWebhookSignature = verifyWebhookSignature;
|
|
6138
6289
|
//# sourceMappingURL=index.js.map
|