scrapebadger 0.17.0 → 0.19.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
@@ -3943,6 +3943,101 @@ var RedditClient = class {
3943
3943
  }
3944
3944
  };
3945
3945
 
3946
+ // src/redfin/client.ts
3947
+ var RedfinClient = class {
3948
+ client;
3949
+ constructor(client) {
3950
+ this.client = client;
3951
+ }
3952
+ /**
3953
+ * Search Redfin for for-sale properties.
3954
+ *
3955
+ * @param location - City/state, ZIP, address or neighborhood (required).
3956
+ * @param options - Optional parameters (page, sort, price/beds/baths/sqft/lot
3957
+ * filters, year built, max days on market, bbox override).
3958
+ * @returns Search response with matching listings, map bounds, and pagination.
3959
+ * @throws AuthenticationError - If the API key is invalid.
3960
+ * @throws ValidationError - If the parameters are invalid.
3961
+ */
3962
+ async search(location, options = {}) {
3963
+ return this.client.request("/v1/redfin/search", {
3964
+ params: {
3965
+ location,
3966
+ page: options.page,
3967
+ sort: options.sort,
3968
+ price_min: options.price_min,
3969
+ price_max: options.price_max,
3970
+ beds_min: options.beds_min,
3971
+ baths_min: options.baths_min,
3972
+ home_type: options.home_type,
3973
+ sqft_min: options.sqft_min,
3974
+ sqft_max: options.sqft_max,
3975
+ lot_min: options.lot_min,
3976
+ lot_max: options.lot_max,
3977
+ year_built_min: options.year_built_min,
3978
+ year_built_max: options.year_built_max,
3979
+ max_days_on_market: options.max_days_on_market,
3980
+ north: options.north,
3981
+ south: options.south,
3982
+ east: options.east,
3983
+ west: options.west
3984
+ }
3985
+ });
3986
+ }
3987
+ /**
3988
+ * Get a single Redfin property's full detail by id or URL.
3989
+ *
3990
+ * Provide either `propertyId` or `options.url`.
3991
+ *
3992
+ * @param propertyId - The Redfin property id.
3993
+ * @param options - Optional parameters (url).
3994
+ * @returns Property detail response.
3995
+ * @throws NotFoundError - If the property doesn't exist.
3996
+ */
3997
+ async getProperty(propertyId, options = {}) {
3998
+ if (options.url) {
3999
+ return this.client.request("/v1/redfin/property", {
4000
+ params: { url: options.url }
4001
+ });
4002
+ }
4003
+ return this.client.request(`/v1/redfin/property/${propertyId}`);
4004
+ }
4005
+ /**
4006
+ * Get a Redfin agent's profile and their active listings.
4007
+ *
4008
+ * Provide either `agentId` or `options.url`.
4009
+ *
4010
+ * @param agentId - The Redfin agent slug.
4011
+ * @param options - Optional parameters (url).
4012
+ * @returns Agent profile response with the agent and their listings.
4013
+ * @throws NotFoundError - If the agent doesn't exist.
4014
+ */
4015
+ async getAgent(agentId, options = {}) {
4016
+ return this.client.request("/v1/redfin/agent", {
4017
+ params: { agent_id: agentId, url: options.url }
4018
+ });
4019
+ }
4020
+ /**
4021
+ * Resolve a search term to Redfin locations.
4022
+ *
4023
+ * @param query - Partial location — city, ZIP, address, or neighborhood.
4024
+ * @returns Autocomplete response with location suggestions.
4025
+ */
4026
+ async autocomplete(query) {
4027
+ return this.client.request("/v1/redfin/autocomplete", {
4028
+ params: { query }
4029
+ });
4030
+ }
4031
+ /**
4032
+ * Get all supported Redfin coverage markets.
4033
+ *
4034
+ * @returns Markets response with all supported markets.
4035
+ */
4036
+ async listMarkets() {
4037
+ return this.client.request("/v1/redfin/markets");
4038
+ }
4039
+ };
4040
+
3946
4041
  // src/amazon/search.ts
3947
4042
  var SearchClient4 = class {
3948
4043
  client;
@@ -6366,6 +6461,103 @@ var LoopNetClient = class {
6366
6461
  }
6367
6462
  };
6368
6463
 
6464
+ // src/depop/client.ts
6465
+ var DepopClient = class {
6466
+ client;
6467
+ constructor(client) {
6468
+ this.client = client;
6469
+ }
6470
+ /**
6471
+ * Search Depop for products.
6472
+ *
6473
+ * Costs 10 credits.
6474
+ *
6475
+ * @param query - Search keywords (required).
6476
+ * @param options - Optional parameters (market, perPage, page, price/brand/
6477
+ * size/colour/condition/gender filters, sort).
6478
+ * @returns Search response with matching product cards and pagination meta.
6479
+ * @throws AuthenticationError - If the API key is invalid.
6480
+ * @throws ValidationError - If the parameters are invalid.
6481
+ */
6482
+ async search(query, options = {}) {
6483
+ return this.client.request("/v1/depop/search", {
6484
+ params: {
6485
+ query,
6486
+ market: options.market ?? "us",
6487
+ per_page: options.perPage,
6488
+ page: options.page,
6489
+ price_min: options.priceMin,
6490
+ price_max: options.priceMax,
6491
+ brands: options.brands,
6492
+ sizes: options.sizes,
6493
+ colours: options.colours,
6494
+ conditions: options.conditions,
6495
+ gender: options.gender,
6496
+ sort: options.sort
6497
+ }
6498
+ });
6499
+ }
6500
+ /**
6501
+ * Get a single Depop product's full detail by slug.
6502
+ *
6503
+ * Costs 10 credits.
6504
+ *
6505
+ * @param slug - The Depop product slug.
6506
+ * @param options - Optional parameters (market).
6507
+ * @returns Full product detail.
6508
+ * @throws NotFoundError - If the product doesn't exist.
6509
+ */
6510
+ async getProduct(slug, options = {}) {
6511
+ return this.client.request(`/v1/depop/products/${slug}`, {
6512
+ params: { market: options.market ?? "us" }
6513
+ });
6514
+ }
6515
+ /**
6516
+ * Get a Depop shop / seller profile by username.
6517
+ *
6518
+ * Costs 10 credits.
6519
+ *
6520
+ * @param username - The Depop seller username.
6521
+ * @param options - Optional parameters (market).
6522
+ * @returns Shop profile.
6523
+ * @throws NotFoundError - If the user doesn't exist.
6524
+ */
6525
+ async getUser(username, options = {}) {
6526
+ return this.client.request(`/v1/depop/users/${username}`, {
6527
+ params: { market: options.market ?? "us" }
6528
+ });
6529
+ }
6530
+ /**
6531
+ * Get a Depop seller's products.
6532
+ *
6533
+ * Costs 10 credits.
6534
+ *
6535
+ * @param username - The Depop seller username.
6536
+ * @param options - Optional parameters (market, perPage, page).
6537
+ * @returns User products response with product cards and pagination meta.
6538
+ * @throws NotFoundError - If the user doesn't exist.
6539
+ */
6540
+ async getUserProducts(username, options = {}) {
6541
+ return this.client.request(`/v1/depop/users/${username}/products`, {
6542
+ params: {
6543
+ market: options.market ?? "us",
6544
+ per_page: options.perPage,
6545
+ page: options.page
6546
+ }
6547
+ });
6548
+ }
6549
+ /**
6550
+ * Get all supported Depop markets.
6551
+ *
6552
+ * Free — this endpoint costs no credits.
6553
+ *
6554
+ * @returns Markets response with all supported markets.
6555
+ */
6556
+ async listMarkets() {
6557
+ return this.client.request("/v1/depop/markets");
6558
+ }
6559
+ };
6560
+
6369
6561
  // src/client.ts
6370
6562
  var ScrapeBadger = class {
6371
6563
  baseClient;
@@ -6379,6 +6571,8 @@ var ScrapeBadger = class {
6379
6571
  google;
6380
6572
  /** Reddit scraper API client */
6381
6573
  reddit;
6574
+ /** Redfin scraper API client — search, property, agent, autocomplete, markets (redfin.com, US) */
6575
+ redfin;
6382
6576
  /** Amazon scraper API client — 14 endpoints */
6383
6577
  amazon;
6384
6578
  /** Shopee scraper API client — 6 endpoints across 11 markets */
@@ -6399,6 +6593,8 @@ var ScrapeBadger = class {
6399
6593
  immobiliare;
6400
6594
  /** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */
6401
6595
  loopnet;
6596
+ /** Depop scraper API client — search, product, user, user products, markets (www.depop.com, 10 markets) */
6597
+ depop;
6402
6598
  /**
6403
6599
  * Create a new ScrapeBadger client.
6404
6600
  *
@@ -6438,6 +6634,7 @@ var ScrapeBadger = class {
6438
6634
  this.vinted = new VintedClient(this.baseClient);
6439
6635
  this.google = new GoogleClient(this.baseClient);
6440
6636
  this.reddit = new RedditClient(this.baseClient);
6637
+ this.redfin = new RedfinClient(this.baseClient);
6441
6638
  this.amazon = new AmazonClient(this.baseClient);
6442
6639
  this.shopee = new ShopeeClient(this.baseClient);
6443
6640
  this.tiktok = new TikTokClient(this.baseClient);
@@ -6448,6 +6645,7 @@ var ScrapeBadger = class {
6448
6645
  this.zillow = new ZillowClient(this.baseClient);
6449
6646
  this.immobiliare = new ImmobiliareClient(this.baseClient);
6450
6647
  this.loopnet = new LoopNetClient(this.baseClient);
6648
+ this.depop = new DepopClient(this.baseClient);
6451
6649
  }
6452
6650
  };
6453
6651
 
@@ -6461,6 +6659,7 @@ exports.AmazonSellersClient = SellersClient;
6461
6659
  exports.AuthenticationError = AuthenticationError;
6462
6660
  exports.CommunitiesClient = CommunitiesClient;
6463
6661
  exports.ConflictError = ConflictError;
6662
+ exports.DepopClient = DepopClient;
6464
6663
  exports.EbayCategoriesClient = CategoriesClient;
6465
6664
  exports.EbayClient = EbayClient;
6466
6665
  exports.EbayItemsClient = ItemsClient2;
@@ -6511,6 +6710,7 @@ exports.RedditPostsClient = PostsClient;
6511
6710
  exports.RedditSearchClient = SearchClient3;
6512
6711
  exports.RedditSubredditsClient = SubredditsClient;
6513
6712
  exports.RedditUsersClient = UsersClient3;
6713
+ exports.RedfinClient = RedfinClient;
6514
6714
  exports.ScrapeBadger = ScrapeBadger;
6515
6715
  exports.ScrapeBadgerError = ScrapeBadgerError;
6516
6716
  exports.ServerError = ServerError;