scrapebadger 0.15.5 → 0.16.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/README.md +1 -0
- package/dist/index.d.cts +1398 -118
- package/dist/index.d.ts +1398 -118
- package/dist/index.js +286 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +281 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
9
9
|
var WebSocket__default = /*#__PURE__*/_interopDefault(WebSocket);
|
|
10
10
|
|
|
11
11
|
// src/internal/version.ts
|
|
12
|
-
var SDK_VERSION = "0.
|
|
12
|
+
var SDK_VERSION = "0.16.0";
|
|
13
13
|
|
|
14
14
|
// src/internal/exceptions.ts
|
|
15
15
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -5961,6 +5961,279 @@ 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
|
+
|
|
6107
|
+
// src/immobiliare/client.ts
|
|
6108
|
+
var ImmobiliareClient = class {
|
|
6109
|
+
client;
|
|
6110
|
+
constructor(client) {
|
|
6111
|
+
this.client = client;
|
|
6112
|
+
}
|
|
6113
|
+
/**
|
|
6114
|
+
* Resolve a free-text place name into geography ids for search.
|
|
6115
|
+
*
|
|
6116
|
+
* @param query - Free-text place name, e.g. "Milano".
|
|
6117
|
+
* @param options - Optional parameters (market).
|
|
6118
|
+
* @returns Suggest response with region/province/city/zone id candidates.
|
|
6119
|
+
*/
|
|
6120
|
+
async autocomplete(query, options = {}) {
|
|
6121
|
+
return this.client.request("/v1/immobiliare/autocomplete", {
|
|
6122
|
+
params: { query, market: options.market }
|
|
6123
|
+
});
|
|
6124
|
+
}
|
|
6125
|
+
/**
|
|
6126
|
+
* Search Immobiliare-group listings.
|
|
6127
|
+
*
|
|
6128
|
+
* Scope the search by `location` (free text, auto-resolved) OR explicit
|
|
6129
|
+
* `region_id` / `province_id` / `city_id` from {@link autocomplete}.
|
|
6130
|
+
*
|
|
6131
|
+
* @param options - Search parameters (market, location/ids, contract,
|
|
6132
|
+
* category, price/surface/room/bathroom filters, sort, page).
|
|
6133
|
+
* @returns Search response with `listings` and pagination metadata.
|
|
6134
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
6135
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
6136
|
+
*/
|
|
6137
|
+
async search(options = {}) {
|
|
6138
|
+
return this.client.request("/v1/immobiliare/search", {
|
|
6139
|
+
params: {
|
|
6140
|
+
market: options.market,
|
|
6141
|
+
location: options.location,
|
|
6142
|
+
region_id: options.region_id,
|
|
6143
|
+
province_id: options.province_id,
|
|
6144
|
+
city_id: options.city_id,
|
|
6145
|
+
contract: options.contract,
|
|
6146
|
+
category: options.category,
|
|
6147
|
+
price_min: options.price_min,
|
|
6148
|
+
price_max: options.price_max,
|
|
6149
|
+
surface_min: options.surface_min,
|
|
6150
|
+
surface_max: options.surface_max,
|
|
6151
|
+
rooms_min: options.rooms_min,
|
|
6152
|
+
rooms_max: options.rooms_max,
|
|
6153
|
+
bathrooms_min: options.bathrooms_min,
|
|
6154
|
+
sort: options.sort,
|
|
6155
|
+
page: options.page
|
|
6156
|
+
}
|
|
6157
|
+
});
|
|
6158
|
+
}
|
|
6159
|
+
/**
|
|
6160
|
+
* Get the full detail for a single Immobiliare listing.
|
|
6161
|
+
*
|
|
6162
|
+
* @param listingId - The Immobiliare listing id.
|
|
6163
|
+
* @param options - Optional parameters (market).
|
|
6164
|
+
* @returns The full listing detail.
|
|
6165
|
+
* @throws NotFoundError - If the listing doesn't exist.
|
|
6166
|
+
*/
|
|
6167
|
+
async getListing(listingId, options = {}) {
|
|
6168
|
+
return this.client.request(`/v1/immobiliare/listings/${listingId}`, {
|
|
6169
|
+
params: { market: options.market }
|
|
6170
|
+
});
|
|
6171
|
+
}
|
|
6172
|
+
/**
|
|
6173
|
+
* Get an agency/advertiser profile.
|
|
6174
|
+
*
|
|
6175
|
+
* @param agencyId - The Immobiliare agency id.
|
|
6176
|
+
* @param options - Optional parameters (market).
|
|
6177
|
+
* @returns The full agency profile.
|
|
6178
|
+
* @throws NotFoundError - If the agency doesn't exist.
|
|
6179
|
+
*/
|
|
6180
|
+
async getAgency(agencyId, options = {}) {
|
|
6181
|
+
return this.client.request(`/v1/immobiliare/agencies/${agencyId}`, {
|
|
6182
|
+
params: { market: options.market }
|
|
6183
|
+
});
|
|
6184
|
+
}
|
|
6185
|
+
/**
|
|
6186
|
+
* Get an agency's active listings (25 per page).
|
|
6187
|
+
*
|
|
6188
|
+
* @param agencyId - The Immobiliare agency id.
|
|
6189
|
+
* @param options - Optional parameters (market, page).
|
|
6190
|
+
* @returns Agency-listings response with `listings` and pagination.
|
|
6191
|
+
*/
|
|
6192
|
+
async getAgencyListings(agencyId, options = {}) {
|
|
6193
|
+
return this.client.request(
|
|
6194
|
+
`/v1/immobiliare/agencies/${agencyId}/listings`,
|
|
6195
|
+
{
|
|
6196
|
+
params: { market: options.market, page: options.page }
|
|
6197
|
+
}
|
|
6198
|
+
);
|
|
6199
|
+
}
|
|
6200
|
+
/**
|
|
6201
|
+
* Get the historical average €/m² time series for an area.
|
|
6202
|
+
*
|
|
6203
|
+
* @param regionId - Region id, e.g. "lom" (required).
|
|
6204
|
+
* @param options - Optional parameters (province_id, city_id, market, contract).
|
|
6205
|
+
* @returns Price-stats response with monthly `points` (label + EUR/m² value).
|
|
6206
|
+
*/
|
|
6207
|
+
async priceStats(regionId, options = {}) {
|
|
6208
|
+
return this.client.request("/v1/immobiliare/market-insights/prices", {
|
|
6209
|
+
params: {
|
|
6210
|
+
market: options.market,
|
|
6211
|
+
region_id: regionId,
|
|
6212
|
+
province_id: options.province_id,
|
|
6213
|
+
city_id: options.city_id,
|
|
6214
|
+
contract: options.contract
|
|
6215
|
+
}
|
|
6216
|
+
});
|
|
6217
|
+
}
|
|
6218
|
+
/**
|
|
6219
|
+
* Get all supported Immobiliare-group markets (it, es, gr, lu).
|
|
6220
|
+
*
|
|
6221
|
+
* @returns A bare array of supported markets (code, domain, country,
|
|
6222
|
+
* locale, currency, name).
|
|
6223
|
+
*/
|
|
6224
|
+
async markets() {
|
|
6225
|
+
return this.client.request("/v1/immobiliare/markets");
|
|
6226
|
+
}
|
|
6227
|
+
/**
|
|
6228
|
+
* Get the filter enums accepted by {@link search}.
|
|
6229
|
+
*
|
|
6230
|
+
* @returns Reference response with `contracts`, `categories`, and `sorts`.
|
|
6231
|
+
*/
|
|
6232
|
+
async reference() {
|
|
6233
|
+
return this.client.request("/v1/immobiliare/reference");
|
|
6234
|
+
}
|
|
6235
|
+
};
|
|
6236
|
+
|
|
5964
6237
|
// src/client.ts
|
|
5965
6238
|
var ScrapeBadger = class {
|
|
5966
6239
|
baseClient;
|
|
@@ -5988,6 +6261,10 @@ var ScrapeBadger = class {
|
|
|
5988
6261
|
realtor;
|
|
5989
6262
|
/** Leboncoin scraper API client — 10 endpoints (France) */
|
|
5990
6263
|
leboncoin;
|
|
6264
|
+
/** Zillow scraper API client — 5 endpoints (search, property, agent, autocomplete, markets) */
|
|
6265
|
+
zillow;
|
|
6266
|
+
/** Immobiliare scraper API client — 8 endpoints across 4 markets (it, es, gr, lu) */
|
|
6267
|
+
immobiliare;
|
|
5991
6268
|
/**
|
|
5992
6269
|
* Create a new ScrapeBadger client.
|
|
5993
6270
|
*
|
|
@@ -6034,6 +6311,8 @@ var ScrapeBadger = class {
|
|
|
6034
6311
|
this.youtube = new YoutubeClient(this.baseClient);
|
|
6035
6312
|
this.realtor = new RealtorClient(this.baseClient);
|
|
6036
6313
|
this.leboncoin = new LeboncoinClient(this.baseClient);
|
|
6314
|
+
this.zillow = new ZillowClient(this.baseClient);
|
|
6315
|
+
this.immobiliare = new ImmobiliareClient(this.baseClient);
|
|
6037
6316
|
}
|
|
6038
6317
|
};
|
|
6039
6318
|
|
|
@@ -6073,6 +6352,7 @@ exports.GoogleShoppingClient = ShoppingClient;
|
|
|
6073
6352
|
exports.GoogleShortsClient = ShortsClient;
|
|
6074
6353
|
exports.GoogleTrendsClient = TrendsClient2;
|
|
6075
6354
|
exports.GoogleVideosClient = VideosClient;
|
|
6355
|
+
exports.ImmobiliareClient = ImmobiliareClient;
|
|
6076
6356
|
exports.InsufficientCreditsError = InsufficientCreditsError;
|
|
6077
6357
|
exports.LeboncoinAdsClient = AdsClient2;
|
|
6078
6358
|
exports.LeboncoinClient = LeboncoinClient;
|
|
@@ -6133,6 +6413,11 @@ exports.YoutubeSearchClient = SearchClient8;
|
|
|
6133
6413
|
exports.YoutubeShortsClient = ShortsClient2;
|
|
6134
6414
|
exports.YoutubeTrendingClient = TrendingClient2;
|
|
6135
6415
|
exports.YoutubeVideosClient = VideosClient3;
|
|
6416
|
+
exports.ZillowAgentClient = AgentClient;
|
|
6417
|
+
exports.ZillowClient = ZillowClient;
|
|
6418
|
+
exports.ZillowPropertiesClient = PropertiesClient2;
|
|
6419
|
+
exports.ZillowReferenceClient = ReferenceClient9;
|
|
6420
|
+
exports.ZillowSearchClient = SearchClient11;
|
|
6136
6421
|
exports.collectAll = collectAll;
|
|
6137
6422
|
exports.verifyWebhookSignature = verifyWebhookSignature;
|
|
6138
6423
|
//# sourceMappingURL=index.js.map
|