Skip to main content
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

Headers

HeaderTypeRequiredDescription
Content-TypestringYesMust be application/json
x-api-keystringYesYour OutX API key

Request Body

FieldTypeRequiredDescription
profile_slugstringYesThe LinkedIn profile slug (e.g., "williamhgates" from linkedin.com/in/williamhgates)
{
  "profile_slug": "williamhgates"
}
The profile_slug is the last part of a LinkedIn profile URL. For https://www.linkedin.com/in/williamhgates, the slug is williamhgates.

Response

The endpoint returns immediately with a task ID. The actual profile data is fetched asynchronously.
{
  "success": true,
  "api_agent_task_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Profile fetch task created successfully"
}
FieldTypeDescription
successbooleanWhether the task was created successfully
api_agent_task_idstringUUID to poll for results via Get Task Status
messagestringHuman-readable confirmation

Polling for Results

After creating the task, poll the 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:
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "task_input": {
      "task_type": "agent_profile_fetch",
      "profile_slug": "williamhgates"
    },
    "task_output": {
      "name": "Bill Gates",
      "headline": "Co-chair, Bill & Melinda Gates Foundation",
      "location": "Seattle, Washington, United States",
      "profile_url": "https://www.linkedin.com/in/williamhgates",
      "connections": 500,
      "followers": 35000000,
      "about": "Co-chair of the Bill & Melinda Gates Foundation. Founder of Breakthrough Energy. Co-founder of Microsoft. Voracious reader. Avid traveler. Active blogger.",
      "experience": [
        {
          "title": "Co-chair",
          "company": "Bill & Melinda Gates Foundation",
          "duration": "2000 - Present",
          "location": "Seattle, WA"
        }
      ],
      "education": [
        {
          "school": "Harvard University",
          "degree": "Dropped out",
          "years": "1973 - 1975"
        }
      ],
      "skills": ["Public Speaking", "Philanthropy", "Technology"]
    }
  }
}

Code Examples

# 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"

Error Responses

StatusErrorDescription
400Missing or invalid 'profile_slug'The profile_slug field is missing or not a string
401Missing API Key / Invalid API KeyAPI key is missing or invalid
403Plugin installation required...No team member has an active Chrome extension. See Authentication

FAQ

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.
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.
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.
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.

Learn More