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/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.13.1";
12
+ var SDK_VERSION = "0.16.0";
13
13
 
14
14
  // src/internal/exceptions.ts
15
15
  var ScrapeBadgerError = class _ScrapeBadgerError extends Error {
@@ -6104,6 +6104,136 @@ var ZillowClient = class {
6104
6104
  }
6105
6105
  };
6106
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
+
6107
6237
  // src/client.ts
6108
6238
  var ScrapeBadger = class {
6109
6239
  baseClient;
@@ -6133,6 +6263,8 @@ var ScrapeBadger = class {
6133
6263
  leboncoin;
6134
6264
  /** Zillow scraper API client — 5 endpoints (search, property, agent, autocomplete, markets) */
6135
6265
  zillow;
6266
+ /** Immobiliare scraper API client — 8 endpoints across 4 markets (it, es, gr, lu) */
6267
+ immobiliare;
6136
6268
  /**
6137
6269
  * Create a new ScrapeBadger client.
6138
6270
  *
@@ -6180,6 +6312,7 @@ var ScrapeBadger = class {
6180
6312
  this.realtor = new RealtorClient(this.baseClient);
6181
6313
  this.leboncoin = new LeboncoinClient(this.baseClient);
6182
6314
  this.zillow = new ZillowClient(this.baseClient);
6315
+ this.immobiliare = new ImmobiliareClient(this.baseClient);
6183
6316
  }
6184
6317
  };
6185
6318
 
@@ -6219,6 +6352,7 @@ exports.GoogleShoppingClient = ShoppingClient;
6219
6352
  exports.GoogleShortsClient = ShortsClient;
6220
6353
  exports.GoogleTrendsClient = TrendsClient2;
6221
6354
  exports.GoogleVideosClient = VideosClient;
6355
+ exports.ImmobiliareClient = ImmobiliareClient;
6222
6356
  exports.InsufficientCreditsError = InsufficientCreditsError;
6223
6357
  exports.LeboncoinAdsClient = AdsClient2;
6224
6358
  exports.LeboncoinClient = LeboncoinClient;