scrapebadger 0.16.0 → 0.17.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 +573 -107
- package/dist/index.d.ts +573 -107
- package/dist/index.js +140 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +136 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6234,6 +6234,138 @@ var ImmobiliareClient = class {
|
|
|
6234
6234
|
}
|
|
6235
6235
|
};
|
|
6236
6236
|
|
|
6237
|
+
// src/loopnet/search.ts
|
|
6238
|
+
var SearchClient12 = class {
|
|
6239
|
+
client;
|
|
6240
|
+
constructor(client) {
|
|
6241
|
+
this.client = client;
|
|
6242
|
+
}
|
|
6243
|
+
/**
|
|
6244
|
+
* Search LoopNet for for-lease / for-sale / auction commercial listings.
|
|
6245
|
+
*
|
|
6246
|
+
* Costs 10 credits.
|
|
6247
|
+
*
|
|
6248
|
+
* @param params - Search parameters including location, filters, and pagination.
|
|
6249
|
+
* @returns Search results with listing cards and pagination metadata.
|
|
6250
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
6251
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
6252
|
+
*/
|
|
6253
|
+
async search(params) {
|
|
6254
|
+
return this.client.request("/v1/loopnet/search", {
|
|
6255
|
+
params: {
|
|
6256
|
+
location: params.location,
|
|
6257
|
+
market: params.market,
|
|
6258
|
+
listing_type: params.listing_type,
|
|
6259
|
+
property_type: params.property_type,
|
|
6260
|
+
page: params.page,
|
|
6261
|
+
min_price: params.min_price,
|
|
6262
|
+
max_price: params.max_price,
|
|
6263
|
+
price_type: params.price_type,
|
|
6264
|
+
min_size: params.min_size,
|
|
6265
|
+
max_size: params.max_size
|
|
6266
|
+
}
|
|
6267
|
+
});
|
|
6268
|
+
}
|
|
6269
|
+
};
|
|
6270
|
+
|
|
6271
|
+
// src/loopnet/listings.ts
|
|
6272
|
+
var ListingsClient2 = class {
|
|
6273
|
+
client;
|
|
6274
|
+
constructor(client) {
|
|
6275
|
+
this.client = client;
|
|
6276
|
+
}
|
|
6277
|
+
/**
|
|
6278
|
+
* Get a single LoopNet listing's full detail by listing id.
|
|
6279
|
+
*
|
|
6280
|
+
* Costs 12 credits.
|
|
6281
|
+
*
|
|
6282
|
+
* @param listingId - The LoopNet listing id.
|
|
6283
|
+
* @param params - Optional market selector.
|
|
6284
|
+
* @returns Listing detail response.
|
|
6285
|
+
* @throws NotFoundError - If the listing doesn't exist.
|
|
6286
|
+
*/
|
|
6287
|
+
async get(listingId, params = {}) {
|
|
6288
|
+
return this.client.request(`/v1/loopnet/listings/${listingId}`, {
|
|
6289
|
+
params: { market: params.market }
|
|
6290
|
+
});
|
|
6291
|
+
}
|
|
6292
|
+
};
|
|
6293
|
+
|
|
6294
|
+
// src/loopnet/brokers.ts
|
|
6295
|
+
var BrokersClient = class {
|
|
6296
|
+
client;
|
|
6297
|
+
constructor(client) {
|
|
6298
|
+
this.client = client;
|
|
6299
|
+
}
|
|
6300
|
+
/**
|
|
6301
|
+
* Get a LoopNet broker's profile and their active listings.
|
|
6302
|
+
*
|
|
6303
|
+
* Costs 8 credits.
|
|
6304
|
+
*
|
|
6305
|
+
* @param slug - The broker's profile URL slug.
|
|
6306
|
+
* @param brokerId - The LoopNet broker id.
|
|
6307
|
+
* @param params - Optional market selector.
|
|
6308
|
+
* @returns Broker profile response with the broker and their listings.
|
|
6309
|
+
* @throws NotFoundError - If the broker doesn't exist.
|
|
6310
|
+
*/
|
|
6311
|
+
async get(slug, brokerId, params = {}) {
|
|
6312
|
+
return this.client.request(`/v1/loopnet/brokers/${slug}/${brokerId}`, {
|
|
6313
|
+
params: { market: params.market }
|
|
6314
|
+
});
|
|
6315
|
+
}
|
|
6316
|
+
};
|
|
6317
|
+
|
|
6318
|
+
// src/loopnet/reference.ts
|
|
6319
|
+
var ReferenceClient10 = class {
|
|
6320
|
+
client;
|
|
6321
|
+
constructor(client) {
|
|
6322
|
+
this.client = client;
|
|
6323
|
+
}
|
|
6324
|
+
/**
|
|
6325
|
+
* List LoopNet coverage markets (us, ca, uk, fr, es).
|
|
6326
|
+
*
|
|
6327
|
+
* Free — costs 0 credits.
|
|
6328
|
+
*
|
|
6329
|
+
* @returns Markets response with all supported coverage markets.
|
|
6330
|
+
*/
|
|
6331
|
+
async markets() {
|
|
6332
|
+
return this.client.request("/v1/loopnet/markets");
|
|
6333
|
+
}
|
|
6334
|
+
/**
|
|
6335
|
+
* List LoopNet property-type facets (Office, Retail, Industrial, …).
|
|
6336
|
+
*
|
|
6337
|
+
* Free — costs 0 credits.
|
|
6338
|
+
*
|
|
6339
|
+
* @returns Property-types response with all searchable property-type slugs.
|
|
6340
|
+
*/
|
|
6341
|
+
async propertyTypes() {
|
|
6342
|
+
return this.client.request("/v1/loopnet/property-types");
|
|
6343
|
+
}
|
|
6344
|
+
};
|
|
6345
|
+
|
|
6346
|
+
// src/loopnet/client.ts
|
|
6347
|
+
var LoopNetClient = class {
|
|
6348
|
+
/** Client for for-lease / for-sale / auction commercial-listing search */
|
|
6349
|
+
search;
|
|
6350
|
+
/** Client for listing detail (by listing id) */
|
|
6351
|
+
listings;
|
|
6352
|
+
/** Client for broker profile and their active listings */
|
|
6353
|
+
brokers;
|
|
6354
|
+
/** Client for reference data (markets, property types) */
|
|
6355
|
+
reference;
|
|
6356
|
+
/**
|
|
6357
|
+
* Create a new LoopNet client.
|
|
6358
|
+
*
|
|
6359
|
+
* @param client - The base HTTP client for making requests.
|
|
6360
|
+
*/
|
|
6361
|
+
constructor(client) {
|
|
6362
|
+
this.search = new SearchClient12(client);
|
|
6363
|
+
this.listings = new ListingsClient2(client);
|
|
6364
|
+
this.brokers = new BrokersClient(client);
|
|
6365
|
+
this.reference = new ReferenceClient10(client);
|
|
6366
|
+
}
|
|
6367
|
+
};
|
|
6368
|
+
|
|
6237
6369
|
// src/client.ts
|
|
6238
6370
|
var ScrapeBadger = class {
|
|
6239
6371
|
baseClient;
|
|
@@ -6265,6 +6397,8 @@ var ScrapeBadger = class {
|
|
|
6265
6397
|
zillow;
|
|
6266
6398
|
/** Immobiliare scraper API client — 8 endpoints across 4 markets (it, es, gr, lu) */
|
|
6267
6399
|
immobiliare;
|
|
6400
|
+
/** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */
|
|
6401
|
+
loopnet;
|
|
6268
6402
|
/**
|
|
6269
6403
|
* Create a new ScrapeBadger client.
|
|
6270
6404
|
*
|
|
@@ -6313,6 +6447,7 @@ var ScrapeBadger = class {
|
|
|
6313
6447
|
this.leboncoin = new LeboncoinClient(this.baseClient);
|
|
6314
6448
|
this.zillow = new ZillowClient(this.baseClient);
|
|
6315
6449
|
this.immobiliare = new ImmobiliareClient(this.baseClient);
|
|
6450
|
+
this.loopnet = new LoopNetClient(this.baseClient);
|
|
6316
6451
|
}
|
|
6317
6452
|
};
|
|
6318
6453
|
|
|
@@ -6360,6 +6495,11 @@ exports.LeboncoinReferenceClient = ReferenceClient8;
|
|
|
6360
6495
|
exports.LeboncoinSearchClient = SearchClient10;
|
|
6361
6496
|
exports.LeboncoinSellersClient = SellersClient3;
|
|
6362
6497
|
exports.ListsClient = ListsClient;
|
|
6498
|
+
exports.LoopNetBrokersClient = BrokersClient;
|
|
6499
|
+
exports.LoopNetClient = LoopNetClient;
|
|
6500
|
+
exports.LoopNetListingsClient = ListingsClient2;
|
|
6501
|
+
exports.LoopNetReferenceClient = ReferenceClient10;
|
|
6502
|
+
exports.LoopNetSearchClient = SearchClient12;
|
|
6363
6503
|
exports.NotFoundError = NotFoundError;
|
|
6364
6504
|
exports.RateLimitError = RateLimitError;
|
|
6365
6505
|
exports.RealtorClient = RealtorClient;
|