> ## Documentation Index
> Fetch the complete documentation index at: https://docs.harvestapi.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Profile

> Get the LinkedIn profile of the user. Required at least one of the query parameters

<CodeGroup>
  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    url: 'https://www.linkedin.com/in/williamhgates', // by URL
    // publicIdentifier: 'williamhgates', // by publicIdentifier alternatively
  });

  fetch(`https://api.harvestapi.io/linkedin/profile?${params.toString()}`, {
    headers: { 'X-API-Key': '<api-key>' },
  })
    .then((response) => response.json())
    .then((data) => console.log(data));
  ```

  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.harvestapi.io/linkedin/profile?publicIdentifier=williamhgates \
    --header 'X-API-Key: <api-key>'
  ```

  ```python Python theme={null}
  import requests

  url = "https://api.harvestapi.io/linkedin/profile?publicIdentifier=williamhgates"

  headers = {"X-API-Key": "<api-key>"}

  response = requests.request("GET", url, headers=headers)

  print(response.text)
  ```
</CodeGroup>


## OpenAPI

````yaml GET /linkedin/profile
openapi: 3.0.1
info:
  title: HarvestAPI LinkedIn API reference
  description: HarvestAPI LinkedIn API reference
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.harvestapi.io
security:
  - ApiKeyAuthHeader: []
paths:
  /linkedin/profile:
    get:
      summary: Get the LinkedIn profile of the user
      description: >-
        Get the LinkedIn profile of the user. Required at least one of the query
        parameters
      parameters:
        - name: url
          in: query
          description: URL of the LinkedIn profile (optional)
          schema:
            type: string
            format: url
        - name: publicIdentifier
          in: query
          description: Public identifier of the LinkedIn profile (optional)
          schema:
            type: string
        - name: profileId
          in: query
          description: ID of the LinkedIn profile (optional)
          schema:
            type: string
        - name: main
          in: query
          description: >-
            Set this parameter to 'true' to return only main version of the
            profile that you can see on LinkedIn without expanding profile
            sections - up to 5 experiences, 2 educations, 2 skills, etc. This
            version charges less credits
          schema:
            type: string
        - name: findEmail
          in: query
          description: >-
            Include this parameter to find the email of the profile. It will
            perform SMTP verifications to ensure deliverability. It will also
            output emails for catch-all domains and mark them as `risky`
            (deliverability is unknown). This version charges more credits.
          schema:
            type: string
        - name: skipSmtp
          in: query
          description: >-
            Include this parameter together with `findEmail` to skip SMTP email
            verification when finding emails. It will output all possible
            generated emails without checking deliverability via SMTP. It will
            do only minimal validations, as checking domains for MX records.
            This version charges less credits when using with `findEmail`.
          schema:
            type: string
        - name: includeAboutProfile
          in: query
          description: >-
            Include this parameter to scrape the "About this profile" popup from
            LinkedIn profiles.
          schema:
            type: string
      responses:
        '200':
          description: Profile response
          content:
            application/json:
              schema:
                type: object
                properties:
                  element:
                    $ref: '#/components/schemas/Profile'
                  status:
                    type: string
                  error:
                    type: string
                  query:
                    type: object
                    properties:
                      url:
                        type: string
                      publicIdentifier:
                        type: string
                      profileId:
                        type: string
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Profile:
      type: object
      properties:
        id:
          type: string
        publicIdentifier:
          type: string
        linkedinUrl:
          type: string
          format: uri
        firstName:
          type: string
        lastName:
          type: string
        emails:
          type: array
          items:
            $ref: '#/components/schemas/EmailDetail'
        websites:
          type: array
          items:
            type: string
            format: uri
        companyWebsites:
          type: array
          items: 8231bf37-c2f6-4da6-8390-34983165db95
        headline:
          type: string
        openToWork:
          type: boolean
        hiring:
          type: boolean
        premium:
          type: boolean
        influencer:
          type: boolean
        memorialized:
          type: boolean
        creator:
          type: boolean
        location:
          $ref: '#/components/schemas/Location'
        objectUrn:
          type: string
        registeredAt:
          type: string
          format: date-time
        topSkills:
          type: array
          items:
            type: string
        connectionsCount:
          type: integer
        followerCount:
          type: integer
        verified:
          type: boolean
        about:
          type: string
        currentPosition:
          type: array
          items:
            $ref: '#/components/schemas/Experience'
        profileTopEducation:
          type: array
          items:
            $ref: '#/components/schemas/Education'
        profileActions:
          type: array
          items:
            $ref: '#/components/schemas/Action'
        profilePicture:
          $ref: '#/components/schemas/ImageObject'
        coverPicture:
          $ref: '#/components/schemas/ImageObject'
        photo:
          type: string
          format: uri
        profileLocales:
          type: array
          items:
            $ref: '#/components/schemas/Locale'
        primaryLocale:
          $ref: '#/components/schemas/Locale'
        multiLocaleHeadline:
          type: array
          items:
            type: object
            properties:
              headline:
                type: string
              locale:
                type: string
        services:
          $ref: '#/components/schemas/Services'
        featured:
          $ref: '#/components/schemas/Featured'
        experience:
          type: array
          items:
            $ref: '#/components/schemas/Experience'
        education:
          type: array
          items:
            $ref: '#/components/schemas/Education'
        certifications:
          type: array
          items:
            $ref: '#/components/schemas/Certification'
        projects:
          type: array
          items:
            $ref: '#/components/schemas/Project'
        volunteering:
          type: array
          items:
            $ref: '#/components/schemas/VolunteerExperience'
        receivedRecommendations:
          type: array
          items:
            type: object
        skills:
          type: array
          items:
            $ref: '#/components/schemas/Skill'
        publications:
          type: array
          items:
            $ref: '#/components/schemas/Publication'
        courses:
          type: array
          items:
            $ref: '#/components/schemas/Course'
        patents:
          type: array
          items:
            $ref: '#/components/schemas/Patent'
        honorsAndAwards:
          type: array
          items:
            $ref: '#/components/schemas/HonorAward'
        languages:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              proficiency:
                type: string
        organizations:
          type: array
          items:
            $ref: '#/components/schemas/Organization'
        causes:
          type: array
          items:
            type: string
        composeOptionType:
          type: string
        moreProfiles:
          type: array
          items:
            $ref: '#/components/schemas/LinkedProfile'
        interests:
          type: array
          items:
            $ref: '#/components/schemas/InterestGroup'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    EmailDetail:
      type: object
      properties:
        email:
          type: string
          format: email
        deliverable:
          type: boolean
        catchAllDomain:
          type: boolean
        validEmailServer:
          type: boolean
        free:
          type: boolean
        status:
          type: string
        qualityScore:
          type: integer
    Location:
      type: object
      properties:
        linkedinText:
          type: string
        countryCode:
          type: string
        parsed:
          type: object
          properties:
            text:
              type: string
            countryCode:
              type: string
            regionCode:
              type: string
              nullable: true
            country:
              type: string
            countryFull:
              type: string
            state:
              type: string
            city:
              type: string
    Experience:
      type: object
      properties:
        position:
          type: string
        location:
          type: string
        employmentType:
          type: string
        workplaceType:
          type: string
        companyName:
          type: string
        companyLinkedinUrl:
          type: string
          format: uri
        companyId:
          type: string
        duration:
          type: string
        description:
          type: string
        skills:
          type: array
          items:
            type: string
        experienceGroupId:
          type: string
        startDate:
          $ref: '#/components/schemas/DateObject'
        endDate:
          $ref: '#/components/schemas/DateObject'
        companyLogo:
          $ref: '#/components/schemas/ImageObject'
        companyUniversalName:
          type: string
    Education:
      type: object
      properties:
        schoolName:
          type: string
        schoolLinkedinUrl:
          type: string
          format: uri
        schoolId:
          type: string
        degree:
          type: string
        fieldOfStudy:
          type: string
        skills:
          type: array
          items:
            type: string
        startDate:
          $ref: '#/components/schemas/DateObject'
        endDate:
          $ref: '#/components/schemas/DateObject'
        period:
          type: string
        schoolLogo:
          $ref: '#/components/schemas/ImageObject'
    Action:
      type: object
      properties:
        label:
          type: string
        url:
          type: string
          format: uri
    ImageObject:
      type: object
      properties:
        url:
          type: string
          format: uri
          nullable: true
        sizes:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                format: uri
              width:
                type: integer
              height:
                type: integer
    Locale:
      type: object
      properties:
        country:
          type: string
        language:
          type: string
    Services:
      type: object
      properties:
        description:
          type: string
        media:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
                nullable: true
              subtitle:
                type: string
                nullable: true
              url:
                type: string
                format: uri
              image:
                $ref: '#/components/schemas/ImageObject'
        servicesList:
          type: array
          items:
            type: string
        rating:
          type: string
        requestUrl:
          type: string
          format: uri
    Featured:
      type: object
      properties:
        images:
          type: array
          items:
            type: object
        link:
          type: string
          format: uri
          nullable: true
        title:
          type: string
          nullable: true
        subtitle:
          type: string
          nullable: true
        slides:
          type: array
          items:
            $ref: '#/components/schemas/FeaturedSlide'
    Certification:
      type: object
      properties:
        title:
          type: string
        issuedAt:
          type: string
        link:
          type: string
          format: uri
          nullable: true
        issuedBy:
          type: string
        issuedByLink:
          type: string
          format: uri
          nullable: true
        issuedByLogo:
          $ref: '#/components/schemas/ImageObject'
    Project:
      type: object
      properties:
        title:
          type: string
        duration:
          type: string
        startDate:
          $ref: '#/components/schemas/DateObject'
        endDate:
          $ref: '#/components/schemas/DateObject'
        associatedWith:
          type: string
        associatedWithLink:
          type: string
          format: uri
          nullable: true
        description:
          type: string
        contributors:
          type: array
          items:
            type: object
            properties:
              linkedinUrl:
                type: string
                format: uri
    VolunteerExperience:
      type: object
      properties:
        role:
          type: string
        organizationName:
          type: string
        duration:
          type: string
        startDate:
          $ref: '#/components/schemas/DateObject'
          nullable: true
        endDate:
          $ref: '#/components/schemas/DateObject'
          nullable: true
    Skill:
      type: object
      properties:
        name:
          type: string
        positions:
          type: array
          items:
            type: string
        endorsements:
          type: string
    Publication:
      type: object
      properties:
        title:
          type: string
        publishedAt:
          type: string
        description:
          type: string
          nullable: true
        link:
          type: string
          format: uri
          nullable: true
    Course:
      type: object
      properties:
        title:
          type: string
        associatedWith:
          type: string
        associatedWithLink:
          type: string
          format: uri
          nullable: true
    Patent:
      type: object
      properties:
        title:
          type: string
        number:
          type: string
        issuedAt:
          type: string
        description:
          type: string
        url:
          type: string
          format: uri
          nullable: true
    HonorAward:
      type: object
      properties:
        title:
          type: string
        issuedBy:
          type: string
        issuedAt:
          type: string
        description:
          type: string
        associatedWith:
          type: string
        associatedWithLink:
          type: string
          format: uri
          nullable: true
    Organization:
      type: object
      properties:
        name:
          type: string
        positionHeld:
          type: string
          nullable: true
        description:
          type: string
        startDate:
          $ref: '#/components/schemas/DateObject'
        endDate:
          $ref: '#/components/schemas/DateObject'
        companyLinkedinUrl:
          type: string
          format: uri
        logo:
          type: string
          format: uri
          nullable: true
    LinkedProfile:
      type: object
      properties:
        id:
          type: string
        firstName:
          type: string
        lastName:
          type: string
        position:
          type: string
        publicIdentifier:
          type: string
        linkedinUrl:
          type: string
          format: uri
    InterestGroup:
      type: object
      properties:
        interestName:
          type: string
        elements:
          type: array
          items:
            type: object
            properties:
              title:
                type: string
              subtitle:
                type: string
                nullable: true
              link:
                type: string
                format: uri
                nullable: true
              caption:
                type: string
              image:
                type: object
                properties:
                  url:
                    type: string
                    format: uri
    DateObject:
      type: object
      properties:
        month:
          type: string
          nullable: true
        year:
          type: integer
          nullable: true
        text:
          type: string
    FeaturedSlide:
      type: object
      properties:
        title:
          type: string
        subtitle:
          type: string
        description:
          type: string
          nullable: true
        url:
          type: string
          format: uri
        image:
          type: object
          properties:
            url:
              type: string
              format: uri
  securitySchemes:
    ApiKeyAuthHeader:
      type: apiKey
      in: header
      name: X-API-Key

````