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.d.cts +691 -5
- package/dist/index.d.ts +691 -5
- package/dist/index.js +200 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3937,6 +3937,101 @@ var RedditClient = class {
|
|
|
3937
3937
|
}
|
|
3938
3938
|
};
|
|
3939
3939
|
|
|
3940
|
+
// src/redfin/client.ts
|
|
3941
|
+
var RedfinClient = class {
|
|
3942
|
+
client;
|
|
3943
|
+
constructor(client) {
|
|
3944
|
+
this.client = client;
|
|
3945
|
+
}
|
|
3946
|
+
/**
|
|
3947
|
+
* Search Redfin for for-sale properties.
|
|
3948
|
+
*
|
|
3949
|
+
* @param location - City/state, ZIP, address or neighborhood (required).
|
|
3950
|
+
* @param options - Optional parameters (page, sort, price/beds/baths/sqft/lot
|
|
3951
|
+
* filters, year built, max days on market, bbox override).
|
|
3952
|
+
* @returns Search response with matching listings, map bounds, and pagination.
|
|
3953
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
3954
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
3955
|
+
*/
|
|
3956
|
+
async search(location, options = {}) {
|
|
3957
|
+
return this.client.request("/v1/redfin/search", {
|
|
3958
|
+
params: {
|
|
3959
|
+
location,
|
|
3960
|
+
page: options.page,
|
|
3961
|
+
sort: options.sort,
|
|
3962
|
+
price_min: options.price_min,
|
|
3963
|
+
price_max: options.price_max,
|
|
3964
|
+
beds_min: options.beds_min,
|
|
3965
|
+
baths_min: options.baths_min,
|
|
3966
|
+
home_type: options.home_type,
|
|
3967
|
+
sqft_min: options.sqft_min,
|
|
3968
|
+
sqft_max: options.sqft_max,
|
|
3969
|
+
lot_min: options.lot_min,
|
|
3970
|
+
lot_max: options.lot_max,
|
|
3971
|
+
year_built_min: options.year_built_min,
|
|
3972
|
+
year_built_max: options.year_built_max,
|
|
3973
|
+
max_days_on_market: options.max_days_on_market,
|
|
3974
|
+
north: options.north,
|
|
3975
|
+
south: options.south,
|
|
3976
|
+
east: options.east,
|
|
3977
|
+
west: options.west
|
|
3978
|
+
}
|
|
3979
|
+
});
|
|
3980
|
+
}
|
|
3981
|
+
/**
|
|
3982
|
+
* Get a single Redfin property's full detail by id or URL.
|
|
3983
|
+
*
|
|
3984
|
+
* Provide either `propertyId` or `options.url`.
|
|
3985
|
+
*
|
|
3986
|
+
* @param propertyId - The Redfin property id.
|
|
3987
|
+
* @param options - Optional parameters (url).
|
|
3988
|
+
* @returns Property detail response.
|
|
3989
|
+
* @throws NotFoundError - If the property doesn't exist.
|
|
3990
|
+
*/
|
|
3991
|
+
async getProperty(propertyId, options = {}) {
|
|
3992
|
+
if (options.url) {
|
|
3993
|
+
return this.client.request("/v1/redfin/property", {
|
|
3994
|
+
params: { url: options.url }
|
|
3995
|
+
});
|
|
3996
|
+
}
|
|
3997
|
+
return this.client.request(`/v1/redfin/property/${propertyId}`);
|
|
3998
|
+
}
|
|
3999
|
+
/**
|
|
4000
|
+
* Get a Redfin agent's profile and their active listings.
|
|
4001
|
+
*
|
|
4002
|
+
* Provide either `agentId` or `options.url`.
|
|
4003
|
+
*
|
|
4004
|
+
* @param agentId - The Redfin agent slug.
|
|
4005
|
+
* @param options - Optional parameters (url).
|
|
4006
|
+
* @returns Agent profile response with the agent and their listings.
|
|
4007
|
+
* @throws NotFoundError - If the agent doesn't exist.
|
|
4008
|
+
*/
|
|
4009
|
+
async getAgent(agentId, options = {}) {
|
|
4010
|
+
return this.client.request("/v1/redfin/agent", {
|
|
4011
|
+
params: { agent_id: agentId, url: options.url }
|
|
4012
|
+
});
|
|
4013
|
+
}
|
|
4014
|
+
/**
|
|
4015
|
+
* Resolve a search term to Redfin locations.
|
|
4016
|
+
*
|
|
4017
|
+
* @param query - Partial location — city, ZIP, address, or neighborhood.
|
|
4018
|
+
* @returns Autocomplete response with location suggestions.
|
|
4019
|
+
*/
|
|
4020
|
+
async autocomplete(query) {
|
|
4021
|
+
return this.client.request("/v1/redfin/autocomplete", {
|
|
4022
|
+
params: { query }
|
|
4023
|
+
});
|
|
4024
|
+
}
|
|
4025
|
+
/**
|
|
4026
|
+
* Get all supported Redfin coverage markets.
|
|
4027
|
+
*
|
|
4028
|
+
* @returns Markets response with all supported markets.
|
|
4029
|
+
*/
|
|
4030
|
+
async listMarkets() {
|
|
4031
|
+
return this.client.request("/v1/redfin/markets");
|
|
4032
|
+
}
|
|
4033
|
+
};
|
|
4034
|
+
|
|
3940
4035
|
// src/amazon/search.ts
|
|
3941
4036
|
var SearchClient4 = class {
|
|
3942
4037
|
client;
|
|
@@ -6360,6 +6455,103 @@ var LoopNetClient = class {
|
|
|
6360
6455
|
}
|
|
6361
6456
|
};
|
|
6362
6457
|
|
|
6458
|
+
// src/depop/client.ts
|
|
6459
|
+
var DepopClient = class {
|
|
6460
|
+
client;
|
|
6461
|
+
constructor(client) {
|
|
6462
|
+
this.client = client;
|
|
6463
|
+
}
|
|
6464
|
+
/**
|
|
6465
|
+
* Search Depop for products.
|
|
6466
|
+
*
|
|
6467
|
+
* Costs 10 credits.
|
|
6468
|
+
*
|
|
6469
|
+
* @param query - Search keywords (required).
|
|
6470
|
+
* @param options - Optional parameters (market, perPage, page, price/brand/
|
|
6471
|
+
* size/colour/condition/gender filters, sort).
|
|
6472
|
+
* @returns Search response with matching product cards and pagination meta.
|
|
6473
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
6474
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
6475
|
+
*/
|
|
6476
|
+
async search(query, options = {}) {
|
|
6477
|
+
return this.client.request("/v1/depop/search", {
|
|
6478
|
+
params: {
|
|
6479
|
+
query,
|
|
6480
|
+
market: options.market ?? "us",
|
|
6481
|
+
per_page: options.perPage,
|
|
6482
|
+
page: options.page,
|
|
6483
|
+
price_min: options.priceMin,
|
|
6484
|
+
price_max: options.priceMax,
|
|
6485
|
+
brands: options.brands,
|
|
6486
|
+
sizes: options.sizes,
|
|
6487
|
+
colours: options.colours,
|
|
6488
|
+
conditions: options.conditions,
|
|
6489
|
+
gender: options.gender,
|
|
6490
|
+
sort: options.sort
|
|
6491
|
+
}
|
|
6492
|
+
});
|
|
6493
|
+
}
|
|
6494
|
+
/**
|
|
6495
|
+
* Get a single Depop product's full detail by slug.
|
|
6496
|
+
*
|
|
6497
|
+
* Costs 10 credits.
|
|
6498
|
+
*
|
|
6499
|
+
* @param slug - The Depop product slug.
|
|
6500
|
+
* @param options - Optional parameters (market).
|
|
6501
|
+
* @returns Full product detail.
|
|
6502
|
+
* @throws NotFoundError - If the product doesn't exist.
|
|
6503
|
+
*/
|
|
6504
|
+
async getProduct(slug, options = {}) {
|
|
6505
|
+
return this.client.request(`/v1/depop/products/${slug}`, {
|
|
6506
|
+
params: { market: options.market ?? "us" }
|
|
6507
|
+
});
|
|
6508
|
+
}
|
|
6509
|
+
/**
|
|
6510
|
+
* Get a Depop shop / seller profile by username.
|
|
6511
|
+
*
|
|
6512
|
+
* Costs 10 credits.
|
|
6513
|
+
*
|
|
6514
|
+
* @param username - The Depop seller username.
|
|
6515
|
+
* @param options - Optional parameters (market).
|
|
6516
|
+
* @returns Shop profile.
|
|
6517
|
+
* @throws NotFoundError - If the user doesn't exist.
|
|
6518
|
+
*/
|
|
6519
|
+
async getUser(username, options = {}) {
|
|
6520
|
+
return this.client.request(`/v1/depop/users/${username}`, {
|
|
6521
|
+
params: { market: options.market ?? "us" }
|
|
6522
|
+
});
|
|
6523
|
+
}
|
|
6524
|
+
/**
|
|
6525
|
+
* Get a Depop seller's products.
|
|
6526
|
+
*
|
|
6527
|
+
* Costs 10 credits.
|
|
6528
|
+
*
|
|
6529
|
+
* @param username - The Depop seller username.
|
|
6530
|
+
* @param options - Optional parameters (market, perPage, page).
|
|
6531
|
+
* @returns User products response with product cards and pagination meta.
|
|
6532
|
+
* @throws NotFoundError - If the user doesn't exist.
|
|
6533
|
+
*/
|
|
6534
|
+
async getUserProducts(username, options = {}) {
|
|
6535
|
+
return this.client.request(`/v1/depop/users/${username}/products`, {
|
|
6536
|
+
params: {
|
|
6537
|
+
market: options.market ?? "us",
|
|
6538
|
+
per_page: options.perPage,
|
|
6539
|
+
page: options.page
|
|
6540
|
+
}
|
|
6541
|
+
});
|
|
6542
|
+
}
|
|
6543
|
+
/**
|
|
6544
|
+
* Get all supported Depop markets.
|
|
6545
|
+
*
|
|
6546
|
+
* Free — this endpoint costs no credits.
|
|
6547
|
+
*
|
|
6548
|
+
* @returns Markets response with all supported markets.
|
|
6549
|
+
*/
|
|
6550
|
+
async listMarkets() {
|
|
6551
|
+
return this.client.request("/v1/depop/markets");
|
|
6552
|
+
}
|
|
6553
|
+
};
|
|
6554
|
+
|
|
6363
6555
|
// src/client.ts
|
|
6364
6556
|
var ScrapeBadger = class {
|
|
6365
6557
|
baseClient;
|
|
@@ -6373,6 +6565,8 @@ var ScrapeBadger = class {
|
|
|
6373
6565
|
google;
|
|
6374
6566
|
/** Reddit scraper API client */
|
|
6375
6567
|
reddit;
|
|
6568
|
+
/** Redfin scraper API client — search, property, agent, autocomplete, markets (redfin.com, US) */
|
|
6569
|
+
redfin;
|
|
6376
6570
|
/** Amazon scraper API client — 14 endpoints */
|
|
6377
6571
|
amazon;
|
|
6378
6572
|
/** Shopee scraper API client — 6 endpoints across 11 markets */
|
|
@@ -6393,6 +6587,8 @@ var ScrapeBadger = class {
|
|
|
6393
6587
|
immobiliare;
|
|
6394
6588
|
/** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */
|
|
6395
6589
|
loopnet;
|
|
6590
|
+
/** Depop scraper API client — search, product, user, user products, markets (www.depop.com, 10 markets) */
|
|
6591
|
+
depop;
|
|
6396
6592
|
/**
|
|
6397
6593
|
* Create a new ScrapeBadger client.
|
|
6398
6594
|
*
|
|
@@ -6432,6 +6628,7 @@ var ScrapeBadger = class {
|
|
|
6432
6628
|
this.vinted = new VintedClient(this.baseClient);
|
|
6433
6629
|
this.google = new GoogleClient(this.baseClient);
|
|
6434
6630
|
this.reddit = new RedditClient(this.baseClient);
|
|
6631
|
+
this.redfin = new RedfinClient(this.baseClient);
|
|
6435
6632
|
this.amazon = new AmazonClient(this.baseClient);
|
|
6436
6633
|
this.shopee = new ShopeeClient(this.baseClient);
|
|
6437
6634
|
this.tiktok = new TikTokClient(this.baseClient);
|
|
@@ -6442,9 +6639,10 @@ var ScrapeBadger = class {
|
|
|
6442
6639
|
this.zillow = new ZillowClient(this.baseClient);
|
|
6443
6640
|
this.immobiliare = new ImmobiliareClient(this.baseClient);
|
|
6444
6641
|
this.loopnet = new LoopNetClient(this.baseClient);
|
|
6642
|
+
this.depop = new DepopClient(this.baseClient);
|
|
6445
6643
|
}
|
|
6446
6644
|
};
|
|
6447
6645
|
|
|
6448
|
-
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, ImmobiliareClient, InsufficientCreditsError, AdsClient2 as LeboncoinAdsClient, LeboncoinClient, ReferenceClient8 as LeboncoinReferenceClient, SearchClient10 as LeboncoinSearchClient, SellersClient3 as LeboncoinSellersClient, ListsClient, BrokersClient as LoopNetBrokersClient, LoopNetClient, ListingsClient2 as LoopNetListingsClient, ReferenceClient10 as LoopNetReferenceClient, SearchClient12 as LoopNetSearchClient, 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 };
|
|
6646
|
+
export { AccountRestrictedError, AmazonClient, ListingsClient as AmazonListingsClient, ProductsClient2 as AmazonProductsClient, ReferenceClient2 as AmazonReferenceClient, SearchClient4 as AmazonSearchClient, SellersClient as AmazonSellersClient, AuthenticationError, CommunitiesClient, ConflictError, DepopClient, 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, ImmobiliareClient, InsufficientCreditsError, AdsClient2 as LeboncoinAdsClient, LeboncoinClient, ReferenceClient8 as LeboncoinReferenceClient, SearchClient10 as LeboncoinSearchClient, SellersClient3 as LeboncoinSellersClient, ListsClient, BrokersClient as LoopNetBrokersClient, LoopNetClient, ListingsClient2 as LoopNetListingsClient, ReferenceClient10 as LoopNetReferenceClient, SearchClient12 as LoopNetSearchClient, 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, RedfinClient, 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 };
|
|
6449
6647
|
//# sourceMappingURL=index.mjs.map
|
|
6450
6648
|
//# sourceMappingURL=index.mjs.map
|