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.js CHANGED
@@ -6461,6 +6461,269 @@ var LoopNetClient = class {
6461
6461
  }
6462
6462
  };
6463
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
+
6561
+ // src/linkedin/client.ts
6562
+ var LinkedInClient = class {
6563
+ client;
6564
+ constructor(client) {
6565
+ this.client = client;
6566
+ }
6567
+ /**
6568
+ * Search LinkedIn jobs (guest search API).
6569
+ *
6570
+ * @param options - Optional parameters (keywords, location, geoId, companyId,
6571
+ * datePosted, experience, jobType, workplace, sort, start, country).
6572
+ * @returns Jobs search response with matching job cards and pagination meta.
6573
+ * @throws AuthenticationError - If the API key is invalid.
6574
+ * @throws ValidationError - If the parameters are invalid.
6575
+ */
6576
+ async jobsSearch(options = {}) {
6577
+ return this.client.request("/v1/linkedin/jobs/search", {
6578
+ params: {
6579
+ keywords: options.keywords,
6580
+ location: options.location,
6581
+ geo_id: options.geoId,
6582
+ company_id: options.companyId,
6583
+ date_posted: options.datePosted,
6584
+ experience: options.experience,
6585
+ job_type: options.jobType,
6586
+ workplace: options.workplace,
6587
+ sort: options.sort,
6588
+ start: options.start ?? 0,
6589
+ country: options.country ?? "us"
6590
+ }
6591
+ });
6592
+ }
6593
+ /**
6594
+ * Get full detail for one LinkedIn job posting.
6595
+ *
6596
+ * @param jobId - The numeric LinkedIn job id.
6597
+ * @param options - Optional parameters (country).
6598
+ * @returns Full job detail.
6599
+ * @throws NotFoundError - If the job doesn't exist.
6600
+ */
6601
+ async getJob(jobId, options = {}) {
6602
+ return this.client.request(`/v1/linkedin/jobs/${jobId}`, {
6603
+ params: { country: options.country ?? "us" }
6604
+ });
6605
+ }
6606
+ /**
6607
+ * Get a company's job postings.
6608
+ *
6609
+ * @param companyId - The numeric LinkedIn company id.
6610
+ * @param options - Optional parameters (start, country).
6611
+ * @returns Jobs search response with the company's job cards and pagination meta.
6612
+ * @throws NotFoundError - If the company doesn't exist.
6613
+ */
6614
+ async companyJobs(companyId, options = {}) {
6615
+ return this.client.request(
6616
+ `/v1/linkedin/companies/${companyId}/jobs`,
6617
+ {
6618
+ params: {
6619
+ start: options.start ?? 0,
6620
+ country: options.country ?? "us"
6621
+ }
6622
+ }
6623
+ );
6624
+ }
6625
+ /**
6626
+ * Get a public LinkedIn company page.
6627
+ *
6628
+ * @param universalName - The company's universal name (URL slug).
6629
+ * @param options - Optional parameters (country).
6630
+ * @returns Company profile.
6631
+ * @throws NotFoundError - If the company doesn't exist.
6632
+ */
6633
+ async getCompany(universalName, options = {}) {
6634
+ return this.client.request(`/v1/linkedin/companies/${universalName}`, {
6635
+ params: { country: options.country ?? "us" }
6636
+ });
6637
+ }
6638
+ /**
6639
+ * Get a public LinkedIn school page.
6640
+ *
6641
+ * @param universalName - The school's universal name (URL slug).
6642
+ * @param options - Optional parameters (country).
6643
+ * @returns School profile.
6644
+ * @throws NotFoundError - If the school doesn't exist.
6645
+ */
6646
+ async getSchool(universalName, options = {}) {
6647
+ return this.client.request(`/v1/linkedin/schools/${universalName}`, {
6648
+ params: { country: options.country ?? "us" }
6649
+ });
6650
+ }
6651
+ /**
6652
+ * Get a public LinkedIn profile.
6653
+ *
6654
+ * @param publicId - The profile's public id (URL slug).
6655
+ * @param options - Optional parameters (country).
6656
+ * @returns Public profile.
6657
+ * @throws NotFoundError - If the profile doesn't exist.
6658
+ */
6659
+ async getProfile(publicId, options = {}) {
6660
+ return this.client.request(`/v1/linkedin/profiles/${publicId}`, {
6661
+ params: { country: options.country ?? "us" }
6662
+ });
6663
+ }
6664
+ /**
6665
+ * Get a public LinkedIn post (activity share).
6666
+ *
6667
+ * @param postSlug - The post slug (last URL segment).
6668
+ * @param options - Optional parameters (country).
6669
+ * @returns Post detail.
6670
+ * @throws NotFoundError - If the post doesn't exist.
6671
+ */
6672
+ async getPost(postSlug, options = {}) {
6673
+ return this.client.request(`/v1/linkedin/posts/${postSlug}`, {
6674
+ params: { country: options.country ?? "us" }
6675
+ });
6676
+ }
6677
+ /**
6678
+ * Get a public LinkedIn article (`/pulse/`).
6679
+ *
6680
+ * @param articleSlug - The article slug (last URL segment).
6681
+ * @param options - Optional parameters (country).
6682
+ * @returns Article detail (Post shape).
6683
+ * @throws NotFoundError - If the article doesn't exist.
6684
+ */
6685
+ async getArticle(articleSlug, options = {}) {
6686
+ return this.client.request(`/v1/linkedin/articles/${articleSlug}`, {
6687
+ params: { country: options.country ?? "us" }
6688
+ });
6689
+ }
6690
+ /**
6691
+ * Get a public LinkedIn Learning course.
6692
+ *
6693
+ * @param courseSlug - The course slug (last URL segment).
6694
+ * @param options - Optional parameters (country).
6695
+ * @returns Course detail.
6696
+ * @throws NotFoundError - If the course doesn't exist.
6697
+ */
6698
+ async getCourse(courseSlug, options = {}) {
6699
+ return this.client.request(`/v1/linkedin/learning/${courseSlug}`, {
6700
+ params: { country: options.country ?? "us" }
6701
+ });
6702
+ }
6703
+ /**
6704
+ * Suggest geo / company ids for a query (typeahead).
6705
+ *
6706
+ * @param query - Location or company name, e.g. "London".
6707
+ * @param type - "geo" | "company" (default: "geo").
6708
+ * @returns Geo-suggest response with matching suggestions.
6709
+ */
6710
+ async geoSuggest(query, type = "geo") {
6711
+ return this.client.request("/v1/linkedin/geo/suggest", {
6712
+ params: { query, type }
6713
+ });
6714
+ }
6715
+ /**
6716
+ * LinkedIn scraper health check.
6717
+ *
6718
+ * Free — this endpoint costs no credits.
6719
+ *
6720
+ * @returns Health payload (status, service, version, products).
6721
+ */
6722
+ async health() {
6723
+ return this.client.request("/v1/linkedin/health");
6724
+ }
6725
+ };
6726
+
6464
6727
  // src/client.ts
6465
6728
  var ScrapeBadger = class {
6466
6729
  baseClient;
@@ -6496,6 +6759,10 @@ var ScrapeBadger = class {
6496
6759
  immobiliare;
6497
6760
  /** LoopNet scraper API client — commercial real estate across US/CA/UK/FR/ES (search, listing, broker, markets, property types) */
6498
6761
  loopnet;
6762
+ /** Depop scraper API client — search, product, user, user products, markets (www.depop.com, 10 markets) */
6763
+ depop;
6764
+ /** LinkedIn scraper API client — 11 no-auth endpoints (jobs, company, school, profile, post, article, learning, geo) */
6765
+ linkedin;
6499
6766
  /**
6500
6767
  * Create a new ScrapeBadger client.
6501
6768
  *
@@ -6546,6 +6813,8 @@ var ScrapeBadger = class {
6546
6813
  this.zillow = new ZillowClient(this.baseClient);
6547
6814
  this.immobiliare = new ImmobiliareClient(this.baseClient);
6548
6815
  this.loopnet = new LoopNetClient(this.baseClient);
6816
+ this.depop = new DepopClient(this.baseClient);
6817
+ this.linkedin = new LinkedInClient(this.baseClient);
6549
6818
  }
6550
6819
  };
6551
6820
 
@@ -6559,6 +6828,7 @@ exports.AmazonSellersClient = SellersClient;
6559
6828
  exports.AuthenticationError = AuthenticationError;
6560
6829
  exports.CommunitiesClient = CommunitiesClient;
6561
6830
  exports.ConflictError = ConflictError;
6831
+ exports.DepopClient = DepopClient;
6562
6832
  exports.EbayCategoriesClient = CategoriesClient;
6563
6833
  exports.EbayClient = EbayClient;
6564
6834
  exports.EbayItemsClient = ItemsClient2;
@@ -6592,6 +6862,7 @@ exports.LeboncoinClient = LeboncoinClient;
6592
6862
  exports.LeboncoinReferenceClient = ReferenceClient8;
6593
6863
  exports.LeboncoinSearchClient = SearchClient10;
6594
6864
  exports.LeboncoinSellersClient = SellersClient3;
6865
+ exports.LinkedInClient = LinkedInClient;
6595
6866
  exports.ListsClient = ListsClient;
6596
6867
  exports.LoopNetBrokersClient = BrokersClient;
6597
6868
  exports.LoopNetClient = LoopNetClient;