scrapebadger 0.15.3 → 0.15.5
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 +1062 -96
- package/dist/index.d.ts +1062 -96
- package/dist/index.js +306 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +298 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -5664,6 +5664,297 @@ var YoutubeClient = class {
|
|
|
5664
5664
|
}
|
|
5665
5665
|
};
|
|
5666
5666
|
|
|
5667
|
+
// src/realtor/search.ts
|
|
5668
|
+
var SearchClient9 = class {
|
|
5669
|
+
client;
|
|
5670
|
+
constructor(client) {
|
|
5671
|
+
this.client = client;
|
|
5672
|
+
}
|
|
5673
|
+
/**
|
|
5674
|
+
* Search a market for properties.
|
|
5675
|
+
*
|
|
5676
|
+
* @param location - Freetext location ("Austin, TX" / ZIP / "Toronto, ON").
|
|
5677
|
+
* Required unless a CA bounding box is provided.
|
|
5678
|
+
* @param options - Filters, sorting, and pagination.
|
|
5679
|
+
* @returns Search results with pagination metadata.
|
|
5680
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
5681
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
5682
|
+
*/
|
|
5683
|
+
async search(location, options = {}) {
|
|
5684
|
+
return this.client.request("/v1/realtor/search", {
|
|
5685
|
+
params: {
|
|
5686
|
+
location,
|
|
5687
|
+
market: options.market,
|
|
5688
|
+
status: options.status,
|
|
5689
|
+
price_min: options.priceMin,
|
|
5690
|
+
price_max: options.priceMax,
|
|
5691
|
+
beds_min: options.bedsMin,
|
|
5692
|
+
baths_min: options.bathsMin,
|
|
5693
|
+
sqft_min: options.sqftMin,
|
|
5694
|
+
sqft_max: options.sqftMax,
|
|
5695
|
+
property_type: options.propertyType,
|
|
5696
|
+
sort: options.sort,
|
|
5697
|
+
page: options.page,
|
|
5698
|
+
limit: options.limit,
|
|
5699
|
+
lat_min: options.latMin,
|
|
5700
|
+
lat_max: options.latMax,
|
|
5701
|
+
lng_min: options.lngMin,
|
|
5702
|
+
lng_max: options.lngMax
|
|
5703
|
+
}
|
|
5704
|
+
});
|
|
5705
|
+
}
|
|
5706
|
+
/**
|
|
5707
|
+
* Get location autocomplete suggestions.
|
|
5708
|
+
*
|
|
5709
|
+
* @param query - Partial location query.
|
|
5710
|
+
* @param options - Optional parameters (market, limit).
|
|
5711
|
+
* @returns Autocomplete suggestions.
|
|
5712
|
+
*/
|
|
5713
|
+
async autocomplete(query, options = {}) {
|
|
5714
|
+
return this.client.request("/v1/realtor/autocomplete", {
|
|
5715
|
+
params: { query, market: options.market, limit: options.limit }
|
|
5716
|
+
});
|
|
5717
|
+
}
|
|
5718
|
+
};
|
|
5719
|
+
|
|
5720
|
+
// src/realtor/properties.ts
|
|
5721
|
+
var PropertiesClient = class {
|
|
5722
|
+
client;
|
|
5723
|
+
constructor(client) {
|
|
5724
|
+
this.client = client;
|
|
5725
|
+
}
|
|
5726
|
+
/**
|
|
5727
|
+
* Get a single property's full detail.
|
|
5728
|
+
*
|
|
5729
|
+
* @param propertyId - The property id.
|
|
5730
|
+
* @param options - Optional parameters (market).
|
|
5731
|
+
* @returns Property detail including details, amenities, and history.
|
|
5732
|
+
* @throws NotFoundError - If the property doesn't exist.
|
|
5733
|
+
*/
|
|
5734
|
+
async getProperty(propertyId, options = {}) {
|
|
5735
|
+
return this.client.request(`/v1/realtor/properties/${propertyId}`, {
|
|
5736
|
+
params: { market: options.market }
|
|
5737
|
+
});
|
|
5738
|
+
}
|
|
5739
|
+
};
|
|
5740
|
+
|
|
5741
|
+
// src/realtor/reference.ts
|
|
5742
|
+
var ReferenceClient7 = class {
|
|
5743
|
+
client;
|
|
5744
|
+
constructor(client) {
|
|
5745
|
+
this.client = client;
|
|
5746
|
+
}
|
|
5747
|
+
/**
|
|
5748
|
+
* Get all supported realtor markets.
|
|
5749
|
+
*
|
|
5750
|
+
* @returns Markets response with all supported markets.
|
|
5751
|
+
*/
|
|
5752
|
+
async listMarkets() {
|
|
5753
|
+
return this.client.request("/v1/realtor/markets");
|
|
5754
|
+
}
|
|
5755
|
+
};
|
|
5756
|
+
|
|
5757
|
+
// src/realtor/client.ts
|
|
5758
|
+
var RealtorClient = class {
|
|
5759
|
+
/** Client for property search and location autocomplete */
|
|
5760
|
+
search;
|
|
5761
|
+
/** Client for full property detail */
|
|
5762
|
+
properties;
|
|
5763
|
+
/** Client for reference data (markets) */
|
|
5764
|
+
reference;
|
|
5765
|
+
/**
|
|
5766
|
+
* Create a new Realtor client.
|
|
5767
|
+
*
|
|
5768
|
+
* @param client - The base HTTP client for making requests.
|
|
5769
|
+
*/
|
|
5770
|
+
constructor(client) {
|
|
5771
|
+
this.search = new SearchClient9(client);
|
|
5772
|
+
this.properties = new PropertiesClient(client);
|
|
5773
|
+
this.reference = new ReferenceClient7(client);
|
|
5774
|
+
}
|
|
5775
|
+
};
|
|
5776
|
+
|
|
5777
|
+
// src/leboncoin/search.ts
|
|
5778
|
+
var SearchClient10 = class {
|
|
5779
|
+
client;
|
|
5780
|
+
constructor(client) {
|
|
5781
|
+
this.client = client;
|
|
5782
|
+
}
|
|
5783
|
+
/**
|
|
5784
|
+
* Search Leboncoin classified ads.
|
|
5785
|
+
*
|
|
5786
|
+
* France is a single market; scope results with `region_id` /
|
|
5787
|
+
* `department_id` / `city` (DOM-TOM are region values).
|
|
5788
|
+
*
|
|
5789
|
+
* @param params - Search parameters including text, filters, and pagination.
|
|
5790
|
+
* @returns Search results with ads, totals, and pagination metadata.
|
|
5791
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
5792
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
5793
|
+
*/
|
|
5794
|
+
async search(params = {}) {
|
|
5795
|
+
return this.client.request("/v1/leboncoin/search", {
|
|
5796
|
+
params: {
|
|
5797
|
+
text: params.text,
|
|
5798
|
+
category: params.category,
|
|
5799
|
+
region_id: params.region_id,
|
|
5800
|
+
department_id: params.department_id,
|
|
5801
|
+
city: params.city,
|
|
5802
|
+
zipcode: params.zipcode,
|
|
5803
|
+
price_min: params.price_min,
|
|
5804
|
+
price_max: params.price_max,
|
|
5805
|
+
owner_type: params.owner_type,
|
|
5806
|
+
ad_type: params.ad_type,
|
|
5807
|
+
sort: params.sort,
|
|
5808
|
+
page: params.page,
|
|
5809
|
+
limit: params.limit
|
|
5810
|
+
}
|
|
5811
|
+
});
|
|
5812
|
+
}
|
|
5813
|
+
};
|
|
5814
|
+
|
|
5815
|
+
// src/leboncoin/ads.ts
|
|
5816
|
+
var AdsClient2 = class {
|
|
5817
|
+
client;
|
|
5818
|
+
constructor(client) {
|
|
5819
|
+
this.client = client;
|
|
5820
|
+
}
|
|
5821
|
+
/**
|
|
5822
|
+
* Get a single Leboncoin ad's full detail.
|
|
5823
|
+
*
|
|
5824
|
+
* @param listId - The Leboncoin ad list id.
|
|
5825
|
+
* @returns Ad detail response.
|
|
5826
|
+
* @throws NotFoundError - If the ad doesn't exist.
|
|
5827
|
+
*/
|
|
5828
|
+
async get(listId) {
|
|
5829
|
+
return this.client.request(`/v1/leboncoin/ads/${listId}`);
|
|
5830
|
+
}
|
|
5831
|
+
/**
|
|
5832
|
+
* Get the ads Leboncoin surfaces as similar to a given ad.
|
|
5833
|
+
*
|
|
5834
|
+
* @param listId - The Leboncoin ad list id.
|
|
5835
|
+
* @param options - Optional parameters (limit).
|
|
5836
|
+
* @returns Similar-ads response.
|
|
5837
|
+
*/
|
|
5838
|
+
async similar(listId, options = {}) {
|
|
5839
|
+
return this.client.request(
|
|
5840
|
+
`/v1/leboncoin/ads/${listId}/similar`,
|
|
5841
|
+
{ params: { limit: options.limit } }
|
|
5842
|
+
);
|
|
5843
|
+
}
|
|
5844
|
+
};
|
|
5845
|
+
|
|
5846
|
+
// src/leboncoin/sellers.ts
|
|
5847
|
+
var SellersClient3 = class {
|
|
5848
|
+
client;
|
|
5849
|
+
constructor(client) {
|
|
5850
|
+
this.client = client;
|
|
5851
|
+
}
|
|
5852
|
+
/**
|
|
5853
|
+
* Get a Leboncoin seller's public profile.
|
|
5854
|
+
*
|
|
5855
|
+
* @param userId - The seller user id.
|
|
5856
|
+
* @returns Seller profile response.
|
|
5857
|
+
* @throws NotFoundError - If the seller doesn't exist.
|
|
5858
|
+
*/
|
|
5859
|
+
async get(userId) {
|
|
5860
|
+
return this.client.request(
|
|
5861
|
+
`/v1/leboncoin/sellers/${userId}`
|
|
5862
|
+
);
|
|
5863
|
+
}
|
|
5864
|
+
/**
|
|
5865
|
+
* List a Leboncoin seller's active ads.
|
|
5866
|
+
*
|
|
5867
|
+
* @param userId - The seller user id.
|
|
5868
|
+
* @param options - Optional parameters (page, limit).
|
|
5869
|
+
* @returns Seller listings response with ads and pagination.
|
|
5870
|
+
*/
|
|
5871
|
+
async listings(userId, options = {}) {
|
|
5872
|
+
return this.client.request(
|
|
5873
|
+
`/v1/leboncoin/sellers/${userId}/listings`,
|
|
5874
|
+
{ params: { page: options.page, limit: options.limit } }
|
|
5875
|
+
);
|
|
5876
|
+
}
|
|
5877
|
+
};
|
|
5878
|
+
|
|
5879
|
+
// src/leboncoin/reference.ts
|
|
5880
|
+
var ReferenceClient8 = class {
|
|
5881
|
+
client;
|
|
5882
|
+
constructor(client) {
|
|
5883
|
+
this.client = client;
|
|
5884
|
+
}
|
|
5885
|
+
/**
|
|
5886
|
+
* List all Leboncoin categories.
|
|
5887
|
+
*
|
|
5888
|
+
* @returns Categories response.
|
|
5889
|
+
*/
|
|
5890
|
+
async categories() {
|
|
5891
|
+
return this.client.request("/v1/leboncoin/categories");
|
|
5892
|
+
}
|
|
5893
|
+
/**
|
|
5894
|
+
* List all Leboncoin regions.
|
|
5895
|
+
*
|
|
5896
|
+
* @returns Regions response.
|
|
5897
|
+
*/
|
|
5898
|
+
async regions() {
|
|
5899
|
+
return this.client.request("/v1/leboncoin/regions");
|
|
5900
|
+
}
|
|
5901
|
+
/**
|
|
5902
|
+
* List Leboncoin departments, optionally filtered by region.
|
|
5903
|
+
*
|
|
5904
|
+
* @param options - Optional parameters (region_id).
|
|
5905
|
+
* @returns Departments response.
|
|
5906
|
+
*/
|
|
5907
|
+
async departments(options = {}) {
|
|
5908
|
+
return this.client.request(
|
|
5909
|
+
"/v1/leboncoin/departments",
|
|
5910
|
+
{ params: { region_id: options.region_id } }
|
|
5911
|
+
);
|
|
5912
|
+
}
|
|
5913
|
+
/**
|
|
5914
|
+
* Resolve a place name to Leboncoin location ids (for building filters).
|
|
5915
|
+
*
|
|
5916
|
+
* @param query - Place name to resolve.
|
|
5917
|
+
* @returns Location search response with suggestions.
|
|
5918
|
+
*/
|
|
5919
|
+
async locations(query) {
|
|
5920
|
+
return this.client.request(
|
|
5921
|
+
"/v1/leboncoin/locations/search",
|
|
5922
|
+
{ params: { q: query } }
|
|
5923
|
+
);
|
|
5924
|
+
}
|
|
5925
|
+
/**
|
|
5926
|
+
* List the supported Leboncoin markets (France is the single market).
|
|
5927
|
+
*
|
|
5928
|
+
* @returns Markets response.
|
|
5929
|
+
*/
|
|
5930
|
+
async markets() {
|
|
5931
|
+
return this.client.request("/v1/leboncoin/markets");
|
|
5932
|
+
}
|
|
5933
|
+
};
|
|
5934
|
+
|
|
5935
|
+
// src/leboncoin/client.ts
|
|
5936
|
+
var LeboncoinClient = class {
|
|
5937
|
+
/** Client for ad search */
|
|
5938
|
+
search;
|
|
5939
|
+
/** Client for ad detail and similar ads */
|
|
5940
|
+
ads;
|
|
5941
|
+
/** Client for seller profile and listings */
|
|
5942
|
+
sellers;
|
|
5943
|
+
/** Client for reference data (categories, regions, departments, locations, markets) */
|
|
5944
|
+
reference;
|
|
5945
|
+
/**
|
|
5946
|
+
* Create a new Leboncoin client.
|
|
5947
|
+
*
|
|
5948
|
+
* @param client - The base HTTP client for making requests.
|
|
5949
|
+
*/
|
|
5950
|
+
constructor(client) {
|
|
5951
|
+
this.search = new SearchClient10(client);
|
|
5952
|
+
this.ads = new AdsClient2(client);
|
|
5953
|
+
this.sellers = new SellersClient3(client);
|
|
5954
|
+
this.reference = new ReferenceClient8(client);
|
|
5955
|
+
}
|
|
5956
|
+
};
|
|
5957
|
+
|
|
5667
5958
|
// src/client.ts
|
|
5668
5959
|
var ScrapeBadger = class {
|
|
5669
5960
|
baseClient;
|
|
@@ -5687,6 +5978,10 @@ var ScrapeBadger = class {
|
|
|
5687
5978
|
ebay;
|
|
5688
5979
|
/** YouTube scraper API client — 39 endpoints */
|
|
5689
5980
|
youtube;
|
|
5981
|
+
/** Realtor scraper API client — 4 endpoints across 2 markets (us, ca) */
|
|
5982
|
+
realtor;
|
|
5983
|
+
/** Leboncoin scraper API client — 10 endpoints (France) */
|
|
5984
|
+
leboncoin;
|
|
5690
5985
|
/**
|
|
5691
5986
|
* Create a new ScrapeBadger client.
|
|
5692
5987
|
*
|
|
@@ -5731,9 +6026,11 @@ var ScrapeBadger = class {
|
|
|
5731
6026
|
this.tiktok = new TikTokClient(this.baseClient);
|
|
5732
6027
|
this.ebay = new EbayClient(this.baseClient);
|
|
5733
6028
|
this.youtube = new YoutubeClient(this.baseClient);
|
|
6029
|
+
this.realtor = new RealtorClient(this.baseClient);
|
|
6030
|
+
this.leboncoin = new LeboncoinClient(this.baseClient);
|
|
5734
6031
|
}
|
|
5735
6032
|
};
|
|
5736
6033
|
|
|
5737
|
-
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, ListsClient, NotFoundError, RateLimitError, 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, collectAll, verifyWebhookSignature };
|
|
6034
|
+
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, collectAll, verifyWebhookSignature };
|
|
5738
6035
|
//# sourceMappingURL=index.mjs.map
|
|
5739
6036
|
//# sourceMappingURL=index.mjs.map
|