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

# LinkedIn Profile Data API - Fetch Any LinkedIn Profile

> Fetch full LinkedIn profile data including name, headline, experience, education, and skills using the OutX LinkedIn Profile API. A reliable Proxycurl alternative.

<script type="application/ld+json">
  {`{
    "@context": "https://schema.org",
    "@type": "WebAPI",
    "name": "OutX LinkedIn Profile API",
    "url": "https://api.outx.ai/linkedin-agent/fetch-profile",
    "description": "Fetch any LinkedIn profile data including name, headline, experience, education, and skills via API. A Proxycurl alternative.",
    "documentation": "https://outx.ai/docs/linkedin-api/fetch-profile",
    "provider": {
      "@type": "Organization",
      "name": "OutX.ai",
      "url": "https://www.outx.ai"
    }
    }`}
</script>

The Fetch Profile endpoint creates an async task to retrieve full LinkedIn profile data for any public profile. You provide a profile slug (the part after `linkedin.com/in/`) and receive a task ID to poll for results.

## Endpoint

```
POST https://api.outx.ai/linkedin-agent/fetch-profile
```

## Request Body

<ParamField body="profile_slug" type="string" required>
  The LinkedIn profile slug (e.g., `"williamhgates"` from `linkedin.com/in/williamhgates`)
</ParamField>

<Tip>
  The `profile_slug` is the last part of a LinkedIn profile URL. For `https://www.linkedin.com/in/williamhgates`, the slug is `williamhgates`.
</Tip>

## Response

The endpoint returns immediately with a task ID. The actual profile data is fetched asynchronously.

<ResponseField name="success" type="boolean">
  Whether the task was created successfully
</ResponseField>

<ResponseField name="api_agent_task_id" type="string">
  UUID to poll for results via [Get Task Status](/docs/linkedin-api/get-task-status)
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable confirmation
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "api_agent_task_id": "550e8400-e29b-41d4-a716-446655440000",
    "message": "Profile fetch task created successfully"
  }
  ```
</ResponseExample>

## Polling for Results

After creating the task, poll the [Get Task Status](/docs/linkedin-api/get-task-status) endpoint until the status is `completed`:

```
GET https://api.outx.ai/linkedin-agent/get-task-status?api_agent_task_id=550e8400-e29b-41d4-a716-446655440000
```

### Completed Response

When the task finishes, `task_output` contains the profile data:

```json theme={null}
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "task_input": {
      "task_type": "agent_profile_fetch",
      "profile_slug": "williamhgates"
    },
    "task_output": {
      "profile": {
        "full_name": "Bill Gates",
        "headline": "Co-chair, Bill & Melinda Gates Foundation",
        "location": "Seattle, Washington, United States",
        "image_url": "https://media.licdn.com/dms/image/...",
        "email": "",
        "phone": "",
        "profile_slug": "williamhgates",
        "profile_urn": "ACoAAA8BYqEBCGLg_vT_ca6mMEz",
        "dob": null,
        "positions": [
          {
            "title": "Co-chair",
            "company_name": "Bill & Melinda Gates Foundation",
            "linkedin_company_urn": "1234567",
            "start_month": 1,
            "start_year": 2000,
            "end_month": null,
            "end_year": null,
            "is_current": true,
            "location": "Seattle, WA"
          }
        ]
      }
    }
  }
}
```

## Code Examples

<RequestExample>
  ```bash cURL theme={null}
  # Create the task
  curl -X POST \
    "https://api.outx.ai/linkedin-agent/fetch-profile" \
    -H "Content-Type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -d '{"profile_slug": "williamhgates"}'

  # Poll for results
  curl -X GET \
    "https://api.outx.ai/linkedin-agent/get-task-status?api_agent_task_id=TASK_ID" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  async function fetchProfile(profileSlug) {
    // Create the task
    const response = await fetch(
      "https://api.outx.ai/linkedin-agent/fetch-profile",
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "x-api-key": "YOUR_API_KEY",
        },
        body: JSON.stringify({ profile_slug: profileSlug }),
      }
    );

    const { api_agent_task_id } = await response.json();

    // Poll for results
    while (true) {
      const statusRes = await fetch(
        `https://api.outx.ai/linkedin-agent/get-task-status?api_agent_task_id=${api_agent_task_id}`,
        { headers: { "x-api-key": "YOUR_API_KEY" } }
      );

      const result = await statusRes.json();
      if (result.data.status === "completed") {
        return result.data.task_output;
      }

      await new Promise((r) => setTimeout(r, 5000));
    }
  }

  const profile = await fetchProfile("williamhgates");
  console.log(profile);
  ```

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

  def fetch_profile(profile_slug):
      headers = {
          "Content-Type": "application/json",
          "x-api-key": "YOUR_API_KEY",
      }

      # Create the task
      response = requests.post(
          "https://api.outx.ai/linkedin-agent/fetch-profile",
          headers=headers,
          json={"profile_slug": profile_slug},
      )
      task_id = response.json()["api_agent_task_id"]

      # Poll for results
      while True:
          result = requests.get(
              "https://api.outx.ai/linkedin-agent/get-task-status",
              headers={"x-api-key": "YOUR_API_KEY"},
              params={"api_agent_task_id": task_id},
          ).json()

          if result["data"]["status"] == "completed":
              return result["data"]["task_output"]

          time.sleep(5)

  profile = fetch_profile("williamhgates")
  print(profile)
  ```
</RequestExample>

## Error Responses

| Status | Error                                 | Description                                                                                        |
| ------ | ------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `400`  | `Missing or invalid 'profile_slug'`   | The `profile_slug` field is missing or not a string                                                |
| `401`  | `Missing API Key` / `Invalid API Key` | API key is missing or invalid                                                                      |
| `403`  | `Plugin installation required...`     | No team member has an active Chrome extension. See [Authentication](/docs/api-reference/authentication) |

## FAQ

<AccordionGroup>
  <Accordion title="What data does the profile response include?">
    The profile data typically includes: name, headline, location, profile URL, number of connections and followers, about/summary, work experience, education, and skills. The exact fields depend on what the LinkedIn profile has publicly available.
  </Accordion>

  <Accordion title="Can I fetch private profiles?">
    The API fetches profile data that is visible to the LinkedIn account running the Chrome extension. If the team member's LinkedIn account can see a profile, the API can fetch it. Profiles with restricted visibility may return limited data.
  </Accordion>

  <Accordion title="What format should the profile_slug be in?">
    The `profile_slug` is the last segment of the LinkedIn profile URL. For `https://www.linkedin.com/in/john-doe-123abc`, the slug is `john-doe-123abc`. Do not include the full URL or the `/in/` prefix.
  </Accordion>

  <Accordion title="How long does the task take to complete?">
    Most profile fetch tasks complete within seconds to a few minutes, depending on when the Chrome extension picks up the task. We recommend polling every 5 seconds with a timeout of 2-3 minutes.
  </Accordion>

  <Accordion title="Should I space out profile fetch requests?">
    Yes. OutX is a proxy and does not rate-limit requests on your behalf. Each fetch is executed as a real LinkedIn profile view. Fetching many profiles in rapid succession can trigger LinkedIn's activity monitoring. Space requests at least 10–30 seconds apart and distribute them throughout the day. See [Rate Limits](/docs/api-reference/rate-limits).
  </Accordion>
</AccordionGroup>

## Related

* [Get Task Status](/docs/linkedin-api/get-task-status) - Poll for task results
* [Fetch Posts](/docs/linkedin-api/fetch-profiles-posts) - Get posts from a profile
* [Quick Start](/docs/linkedin-api/quickstart) - End-to-end tutorial
* [Intelligence API](/docs/api-reference/introduction) - For ongoing monitoring of LinkedIn profiles

***

## Learn More

* [How to Scrape LinkedIn Data Safely](https://www.outx.ai/blog/scrape-data-linkedin)
* [LinkedIn API Guide](https://www.outx.ai/blog/linkedin-api-guide)
