scrapebadger 0.19.0 → 0.21.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
@@ -6558,6 +6558,172 @@ var DepopClient = class {
6558
6558
  }
6559
6559
  };
6560
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
+
6561
6727
  // src/client.ts
6562
6728
  var ScrapeBadger = class {
6563
6729
  baseClient;
@@ -6595,6 +6761,8 @@ var ScrapeBadger = class {
6595
6761
  loopnet;
6596
6762
  /** Depop scraper API client — search, product, user, user products, markets (www.depop.com, 10 markets) */
6597
6763
  depop;
6764
+ /** LinkedIn scraper API client — 11 no-auth endpoints (jobs, company, school, profile, post, article, learning, geo) */
6765
+ linkedin;
6598
6766
  /**
6599
6767
  * Create a new ScrapeBadger client.
6600
6768
  *
@@ -6646,6 +6814,7 @@ var ScrapeBadger = class {
6646
6814
  this.immobiliare = new ImmobiliareClient(this.baseClient);
6647
6815
  this.loopnet = new LoopNetClient(this.baseClient);
6648
6816
  this.depop = new DepopClient(this.baseClient);
6817
+ this.linkedin = new LinkedInClient(this.baseClient);
6649
6818
  }
6650
6819
  };
6651
6820
 
@@ -6693,6 +6862,7 @@ exports.LeboncoinClient = LeboncoinClient;
6693
6862
  exports.LeboncoinReferenceClient = ReferenceClient8;
6694
6863
  exports.LeboncoinSearchClient = SearchClient10;
6695
6864
  exports.LeboncoinSellersClient = SellersClient3;
6865
+ exports.LinkedInClient = LinkedInClient;
6696
6866
  exports.ListsClient = ListsClient;
6697
6867
  exports.LoopNetBrokersClient = BrokersClient;
6698
6868
  exports.LoopNetClient = LoopNetClient;