scrapebadger 0.15.6 → 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 +480 -51
- package/dist/index.d.ts +480 -51
- package/dist/index.js +135 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +135 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { EventEmitter } from 'events';
|
|
|
3
3
|
import WebSocket from 'ws';
|
|
4
4
|
|
|
5
5
|
// src/internal/version.ts
|
|
6
|
-
var SDK_VERSION = "0.
|
|
6
|
+
var SDK_VERSION = "0.16.0";
|
|
7
7
|
|
|
8
8
|
// src/internal/exceptions.ts
|
|
9
9
|
var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
|
|
@@ -6098,6 +6098,136 @@ var ZillowClient = class {
|
|
|
6098
6098
|
}
|
|
6099
6099
|
};
|
|
6100
6100
|
|
|
6101
|
+
// src/immobiliare/client.ts
|
|
6102
|
+
var ImmobiliareClient = class {
|
|
6103
|
+
client;
|
|
6104
|
+
constructor(client) {
|
|
6105
|
+
this.client = client;
|
|
6106
|
+
}
|
|
6107
|
+
/**
|
|
6108
|
+
* Resolve a free-text place name into geography ids for search.
|
|
6109
|
+
*
|
|
6110
|
+
* @param query - Free-text place name, e.g. "Milano".
|
|
6111
|
+
* @param options - Optional parameters (market).
|
|
6112
|
+
* @returns Suggest response with region/province/city/zone id candidates.
|
|
6113
|
+
*/
|
|
6114
|
+
async autocomplete(query, options = {}) {
|
|
6115
|
+
return this.client.request("/v1/immobiliare/autocomplete", {
|
|
6116
|
+
params: { query, market: options.market }
|
|
6117
|
+
});
|
|
6118
|
+
}
|
|
6119
|
+
/**
|
|
6120
|
+
* Search Immobiliare-group listings.
|
|
6121
|
+
*
|
|
6122
|
+
* Scope the search by `location` (free text, auto-resolved) OR explicit
|
|
6123
|
+
* `region_id` / `province_id` / `city_id` from {@link autocomplete}.
|
|
6124
|
+
*
|
|
6125
|
+
* @param options - Search parameters (market, location/ids, contract,
|
|
6126
|
+
* category, price/surface/room/bathroom filters, sort, page).
|
|
6127
|
+
* @returns Search response with `listings` and pagination metadata.
|
|
6128
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
6129
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
6130
|
+
*/
|
|
6131
|
+
async search(options = {}) {
|
|
6132
|
+
return this.client.request("/v1/immobiliare/search", {
|
|
6133
|
+
params: {
|
|
6134
|
+
market: options.market,
|
|
6135
|
+
location: options.location,
|
|
6136
|
+
region_id: options.region_id,
|
|
6137
|
+
province_id: options.province_id,
|
|
6138
|
+
city_id: options.city_id,
|
|
6139
|
+
contract: options.contract,
|
|
6140
|
+
category: options.category,
|
|
6141
|
+
price_min: options.price_min,
|
|
6142
|
+
price_max: options.price_max,
|
|
6143
|
+
surface_min: options.surface_min,
|
|
6144
|
+
surface_max: options.surface_max,
|
|
6145
|
+
rooms_min: options.rooms_min,
|
|
6146
|
+
rooms_max: options.rooms_max,
|
|
6147
|
+
bathrooms_min: options.bathrooms_min,
|
|
6148
|
+
sort: options.sort,
|
|
6149
|
+
page: options.page
|
|
6150
|
+
}
|
|
6151
|
+
});
|
|
6152
|
+
}
|
|
6153
|
+
/**
|
|
6154
|
+
* Get the full detail for a single Immobiliare listing.
|
|
6155
|
+
*
|
|
6156
|
+
* @param listingId - The Immobiliare listing id.
|
|
6157
|
+
* @param options - Optional parameters (market).
|
|
6158
|
+
* @returns The full listing detail.
|
|
6159
|
+
* @throws NotFoundError - If the listing doesn't exist.
|
|
6160
|
+
*/
|
|
6161
|
+
async getListing(listingId, options = {}) {
|
|
6162
|
+
return this.client.request(`/v1/immobiliare/listings/${listingId}`, {
|
|
6163
|
+
params: { market: options.market }
|
|
6164
|
+
});
|
|
6165
|
+
}
|
|
6166
|
+
/**
|
|
6167
|
+
* Get an agency/advertiser profile.
|
|
6168
|
+
*
|
|
6169
|
+
* @param agencyId - The Immobiliare agency id.
|
|
6170
|
+
* @param options - Optional parameters (market).
|
|
6171
|
+
* @returns The full agency profile.
|
|
6172
|
+
* @throws NotFoundError - If the agency doesn't exist.
|
|
6173
|
+
*/
|
|
6174
|
+
async getAgency(agencyId, options = {}) {
|
|
6175
|
+
return this.client.request(`/v1/immobiliare/agencies/${agencyId}`, {
|
|
6176
|
+
params: { market: options.market }
|
|
6177
|
+
});
|
|
6178
|
+
}
|
|
6179
|
+
/**
|
|
6180
|
+
* Get an agency's active listings (25 per page).
|
|
6181
|
+
*
|
|
6182
|
+
* @param agencyId - The Immobiliare agency id.
|
|
6183
|
+
* @param options - Optional parameters (market, page).
|
|
6184
|
+
* @returns Agency-listings response with `listings` and pagination.
|
|
6185
|
+
*/
|
|
6186
|
+
async getAgencyListings(agencyId, options = {}) {
|
|
6187
|
+
return this.client.request(
|
|
6188
|
+
`/v1/immobiliare/agencies/${agencyId}/listings`,
|
|
6189
|
+
{
|
|
6190
|
+
params: { market: options.market, page: options.page }
|
|
6191
|
+
}
|
|
6192
|
+
);
|
|
6193
|
+
}
|
|
6194
|
+
/**
|
|
6195
|
+
* Get the historical average €/m² time series for an area.
|
|
6196
|
+
*
|
|
6197
|
+
* @param regionId - Region id, e.g. "lom" (required).
|
|
6198
|
+
* @param options - Optional parameters (province_id, city_id, market, contract).
|
|
6199
|
+
* @returns Price-stats response with monthly `points` (label + EUR/m² value).
|
|
6200
|
+
*/
|
|
6201
|
+
async priceStats(regionId, options = {}) {
|
|
6202
|
+
return this.client.request("/v1/immobiliare/market-insights/prices", {
|
|
6203
|
+
params: {
|
|
6204
|
+
market: options.market,
|
|
6205
|
+
region_id: regionId,
|
|
6206
|
+
province_id: options.province_id,
|
|
6207
|
+
city_id: options.city_id,
|
|
6208
|
+
contract: options.contract
|
|
6209
|
+
}
|
|
6210
|
+
});
|
|
6211
|
+
}
|
|
6212
|
+
/**
|
|
6213
|
+
* Get all supported Immobiliare-group markets (it, es, gr, lu).
|
|
6214
|
+
*
|
|
6215
|
+
* @returns A bare array of supported markets (code, domain, country,
|
|
6216
|
+
* locale, currency, name).
|
|
6217
|
+
*/
|
|
6218
|
+
async markets() {
|
|
6219
|
+
return this.client.request("/v1/immobiliare/markets");
|
|
6220
|
+
}
|
|
6221
|
+
/**
|
|
6222
|
+
* Get the filter enums accepted by {@link search}.
|
|
6223
|
+
*
|
|
6224
|
+
* @returns Reference response with `contracts`, `categories`, and `sorts`.
|
|
6225
|
+
*/
|
|
6226
|
+
async reference() {
|
|
6227
|
+
return this.client.request("/v1/immobiliare/reference");
|
|
6228
|
+
}
|
|
6229
|
+
};
|
|
6230
|
+
|
|
6101
6231
|
// src/client.ts
|
|
6102
6232
|
var ScrapeBadger = class {
|
|
6103
6233
|
baseClient;
|
|
@@ -6127,6 +6257,8 @@ var ScrapeBadger = class {
|
|
|
6127
6257
|
leboncoin;
|
|
6128
6258
|
/** Zillow scraper API client — 5 endpoints (search, property, agent, autocomplete, markets) */
|
|
6129
6259
|
zillow;
|
|
6260
|
+
/** Immobiliare scraper API client — 8 endpoints across 4 markets (it, es, gr, lu) */
|
|
6261
|
+
immobiliare;
|
|
6130
6262
|
/**
|
|
6131
6263
|
* Create a new ScrapeBadger client.
|
|
6132
6264
|
*
|
|
@@ -6174,9 +6306,10 @@ var ScrapeBadger = class {
|
|
|
6174
6306
|
this.realtor = new RealtorClient(this.baseClient);
|
|
6175
6307
|
this.leboncoin = new LeboncoinClient(this.baseClient);
|
|
6176
6308
|
this.zillow = new ZillowClient(this.baseClient);
|
|
6309
|
+
this.immobiliare = new ImmobiliareClient(this.baseClient);
|
|
6177
6310
|
}
|
|
6178
6311
|
};
|
|
6179
6312
|
|
|
6180
|
-
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, 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 };
|
|
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 };
|
|
6181
6314
|
//# sourceMappingURL=index.mjs.map
|
|
6182
6315
|
//# sourceMappingURL=index.mjs.map
|