Get LinkedIn Profile

Create custom API integrations using OpenAPI schemas to extend Mates' capabilities with any REST service

Last updated 11 months ago

Icon to Download

Overview

Introduction

The LinkedIn Profile API provides a powerful way to access comprehensive LinkedIn profile data programmatically. This API allows developers, recruiters, sales professionals, and data analysts to retrieve detailed information about LinkedIn profiles, including personal details, work experience, education history, skills, and company information.

Key Features

  • Comprehensive Profile Data: Access detailed profile information including name, location, headline, about section, and contact details (when available)

  • Professional Experience: Retrieve complete work history with company names, job titles, durations, and descriptions

  • Education Background: Access education history including schools, degrees, fields of study, and graduation dates

  • Company Information: Get detailed data about current and past companies including size, industry, website, and headquarters location

  • Optional Profile Sections: Selectively include additional sections like skills, certifications, publications, honors, projects, and more

  • Flexible Query Options: Retrieve profiles using LinkedIn URLs

Use Cases

Recruitment and Talent Acquisition

  • Candidate Screening: Automatically import candidate profiles into your ATS or CRM

  • Talent Sourcing: Build targeted talent pools based on skills, experience, and education

  • Candidate Enrichment: Supplement application data with comprehensive LinkedIn profile information

Sales and Business Development

  • Lead Generation: Identify and qualify potential leads based on job titles and company information

  • Account-Based Marketing: Enrich your CRM with detailed prospect information

  • Sales Intelligence: Get insights about decision-makers before meetings or calls

Market Research and Analysis

  • Industry Analysis: Gather data about professionals in specific industries or roles

  • Competitive Intelligence: Research employees at competitor companies

  • Trend Identification: Analyze career paths and skill development across industries

Personal Branding and Networking

  • Profile Optimization: Compare profiles to identify effective personal branding strategies

  • Network Analysis: Map professional connections and identify networking opportunities

  • Benchmarking: Compare your profile against industry peers or competitors

Implementation Guide

Authentication

The API requires a RapidAPI key which must be included in the x-rapidapi-key header for all requests.

Credential Json Example

{
    "headers" : {
        "x-rapidapi-key" : "f648d436eaxxxxxxxxxxxxxxxxcb3b8jsn5e62e4fe1ecb",
        "x-rapidapi-host" : "fresh-linkedin-profile-data.p.rapidapi.com"
    }
}

Credit Usage

  • Base profile request: 1 credit

  • Each additional section (skills, certifications, etc.): 0.5 credits per section

Best Practices

  1. Optimize Credit Usage: Only request additional sections when needed to minimize credit consumption

  2. Error Handling: Implement robust error handling for 400, 404, and 503 responses

  3. Rate Limiting: Implement rate limiting in your application to avoid API usage spikes

  4. Data Storage: Consider caching frequently accessed profiles to reduce API calls

  5. Data Privacy: Ensure compliance with relevant data privacy regulations when storing and processing profile data

Technical Considerations

  • Response Size: Full profile responses with all optional sections can be large; ensure your application can handle varying response sizes

  • URL Validation: Validate LinkedIn URLs before making API calls to avoid unnecessary errors

  • Pagination: For bulk processing, implement proper pagination and delay between requests

  • Data Normalization: Normalize and clean data fields (especially for skills and industries) for consistent analysis

Limitations

  • Profiles must be publicly accessible on LinkedIn

  • Some profile sections may be unavailable depending on privacy settings

  • Historical data availability may vary

  • API responses reflect the data available at the time of the request

This API provides a reliable way to programmatically access LinkedIn profile data, enabling a wide range of applications across recruitment, sales, marketing, and data analysis domains.

OpenAPI Schema

openapi: 3.0.3
info:
  title: LinkedIn Profile API
  description: |
    API to retrieve LinkedIn profile data including experience, education, and company details.
    
    ## LLM Usage Guide
    This API fetches LinkedIn profile data by URL. Authentication headers are handled automatically.
    - Basic profile data costs 1 credit
    - Each optional section costs 0.5 additional credits
  version: '1.0'
servers:
  - url: https://fresh-linkedin-profile-data.p.rapidapi.com
    description: LinkedIn Profile Data API

paths:
  /get-linkedin-profile:
    get:
      summary: Get LinkedIn Profile Data
      description: |
        Retrieves profile data from a LinkedIn URL.
        
        ## For LLMs
        When using this endpoint:
        1. Provide a valid LinkedIn profile URL
        2. Enable optional parameters only when needed (each costs 0.5 credits)
        3. Authentication headers are handled automatically
      operationId: getLinkedInProfile
      parameters:
        - name: linkedin_url
          in: query
          description: |
            The LinkedIn profile URL to retrieve data from.
            
            ## For LLMs
            - Must be a complete URL (https://linkedin.com/in/username)
            - This parameter is MANDATORY
          required: true
          schema:
            type: string
          example: "https://linkedin.com/in/anthonyjames"
        - name: include_skills
          in: query
          description: |
            Include skills in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_certifications
          in: query
          description: |
            Include certifications in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_publications
          in: query
          description: |
            Include publications in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_honors
          in: query
          description: |
            Include honors and awards in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_volunteers
          in: query
          description: |
            Include volunteer experience in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_projects
          in: query
          description: |
            Include projects in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_patents
          in: query
          description: |
            Include patents in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_courses
          in: query
          description: |
            Include courses in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_organizations
          in: query
          description: |
            Include organizations in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_profile_status
          in: query
          description: |
            Include profile status in the response (+0.5 credits).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
        - name: include_company_public_url
          in: query
          description: |
            Include company LinkedIn URL in the response (free).
          required: false
          schema:
            type: string
            enum: ["true", "false"]
            default: "false"
      responses:
        '200':
          description: Successful response with LinkedIn profile data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProfileResponse'
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - rapidApiKey: []
          rapidApiHost: []

components:
  schemas:
    ProfileResponse:
      type: object
      description: |
        Response containing LinkedIn profile data
        
        ## For LLMs
        - Basic info (name, location, headline) is always included
        - Additional sections appear only when requested via parameters
      properties:
        message:
          type: string
          description: Status message ("ok" for success)
          example: "ok"
        data:
          type: object
          description: LinkedIn profile data
          properties:
            # Basic Profile Info
            linkedin_url:
              type: string
              example: "https://linkedin.com/in/anthonyjames"
            full_name:
              type: string
              example: "Anthony James"
            location:
              type: string
              example: "Sydney, Australia"
            headline:
              type: string
              example: "Technology Leader & Innovator"
            about:
              type: string
              example: "Experienced leader in marketing and technology."
            profile_image_url:
              type: string
              example: "https://example.com/profile.jpg"
            
            # Current Job Info
            job_title:
              type: string
              example: "CEO"
            company:
              type: string
              example: "Trinity Consulting Services"
            current_job_duration:
              type: string
              example: "8 years 2 months"
            
            # Company Info
            company_industry:
              type: string
              example: "Technology Consulting"
            company_size:
              type: string
              example: "201-500"
            
            # Career History (always included)
            experiences:
              type: array
              description: Work experiences (always included)
              items:
                type: object
                properties:
                  company:
                    type: string
                    example: "ABC Tech"
                  title:
                    type: string
                    example: "Senior Consultant"
                  duration:
                    type: string
                    example: "5 years"
            
            # Education (always included)
            educations:
              type: array
              description: Education history (always included)
              items:
                type: object
                properties:
                  school:
                    type: string
                    example: "University of Technology Sydney"
                  degree:
                    type: string
                    example: "MBA"
                  field_of_study:
                    type: string
                    example: "Business Administration"
            
            # Optional sections (only included when requested)
            skills:
              type: string
              description: Skills (only with include_skills=true)
              example: "Leadership, Innovation, Marketing"
            
            certifications:
              type: array
              description: Certifications (only with include_certifications=true)
              items:
                type: object
                properties:
                  name:
                    type: string
                    example: "Project Management Professional (PMP)"
            
            publications:
              type: array
              description: Publications (only with include_publications=true)
              items:
                type: object
            
            honors_and_awards:
              type: array
              description: Honors (only with include_honors=true)
              items:
                type: object
            
            volunteers:
              type: array
              description: Volunteer experience (only with include_volunteers=true)
              items:
                type: object
            
            projects:
              type: array
              description: Projects (only with include_projects=true)
              items:
                type: object
            
            patents:
              type: array
              description: Patents (only with include_patents=true)
              items:
                type: object
            
            courses:
              type: array
              description: Courses (only with include_courses=true)
              items:
                type: object
            
            organizations:
              type: array
              description: Organizations (only with include_organizations=true)
              items:
                type: object
            
            profile_status:
              type: object
              description: Profile status (only with include_profile_status=true)
      required:
        - message
        - data
    
    ErrorResponse:
      type: object
      description: Error response
      properties:
        data:
          type: string
          description: Data field (null in case of error)
          example: null
        message:
          type: string
          description: Error message
          example: "Bad request: Invalid linkedin_url."
      required:
        - data
        - message
  
  securitySchemes:
    rapidApiKey:
      type: apiKey
      name: x-rapidapi-key
      in: header
      description: RapidAPI key (automatically handled)
    rapidApiHost:
      type: apiKey
      name: x-rapidapi-host
      in: header
      description: RapidAPI host identifier (automatically handled)