Skip to main content

LinkedIn Profile Scraping API Reference

Extract comprehensive data from LinkedIn profiles including professional experience, education, skills, and contact information. Our profile scraping service provides structured data for sales prospecting, recruitment, and business intelligence.

Scrape LinkedIn Profile

curl -X POST "https://api.mdb.tools/v1/linkedin/profile" \
  -H "x-api-key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "id": "john-doe-123456789",
    "cached": true
  }'

Request Body

id
string
required
The LinkedIn identifier for the profile to scrape. Accepts multiple formats:
  • LinkedIn ID: "john-doe-123456789"
  • LinkedIn URL: "https://linkedin.com/in/john-doe-123456789"
  • LinkedIn URN: "li:person:123456789"
cached
boolean
default:"true"
Whether to return cached data or fetch fresh data:
  • true (default): Return data up to 30 days old for faster response
  • false: Fetch fresh data no more than 1 minute old

Response

{
  "result": {
    "firstname": "Peter",
    "lastname": "Toth",
    "numOfConnections": 1247,
    "headline": "Co-Founder @ Midbound | Startup Advisor | Ex Trustpilot, IBM",
    "url": "https://www.linkedin.com/in/ptrtht",
    "skills": [
      "Product Management",
      "Strategic Planning",
      "Business Development",
      "Data Analytics"
    ],
    "languages": [
      {
        "value": "English",
        "norm": "EN"
      },
      {
        "value": "Danish",
        "norm": "DK"
      }
    ],
    "lid": "ptrtht",
    "about": "Tech leader with 7+ years of experience building software systems and leading engineering teams.\n\nCurrently CTO @ Midbound, we give you a person level ID of your website visitors\n\nMy journey has taken me from teaching programming to young students to engineering roles at IBM and Trustpilot, and finally to founding my own company. I excel in remote work environments and believe in continuous learning to stay ahead of technology trends.",
    "address": {
      "street": "123 Main Street",
      "city": "København",
      "state": "Region Hovedstaden",
      "postal_code": "94102",
      "country": "Danmark",
      "country_code": "DK"
    },
    "educations": [
      {
        "urn": "urn:li:fs_salesSchool:87654321",
        "name": "Copenhagen Business School",
        "degree": "Master of Science in Business Administration",
        "startDate": "2018-01-01T00:00:00.000Z",
        "endDate": "2020-01-01T00:00:00.000Z"
      }
    ],
    "employment_history": [
      {
        "title": "Co-Founder & CTO",
        "description": "Stop missing 97% of your website visitors.\nOutbound is dead and inbound isn't enough; the future is about meeting buyers in the middle. Midbound, our platform identifies those anonymous website visitors to uncover your dark funnel.",
        "startDate": "2025-05-01T00:00:00.000Z",
        "endDate": null,
        "location": "Copenhagen, Denmark",
        "is_current": true,
        "company": {
          // Company LinkedIn link can be constructed: linkedin.com/company/midbound
          "lid": "midbound",
          "company_name": "Midbound",
          "urn": "urn:li:fs_salesCompany:103633511"
        }
      },
      {
        "title": "Cloud Engineer Consultant",
        "description": "Full-time cloud engineering consultant role focusing on enterprise cloud solutions and infrastructure.",
        "startDate": "2022-01-01T00:00:00.000Z",
        "endDate": "2022-09-30T00:00:00.000Z",
        "location": "Remote",
        "is_current": false,
        "company": {
          "lid": "ibm",
          "company_name": "IBM",
          "urn": "urn:li:fs_salesCompany:1009"
        }
      }
    ],
    "emails": [
      {
        "value": "peter@midbound.ai",
        "sub_type": "PROFESSIONAL"
      },
      {
        "value": "peter+personal@midbound.ai",
        "sub_type": "PERSONAL"
      }
    ],
    "phone_numbers": [
      {
        "value": "+45-2222-2222",
        "sub_type": "MOBILE"
      }
    ],
    "deleted": false
  },
  "processing_time_ms": 1250,
  "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV"
}

Response Fields

Result Object

result
object
Contains the complete LinkedIn profile data and information.
result.firstname
string
First name of the LinkedIn profile owner.
result.lastname
string
Last name of the LinkedIn profile owner.
result.numOfConnections
number
Number of LinkedIn connections the profile has.
result.headline
string
Professional headline displayed on the LinkedIn profile.
result.url
string
Full LinkedIn profile URL.
result.lid
string
LinkedIn identifier/username extracted from the profile URL.
result.about
string
Profile summary or about section content.
result.skills
array
Array of skills listed on the LinkedIn profile.
result.languages
array
Array of language objects with proficiency information.
result.languages[].value
string
Language name (e.g., “English”, “Danish”).
result.languages[].norm
string
Normalized language code (e.g., “EN”, “DK”).
result.address
object
Location information from the LinkedIn profile.
result.address.street
string
Street address if available.
result.address.city
string
City or locality.
result.address.state
string
State, region, or province.
result.address.postal_code
string
Postal or ZIP code.
result.address.country
string
Country name.
result.address.country_code
string
Two-letter country code.
result.educations
array
Array of education history entries.
result.educations[].urn
string
LinkedIn URN identifier for the education entry.
result.educations[].name
string
Name of the educational institution.
result.educations[].degree
string
Degree or qualification obtained.
result.educations[].startDate
string
Start date in ISO 8601 format.
result.educations[].endDate
string
End date in ISO 8601 format (null if ongoing).
result.employment_history
array
Array of employment history entries.
result.employment_history[].title
string
Job title or position held.
result.employment_history[].description
string
Job description or responsibilities.
result.employment_history[].startDate
string
Start date in ISO 8601 format.
result.employment_history[].endDate
string
End date in ISO 8601 format (null if current position).
result.employment_history[].location
string
Work location if available.
result.employment_history[].is_current
boolean
Indicates whether this is the person’s current position (true) or a past position (false).
result.employment_history[].company
object
Company information for this employment entry.
result.employment_history[].company.lid
string
LinkedIn company identifier. Company LinkedIn URL can be constructed as: linkedin.com/company/
result.employment_history[].company.company_name
string
Name of the company or organization.
result.employment_history[].company.urn
string
LinkedIn URN identifier for the company.
result.emails
array
Array of email addresses associated with the profile.
result.emails[].value
string
Email address.
result.emails[].sub_type
string
Email type: “PROFESSIONAL”, “PERSONAL”, etc.
result.phone_numbers
array
Array of phone numbers associated with the profile.
result.phone_numbers[].value
string
Phone number in international format.
result.phone_numbers[].sub_type
string
Phone type: “MOBILE”, “WORK”, etc.
result.deleted
boolean
Indicates whether the profile has been deleted or is no longer accessible.

Caching Information

cached
boolean
Indicates whether the response was served from cache. Only present when cached data is returned.
cache_age_hours
number
Age of the cached data in hours. Only present when cached data is returned.

Metadata Fields

processing_time_ms
number
Time taken to process the request in milliseconds.
request_id
string
Unique identifier for this request (ULID format).

Supported Identifier Formats

LinkedIn Profile ID

The simplest format, typically found in LinkedIn URLs:
{
  "id": "john-doe-123456789"
}

LinkedIn Profile URL

Full LinkedIn profile URL:
{
  "id": "https://linkedin.com/in/john-doe-123456789"
}

LinkedIn URN (Uniform Resource Name)

LinkedIn’s internal identifier format:
{
  "id": "li:person:123456789"
}

Caching Behavior

Cached Requests (cached: true)

  • Data freshness: Up to 30 days old
  • Response time: Faster (typically 50-200ms)
  • Use case: Most business intelligence and enrichment scenarios
  • Cost: Custom pricing

Fresh Requests (cached: false)

  • Data freshness: No more than 1 minute old
  • Response time: Slower (typically 1-5 seconds)
  • Use case: When you need the most current profile information
  • Cost: Custom pricing for real-time scraping
We recommend using cached requests for most use cases. The data is still very current for business purposes and provides much faster response times.

Error Responses

When the request fails due to validation or other errors, you’ll receive a standard error response instead of the result structure. For detailed error information, see Common Error Codes.

Invalid LinkedIn ID

{
  "error": "validation_error",
  "message": "LinkedIn identifier format is invalid",
  "code": "LINKEDIN_001",
  "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FB8",
  "details": {
    "id": "invalid-linkedin-id",
    "supported_formats": ["LinkedIn ID", "LinkedIn URL", "LinkedIn URN"]
  }
}

Profile Not Found

{
  "error": "not_found",
  "message": "LinkedIn profile not found or not accessible",
  "code": "LINKEDIN_002",
  "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FB9",
  "details": {
    "id": "nonexistent-profile-123"
  }
}

Missing ID Parameter

{
  "error": "bad_request",
  "message": "Missing required parameter",
  "code": "REQ_002",
  "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FBA",
  "details": {
    "missing_parameter": "id",
    "parameter_type": "string"
  }
}
Note: Error responses follow the standard error format and do not include the result object. Only successful responses contain the result structure with profile data.

Rate Limits

This endpoint is subject to rate limits. See Rate Limits for detailed information about usage limits and caching best practices.