Skip to content

About

LinkedIn scraper API: LinkedIn Company, LinkedIn Job, LinkedIn Post, LinkedIn Profile as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

LinkedIn Scraper API

Scrape LinkedIn with a JSON API. This repo has working Python examples for DataGuru's LinkedIn scraper APIs: LinkedIn Company, LinkedIn Job, LinkedIn Post and LinkedIn Profile.

DataGuru runs the scraping, proxies, retries and parsing, and returns clean JSON. You pay only for successful requests, from $0.0022 per request, out of a prepaid balance: no subscription. New accounts get $1.00 of free credit.

LinkedIn APIs

API What it returns Price Page
LinkedIn Company Scrape a LinkedIn company page for name, website, industry, headquarters, size, employee count and affiliated pages. $0.0022 https://dataguru.cc/apis/linkedin-company/
LinkedIn Job Scrape a LinkedIn job posting for title, company, location, workplace type, seniority, employment type, applicants, compensation and description. $0.0022 https://dataguru.cc/apis/linkedin-job/
LinkedIn Post Scrape a public LinkedIn post or Pulse article for text, author, timestamp and reaction counts when available. $0.0022 https://dataguru.cc/apis/linkedin-post/
LinkedIn Profile Scrape a public LinkedIn profile for identity, about text, experience, education and published articles. $0.0025 https://dataguru.cc/apis/linkedin-profile/

Quick start

  1. Create a free account and an API key at dashboard.dataguru.cc.
  2. Install and run:
git clone https://github.com/dataguru-cc/linkedin-scraper-api.git
cd linkedin-scraper-api
pip install -r requirements.txt
export DATAGURU_API_KEY="your key"
python examples/sdk_example.py linkedin-company

Examples

Every example covers all 4 LinkedIn APIs. Pass an API name to run just one; with no name each script runs them all, and each call is billed at the price above.

File Style Run
examples/sdk_example.py DataGuru Python SDK (pip install dataguru-sdk), one function per API, saves JSON to output/ python examples/sdk_example.py
examples/requests_example.py Plain requests, synchronous python examples/requests_example.py
examples/async_example.py asyncio + httpx, concurrent with a limit python examples/async_example.py
examples/scrapy_spider.py Scrapy spider, items to JSON/CSV scrapy runspider examples/scrapy_spider.py -O linkedin.json

All requests use the header Authorization: Api-Key YOUR_API_KEY. Errors return {"success": false, "error": {"code", "message", "request_id"}}, with HTTP 402 when the balance runs out and 429 (with Retry-After) when rate limited. Failed requests are not charged.

API reference

LinkedIn Company

Scrape a LinkedIn company page for name, website, industry, headquarters, size, employee count and affiliated pages.

Parameter Type Required Description
company_url string yes LinkedIn company URL or vanity slug, e.g. https://www.linkedin.com/company/stripe

Response fields: company_page, error, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/linkedin/company" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company_url": "https://www.linkedin.com/company/stripe"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "company_page": {
    "vanity_name": "string",
    "official_company_name": "string",
    "website": "string",
    "industry": "string",
    "headquarters_address": "string",
    "founded_year": 0,
    "company_type": "string",
    "company_size_bracket": "string",
    "exact_employee_count_on_linkedin": 0,
    "follower_count": 0,
    "employee_headcount_growth_rate_pct": 0.0,
    "specialties": [
      "string"
    ],
    "affiliated_pages": [
      "string"
    ],
    "slogan": "string",
    "description": "string",
    "logo_url": "https://example.com/...",
    "url": "https://example.com/..."
  },
  "error": "string",
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "LinkedIn Company",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

LinkedIn Job

Scrape a LinkedIn job posting for title, company, location, workplace type, seniority, employment type, applicants, compensation and description.

This API needs a real input value: replace the placeholder in the examples, then run it by name.

Parameter Type Required Description
job_url string yes LinkedIn job URL or numeric job id, e.g. https://www.linkedin.com/jobs/view/3984521781

Response fields: job_board_posting, error, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/linkedin/job" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"job_url": "https://www.linkedin.com/jobs/view/<job-id>"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "job_board_posting": {
    "job_id": "1234567890",
    "job_title": "string",
    "company_name": "string",
    "company_url": "https://example.com/...",
    "workplace_type": "string",
    "job_location": "string",
    "posted_date": "2026-01-01T12:00:00Z",
    "applicant_count": 0,
    "seniority_level": "string",
    "employment_type": "string",
    "job_function": "string",
    "industries": "string",
    "compensation_range": {
      "currency": "USD",
      "base_salary_min": 0,
      "base_salary_max": 0
    },
    "job_description_text": "string",
    "url": "https://example.com/..."
  },
  "error": "string",
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "LinkedIn Job",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

LinkedIn Post

Scrape a public LinkedIn post or Pulse article for text, author, timestamp and reaction counts when available.

This API needs a real input value: replace the placeholder in the examples, then run it by name.

Parameter Type Required Description
post_url string yes LinkedIn post, feed update, or pulse article URL.

Response fields: feed_and_articles, error, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/linkedin/post" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"post_url": "https://www.linkedin.com/posts/<post-slug>"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "feed_and_articles": {
    "headline": "string",
    "post_text": "string",
    "author_profile": "string",
    "author_profile_url": "https://example.com/...",
    "timestamp": "2026-01-01T12:00:00Z",
    "reaction_breakdown": {
      "likes": 0,
      "loves": 0,
      "insightful": 0,
      "curious": 0
    },
    "comment_count": 0,
    "share_count": 0,
    "comment_thread": [
      {
        "author": "string",
        "text": "string",
        "replies": [
          {}
        ]
      }
    ],
    "poll": {
      "question": "string",
      "vote_distributions": [
        {
          "option": "string",
          "votes": 0
        }
      ]
    },
    "url": "https://example.com/..."
  },
  "error": "string",
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "LinkedIn Post",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

LinkedIn Profile

Scrape a public LinkedIn profile for identity, about text, experience, education and published articles.

This API needs a real input value: replace the placeholder in the examples, then run it by name.

Parameter Type Required Description
profile_url string yes Public LinkedIn profile URL or vanity slug, e.g. https://www.linkedin.com/in/williamhgates

Response fields: url, personal_profile, career_timeline, skills_and_endorsements, error, plus _metadata

curl -X POST "https://api.dataguru.cc/api/v1/linkedin/profile" \
  -H "Authorization: Api-Key $DATAGURU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profile_url": "https://www.linkedin.com/in/<profile>"}'
Response schema

Values are type placeholders from the API's published schema, not real data.

{
  "url": "https://example.com/...",
  "personal_profile": {
    "public_identifier": "string",
    "urn": "string",
    "full_name": "string",
    "headline": "string",
    "current_location": "string",
    "industry": "string",
    "summary": "string",
    "profile_picture_url": "https://example.com/...",
    "background_banner_url": "https://example.com/...",
    "contact_details": {
      "public_email": "user@example.com",
      "phone_numbers": [
        "string"
      ],
      "websites": [
        "string"
      ],
      "website_entries": [
        {
          "label": "string",
          "url": "https://example.com/..."
        }
      ],
      "twitter_handle": "string",
      "linkedin_profile_url": "https://example.com/...",
      "address": "string",
      "birthday": "string",
      "instant_messengers": [
        {
          "handle": "string",
          "provider": "string"
        }
      ]
    },
    "follower_count": 0,
    "connection_count": 0,
    "connection_degree": "string"
  },
  "career_timeline": {
    "work_experience": [
      {
        "job_title": "string",
        "company_name": "string",
        "company_url": "https://example.com/...",
        "start_date": "2026-01-01T12:00:00Z",
        "end_date": "2026-01-01T12:00:00Z",
        "duration": "string",
        "location": "string",
        "description_bullets": [
          "string"
        ]
      }
    ],
    "education": [
      {
        "school_name": "string",
        "degree": "string",
        "field_of_study": "string",
        "start_year": 0,
        "end_year": 0,
        "grade": "string",
        "activities": "string"
      }
    ]
  },
  "skills_and_endorsements": {
    "skills": [
      {
        "skill_name": "string",
        "endorsement_count": 0
      }
    ],
    "certifications": [
      {
        "name": "string",
        "credential_id": "1234567890",
        "issued_date": "2026-01-01T12:00:00Z",
        "issuing_authority": "string"
      }
    ],
    "licenses": [
      {}
    ],
    "volunteer_experience": [
      {
        "role": "string",
        "organization": "string",
        "duration": "string"
      }
    ],
    "languages": [
      "string"
    ],
    "projects": [
      {
        "name": "string",
        "start_date": "2026-01-01T12:00:00Z",
        "end_date": "2026-01-01T12:00:00Z",
        "description": "string"
      }
    ],
    "organizations": [
      {
        "name": "string",
        "role": "string"
      }
    ],
    "services": [
      "string"
    ],
    "recommendations": [
      {
        "author": "string",
        "text": "string"
      }
    ],
    "published_articles": [
      "string"
    ],
    "patents": [
      "string"
    ],
    "honors_awards": [
      "string"
    ]
  },
  "error": "string",
  "_metadata": {
    "request_id": "3f6c1a2e-8b4d-4c1e-9a7f-2d5e6b7c8d9e",
    "execution_time_ms": 842,
    "endpoint": "LinkedIn Profile",
    "mode": "live",
    "format": "json",
    "timestamp": "2026-01-01T12:00:00+00:00"
  }
}

More

License

The example code is MIT licensed. Use of the DataGuru API is subject to the terms of service.

About

LinkedIn scraper API: LinkedIn Company, LinkedIn Job, LinkedIn Post, LinkedIn Profile as clean JSON. Python examples with requests, Scrapy, asyncio and the DataGuru SDK.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors