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

# Get user profile

> Get LinkedIn user profile information

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">1 credit</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I want to make an API call to https://api.keyapi.ai/v1/linkedin/get_user_profile.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/linkedin/get_user_profile

Description: Get LinkedIn user profile information

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- username (Required): LinkedIn username, obtainable from the profile URL
For example: https://www.linkedin.com/in/jack — username is jack. Example: jack
- include_follower_and_connection (Optional): Include follower and connection count (optional). Example: false
- include_experiences (Optional): Include work experience (optional). Example: false
- include_skills (Optional): Include skills (optional). Example: false
- include_certifications (Optional): Include certifications (optional). Example: false
- include_publications (Optional): Include publications (optional). Example: false
- include_educations (Optional): Include education background (optional). Example: false
- include_volunteers (Optional): Include volunteer experience (optional). Example: false
- include_honors (Optional): Include honors and awards (optional). Example: false
- include_interests (Optional): Include interests (optional). Example: false
- include_bio (Optional): Include personal bio (optional). Example: false

Example Response:
{
"code": 0,
"message": "success",
"data": {},
"requestId": "40db0be5-da77-4613-9052-fde8877ec937"
}`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/linkedin.openapi.json GET /v1/linkedin/get_user_profile
openapi: 3.0.1
info:
  title: LinkedIn API english documentation
  description: >-
    The english reference documentation of the LinkedIn API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security:
  - JWT Bearer: []
tags: []
paths:
  /v1/linkedin/get_user_profile:
    get:
      tags: []
      summary: Get user profile
      description: Get LinkedIn user profile information
      parameters:
        - name: username
          in: query
          description: |-
            LinkedIn username, obtainable from the profile URL
            For example: https://www.linkedin.com/in/jack — username is jack
          required: true
          example: jack
          schema:
            type: string
        - name: include_follower_and_connection
          in: query
          description: Include follower and connection count (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
        - name: include_experiences
          in: query
          description: Include work experience (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
        - name: include_skills
          in: query
          description: Include skills (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
        - name: include_certifications
          in: query
          description: Include certifications (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
        - name: include_publications
          in: query
          description: Include publications (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
        - name: include_educations
          in: query
          description: Include education background (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
        - name: include_volunteers
          in: query
          description: Include volunteer experience (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
        - name: include_honors
          in: query
          description: Include honors and awards (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
        - name: include_interests
          in: query
          description: Include interests (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
        - name: include_bio
          in: query
          description: Include personal bio (optional)
          required: false
          example: 'false'
          schema:
            type: boolean
            nullable: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  id: '615825428'
                  urn: ACoAACS0wBQB9GfGRgyQfsFTHlx2ZBohtGXPlQ8
                  public_identifier: jack
                  first_name: Jack
                  last_name: Rogers
                  full_name: Jack Rogers
                  headline: Problem Solver, Developer, Human - Managing Director at D3VL
                  is_premium: false
                  is_open_to_work: false
                  is_hiring: false
                  is_memorialized: false
                  is_influencer: false
                  is_top_voice: false
                  is_creator: false
                  birth:
                    day: null
                    month: null
                    year: null
                  pronoun: null
                  created: 1509141319065
                  created_date: '2017-10-27T21:55:19.065Z'
                  location:
                    country: United Kingdom
                    country_code: GB
                    city: East Cowes, England, United Kingdom
                    postal_code: null
                  cover:
                    - width: 574
                      height: 143
                      url: >-
                        https://media.licdn.com/dms/image/v2/D4E16AQEXgh9-ad4Spg/profile-displaybackgroundimage-shrink_200_800/profile-displaybackgroundimage-shrink_200_800/0/1675532069775?e=1775088000&v=beta&t=k2n03RIe5zrnxSXpInOTsIOdj2i_07HetwmxxM3mGYU
                      expires_at: 1775088000000
                    - width: 574
                      height: 143
                      url: >-
                        https://media.licdn.com/dms/image/v2/D4E16AQEXgh9-ad4Spg/profile-displaybackgroundimage-shrink_350_1400/profile-displaybackgroundimage-shrink_350_1400/0/1675532069775?e=1775088000&v=beta&t=WwnACp2L_r9pN0DPz2huPum6w3dr_S8YHN2FQOwit8s
                      expires_at: 1775088000000
                  website: {}
                  supported_locales:
                    - country: US
                      language: en
                  primary_locale:
                    country: US
                    language: en
                requestId: 40db0be5-da77-4613-9052-fde8877ec937
          headers: {}
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/linkedin/get_user_profile?username=jack&include_follower_and_connection=false&include_experiences=false&include_skills=false&include_certifications=false&include_publications=false&include_educations=false&include_volunteers=false&include_honors=false&include_interests=false&include_bio=false' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/linkedin/get_user_profile',
                params={"username": "jack", "include_follower_and_connection": "false", "include_experiences": "false", "include_skills": "false", "include_certifications": "false", "include_publications": "false", "include_educations": "false", "include_volunteers": "false", "include_honors": "false", "include_interests": "false", "include_bio": "false"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"username": "jack",
            "include_follower_and_connection": "false", "include_experiences":
            "false", "include_skills": "false", "include_certifications":
            "false", "include_publications": "false", "include_educations":
            "false", "include_volunteers": "false", "include_honors": "false",
            "include_interests": "false", "include_bio": "false"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/linkedin/get_user_profile?${params}`,
            {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````