scrapebadger 0.15.4 → 0.15.6

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.mjs CHANGED
@@ -5774,6 +5774,330 @@ var RealtorClient = class {
5774
5774
  }
5775
5775
  };
5776
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
+
5958
+ // src/zillow/search.ts
5959
+ var SearchClient11 = class {
5960
+ client;
5961
+ constructor(client) {
5962
+ this.client = client;
5963
+ }
5964
+ /**
5965
+ * Search Zillow for properties.
5966
+ *
5967
+ * Beat the ~820-result (20-page) cap by re-issuing the search over
5968
+ * subdivided `north/south/east/west` map-bound boxes returned in
5969
+ * `map_bounds`.
5970
+ *
5971
+ * @param location - City/state, ZIP, address, or neighborhood ("Austin, TX").
5972
+ * @param options - Filters, sorting, pagination, and map bounds.
5973
+ * @returns Search results with pagination and map metadata.
5974
+ * @throws AuthenticationError - If the API key is invalid.
5975
+ * @throws ValidationError - If the parameters are invalid.
5976
+ */
5977
+ async search(location, options = {}) {
5978
+ return this.client.request("/v1/zillow/search", {
5979
+ params: {
5980
+ location,
5981
+ status: options.status,
5982
+ page: options.page,
5983
+ sort: options.sort,
5984
+ price_min: options.priceMin,
5985
+ price_max: options.priceMax,
5986
+ beds_min: options.bedsMin,
5987
+ baths_min: options.bathsMin,
5988
+ home_type: options.homeType,
5989
+ sqft_min: options.sqftMin,
5990
+ sqft_max: options.sqftMax,
5991
+ lot_min: options.lotMin,
5992
+ lot_max: options.lotMax,
5993
+ year_built_min: options.yearBuiltMin,
5994
+ year_built_max: options.yearBuiltMax,
5995
+ hoa_max: options.hoaMax,
5996
+ keywords: options.keywords,
5997
+ days_on: options.daysOn,
5998
+ north: options.north,
5999
+ south: options.south,
6000
+ east: options.east,
6001
+ west: options.west
6002
+ }
6003
+ });
6004
+ }
6005
+ /**
6006
+ * Resolve a search term to Zillow regions/addresses (regionId, lat/lng).
6007
+ *
6008
+ * @param query - Partial location — city, ZIP, address, or neighborhood.
6009
+ * @returns Autocomplete suggestions.
6010
+ */
6011
+ async autocomplete(query) {
6012
+ return this.client.request("/v1/zillow/autocomplete", {
6013
+ params: { query }
6014
+ });
6015
+ }
6016
+ };
6017
+
6018
+ // src/zillow/properties.ts
6019
+ var PropertiesClient2 = class {
6020
+ client;
6021
+ constructor(client) {
6022
+ this.client = client;
6023
+ }
6024
+ /**
6025
+ * Get a single Zillow property's full detail by its zpid.
6026
+ *
6027
+ * Returns price/valuation, specs, resoFacts (home_facts), price & tax
6028
+ * history, schools, listing agent, mortgage rates and photos.
6029
+ *
6030
+ * @param zpid - The Zillow property id.
6031
+ * @returns Property detail wrapped in `{ property }`.
6032
+ * @throws NotFoundError - If the property doesn't exist.
6033
+ */
6034
+ async getProperty(zpid) {
6035
+ return this.client.request(`/v1/zillow/property/${zpid}`);
6036
+ }
6037
+ };
6038
+
6039
+ // src/zillow/agent.ts
6040
+ var AgentClient = class {
6041
+ client;
6042
+ constructor(client) {
6043
+ this.client = client;
6044
+ }
6045
+ /**
6046
+ * Get a Zillow real-estate professional's profile and their active listings.
6047
+ *
6048
+ * Provide either a `username` (screen name) or a full `url`.
6049
+ *
6050
+ * @param options - The agent `username` or profile `url`.
6051
+ * @returns Agent profile wrapped in `{ agent }`.
6052
+ * @throws NotFoundError - If the agent doesn't exist.
6053
+ * @throws ValidationError - If neither username nor url is provided.
6054
+ */
6055
+ async getAgent(options = {}) {
6056
+ return this.client.request("/v1/zillow/agent", {
6057
+ params: { username: options.username, url: options.url }
6058
+ });
6059
+ }
6060
+ };
6061
+
6062
+ // src/zillow/reference.ts
6063
+ var ReferenceClient9 = class {
6064
+ client;
6065
+ constructor(client) {
6066
+ this.client = client;
6067
+ }
6068
+ /**
6069
+ * List Zillow coverage regions (US + Canada, all served via zillow.com).
6070
+ *
6071
+ * @returns Markets response with all supported markets.
6072
+ */
6073
+ async listMarkets() {
6074
+ return this.client.request("/v1/zillow/markets");
6075
+ }
6076
+ };
6077
+
6078
+ // src/zillow/client.ts
6079
+ var ZillowClient = class {
6080
+ /** Client for property search and location autocomplete */
6081
+ search;
6082
+ /** Client for full property detail */
6083
+ properties;
6084
+ /** Client for agent profile + listings */
6085
+ agent;
6086
+ /** Client for reference data (markets) */
6087
+ reference;
6088
+ /**
6089
+ * Create a new Zillow client.
6090
+ *
6091
+ * @param client - The base HTTP client for making requests.
6092
+ */
6093
+ constructor(client) {
6094
+ this.search = new SearchClient11(client);
6095
+ this.properties = new PropertiesClient2(client);
6096
+ this.agent = new AgentClient(client);
6097
+ this.reference = new ReferenceClient9(client);
6098
+ }
6099
+ };
6100
+
5777
6101
  // src/client.ts
5778
6102
  var ScrapeBadger = class {
5779
6103
  baseClient;
@@ -5799,6 +6123,10 @@ var ScrapeBadger = class {
5799
6123
  youtube;
5800
6124
  /** Realtor scraper API client — 4 endpoints across 2 markets (us, ca) */
5801
6125
  realtor;
6126
+ /** Leboncoin scraper API client — 10 endpoints (France) */
6127
+ leboncoin;
6128
+ /** Zillow scraper API client — 5 endpoints (search, property, agent, autocomplete, markets) */
6129
+ zillow;
5802
6130
  /**
5803
6131
  * Create a new ScrapeBadger client.
5804
6132
  *
@@ -5844,9 +6172,11 @@ var ScrapeBadger = class {
5844
6172
  this.ebay = new EbayClient(this.baseClient);
5845
6173
  this.youtube = new YoutubeClient(this.baseClient);
5846
6174
  this.realtor = new RealtorClient(this.baseClient);
6175
+ this.leboncoin = new LeboncoinClient(this.baseClient);
6176
+ this.zillow = new ZillowClient(this.baseClient);
5847
6177
  }
5848
6178
  };
5849
6179
 
5850
- 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, 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 };
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 };
5851
6181
  //# sourceMappingURL=index.mjs.map
5852
6182
  //# sourceMappingURL=index.mjs.map