scrapebadger 0.18.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 +234 -1
- package/dist/index.d.ts +234 -1
- package/dist/index.js +101 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +101 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6455,6 +6455,103 @@ var LoopNetClient = class {
|
|
|
6455
6455
|
}
|
|
6456
6456
|
};
|
|
6457
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
|
+
|
|
6458
6555
|
// src/client.ts
|
|
6459
6556
|
var ScrapeBadger = class {
|
|
6460
6557
|
baseClient;
|
|
@@ -6490,6 +6587,8 @@ var ScrapeBadger = class {
|
|
|
6490
6587
|
immobiliare;
|
|
6491
6588
|
/** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */
|
|
6492
6589
|
loopnet;
|
|
6590
|
+
/** Depop scraper API client — search, product, user, user products, markets (www.depop.com, 10 markets) */
|
|
6591
|
+
depop;
|
|
6493
6592
|
/**
|
|
6494
6593
|
* Create a new ScrapeBadger client.
|
|
6495
6594
|
*
|
|
@@ -6540,9 +6639,10 @@ var ScrapeBadger = class {
|
|
|
6540
6639
|
this.zillow = new ZillowClient(this.baseClient);
|
|
6541
6640
|
this.immobiliare = new ImmobiliareClient(this.baseClient);
|
|
6542
6641
|
this.loopnet = new LoopNetClient(this.baseClient);
|
|
6642
|
+
this.depop = new DepopClient(this.baseClient);
|
|
6543
6643
|
}
|
|
6544
6644
|
};
|
|
6545
6645
|
|
|
6546
|
-
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, 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 };
|
|
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 };
|
|
6547
6647
|
//# sourceMappingURL=index.mjs.map
|
|
6548
6648
|
//# sourceMappingURL=index.mjs.map
|