scrapebadger 0.18.0 → 0.20.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 +628 -14
- package/dist/index.d.ts +628 -14
- package/dist/index.js +271 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +270 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -6455,6 +6455,269 @@ 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
|
+
|
|
6555
|
+
// src/linkedin/client.ts
|
|
6556
|
+
var LinkedInClient = class {
|
|
6557
|
+
client;
|
|
6558
|
+
constructor(client) {
|
|
6559
|
+
this.client = client;
|
|
6560
|
+
}
|
|
6561
|
+
/**
|
|
6562
|
+
* Search LinkedIn jobs (guest search API).
|
|
6563
|
+
*
|
|
6564
|
+
* @param options - Optional parameters (keywords, location, geoId, companyId,
|
|
6565
|
+
* datePosted, experience, jobType, workplace, sort, start, country).
|
|
6566
|
+
* @returns Jobs search response with matching job cards and pagination meta.
|
|
6567
|
+
* @throws AuthenticationError - If the API key is invalid.
|
|
6568
|
+
* @throws ValidationError - If the parameters are invalid.
|
|
6569
|
+
*/
|
|
6570
|
+
async jobsSearch(options = {}) {
|
|
6571
|
+
return this.client.request("/v1/linkedin/jobs/search", {
|
|
6572
|
+
params: {
|
|
6573
|
+
keywords: options.keywords,
|
|
6574
|
+
location: options.location,
|
|
6575
|
+
geo_id: options.geoId,
|
|
6576
|
+
company_id: options.companyId,
|
|
6577
|
+
date_posted: options.datePosted,
|
|
6578
|
+
experience: options.experience,
|
|
6579
|
+
job_type: options.jobType,
|
|
6580
|
+
workplace: options.workplace,
|
|
6581
|
+
sort: options.sort,
|
|
6582
|
+
start: options.start ?? 0,
|
|
6583
|
+
country: options.country ?? "us"
|
|
6584
|
+
}
|
|
6585
|
+
});
|
|
6586
|
+
}
|
|
6587
|
+
/**
|
|
6588
|
+
* Get full detail for one LinkedIn job posting.
|
|
6589
|
+
*
|
|
6590
|
+
* @param jobId - The numeric LinkedIn job id.
|
|
6591
|
+
* @param options - Optional parameters (country).
|
|
6592
|
+
* @returns Full job detail.
|
|
6593
|
+
* @throws NotFoundError - If the job doesn't exist.
|
|
6594
|
+
*/
|
|
6595
|
+
async getJob(jobId, options = {}) {
|
|
6596
|
+
return this.client.request(`/v1/linkedin/jobs/${jobId}`, {
|
|
6597
|
+
params: { country: options.country ?? "us" }
|
|
6598
|
+
});
|
|
6599
|
+
}
|
|
6600
|
+
/**
|
|
6601
|
+
* Get a company's job postings.
|
|
6602
|
+
*
|
|
6603
|
+
* @param companyId - The numeric LinkedIn company id.
|
|
6604
|
+
* @param options - Optional parameters (start, country).
|
|
6605
|
+
* @returns Jobs search response with the company's job cards and pagination meta.
|
|
6606
|
+
* @throws NotFoundError - If the company doesn't exist.
|
|
6607
|
+
*/
|
|
6608
|
+
async companyJobs(companyId, options = {}) {
|
|
6609
|
+
return this.client.request(
|
|
6610
|
+
`/v1/linkedin/companies/${companyId}/jobs`,
|
|
6611
|
+
{
|
|
6612
|
+
params: {
|
|
6613
|
+
start: options.start ?? 0,
|
|
6614
|
+
country: options.country ?? "us"
|
|
6615
|
+
}
|
|
6616
|
+
}
|
|
6617
|
+
);
|
|
6618
|
+
}
|
|
6619
|
+
/**
|
|
6620
|
+
* Get a public LinkedIn company page.
|
|
6621
|
+
*
|
|
6622
|
+
* @param universalName - The company's universal name (URL slug).
|
|
6623
|
+
* @param options - Optional parameters (country).
|
|
6624
|
+
* @returns Company profile.
|
|
6625
|
+
* @throws NotFoundError - If the company doesn't exist.
|
|
6626
|
+
*/
|
|
6627
|
+
async getCompany(universalName, options = {}) {
|
|
6628
|
+
return this.client.request(`/v1/linkedin/companies/${universalName}`, {
|
|
6629
|
+
params: { country: options.country ?? "us" }
|
|
6630
|
+
});
|
|
6631
|
+
}
|
|
6632
|
+
/**
|
|
6633
|
+
* Get a public LinkedIn school page.
|
|
6634
|
+
*
|
|
6635
|
+
* @param universalName - The school's universal name (URL slug).
|
|
6636
|
+
* @param options - Optional parameters (country).
|
|
6637
|
+
* @returns School profile.
|
|
6638
|
+
* @throws NotFoundError - If the school doesn't exist.
|
|
6639
|
+
*/
|
|
6640
|
+
async getSchool(universalName, options = {}) {
|
|
6641
|
+
return this.client.request(`/v1/linkedin/schools/${universalName}`, {
|
|
6642
|
+
params: { country: options.country ?? "us" }
|
|
6643
|
+
});
|
|
6644
|
+
}
|
|
6645
|
+
/**
|
|
6646
|
+
* Get a public LinkedIn profile.
|
|
6647
|
+
*
|
|
6648
|
+
* @param publicId - The profile's public id (URL slug).
|
|
6649
|
+
* @param options - Optional parameters (country).
|
|
6650
|
+
* @returns Public profile.
|
|
6651
|
+
* @throws NotFoundError - If the profile doesn't exist.
|
|
6652
|
+
*/
|
|
6653
|
+
async getProfile(publicId, options = {}) {
|
|
6654
|
+
return this.client.request(`/v1/linkedin/profiles/${publicId}`, {
|
|
6655
|
+
params: { country: options.country ?? "us" }
|
|
6656
|
+
});
|
|
6657
|
+
}
|
|
6658
|
+
/**
|
|
6659
|
+
* Get a public LinkedIn post (activity share).
|
|
6660
|
+
*
|
|
6661
|
+
* @param postSlug - The post slug (last URL segment).
|
|
6662
|
+
* @param options - Optional parameters (country).
|
|
6663
|
+
* @returns Post detail.
|
|
6664
|
+
* @throws NotFoundError - If the post doesn't exist.
|
|
6665
|
+
*/
|
|
6666
|
+
async getPost(postSlug, options = {}) {
|
|
6667
|
+
return this.client.request(`/v1/linkedin/posts/${postSlug}`, {
|
|
6668
|
+
params: { country: options.country ?? "us" }
|
|
6669
|
+
});
|
|
6670
|
+
}
|
|
6671
|
+
/**
|
|
6672
|
+
* Get a public LinkedIn article (`/pulse/`).
|
|
6673
|
+
*
|
|
6674
|
+
* @param articleSlug - The article slug (last URL segment).
|
|
6675
|
+
* @param options - Optional parameters (country).
|
|
6676
|
+
* @returns Article detail (Post shape).
|
|
6677
|
+
* @throws NotFoundError - If the article doesn't exist.
|
|
6678
|
+
*/
|
|
6679
|
+
async getArticle(articleSlug, options = {}) {
|
|
6680
|
+
return this.client.request(`/v1/linkedin/articles/${articleSlug}`, {
|
|
6681
|
+
params: { country: options.country ?? "us" }
|
|
6682
|
+
});
|
|
6683
|
+
}
|
|
6684
|
+
/**
|
|
6685
|
+
* Get a public LinkedIn Learning course.
|
|
6686
|
+
*
|
|
6687
|
+
* @param courseSlug - The course slug (last URL segment).
|
|
6688
|
+
* @param options - Optional parameters (country).
|
|
6689
|
+
* @returns Course detail.
|
|
6690
|
+
* @throws NotFoundError - If the course doesn't exist.
|
|
6691
|
+
*/
|
|
6692
|
+
async getCourse(courseSlug, options = {}) {
|
|
6693
|
+
return this.client.request(`/v1/linkedin/learning/${courseSlug}`, {
|
|
6694
|
+
params: { country: options.country ?? "us" }
|
|
6695
|
+
});
|
|
6696
|
+
}
|
|
6697
|
+
/**
|
|
6698
|
+
* Suggest geo / company ids for a query (typeahead).
|
|
6699
|
+
*
|
|
6700
|
+
* @param query - Location or company name, e.g. "London".
|
|
6701
|
+
* @param type - "geo" | "company" (default: "geo").
|
|
6702
|
+
* @returns Geo-suggest response with matching suggestions.
|
|
6703
|
+
*/
|
|
6704
|
+
async geoSuggest(query, type = "geo") {
|
|
6705
|
+
return this.client.request("/v1/linkedin/geo/suggest", {
|
|
6706
|
+
params: { query, type }
|
|
6707
|
+
});
|
|
6708
|
+
}
|
|
6709
|
+
/**
|
|
6710
|
+
* LinkedIn scraper health check.
|
|
6711
|
+
*
|
|
6712
|
+
* Free — this endpoint costs no credits.
|
|
6713
|
+
*
|
|
6714
|
+
* @returns Health payload (status, service, version, products).
|
|
6715
|
+
*/
|
|
6716
|
+
async health() {
|
|
6717
|
+
return this.client.request("/v1/linkedin/health");
|
|
6718
|
+
}
|
|
6719
|
+
};
|
|
6720
|
+
|
|
6458
6721
|
// src/client.ts
|
|
6459
6722
|
var ScrapeBadger = class {
|
|
6460
6723
|
baseClient;
|
|
@@ -6490,6 +6753,10 @@ var ScrapeBadger = class {
|
|
|
6490
6753
|
immobiliare;
|
|
6491
6754
|
/** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */
|
|
6492
6755
|
loopnet;
|
|
6756
|
+
/** Depop scraper API client — search, product, user, user products, markets (www.depop.com, 10 markets) */
|
|
6757
|
+
depop;
|
|
6758
|
+
/** LinkedIn scraper API client — 11 no-auth endpoints (jobs, company, school, profile, post, article, learning, geo) */
|
|
6759
|
+
linkedin;
|
|
6493
6760
|
/**
|
|
6494
6761
|
* Create a new ScrapeBadger client.
|
|
6495
6762
|
*
|
|
@@ -6540,9 +6807,11 @@ var ScrapeBadger = class {
|
|
|
6540
6807
|
this.zillow = new ZillowClient(this.baseClient);
|
|
6541
6808
|
this.immobiliare = new ImmobiliareClient(this.baseClient);
|
|
6542
6809
|
this.loopnet = new LoopNetClient(this.baseClient);
|
|
6810
|
+
this.depop = new DepopClient(this.baseClient);
|
|
6811
|
+
this.linkedin = new LinkedInClient(this.baseClient);
|
|
6543
6812
|
}
|
|
6544
6813
|
};
|
|
6545
6814
|
|
|
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 };
|
|
6815
|
+
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, LinkedInClient, 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
6816
|
//# sourceMappingURL=index.mjs.map
|
|
6548
6817
|
//# sourceMappingURL=index.mjs.map
|