Skip to main content
This guide walks you through making your first LinkedIn API request end-to-end: from getting your API key to retrieving full profile data.

Prerequisites

Before you begin, make sure you have:
  1. An OutX account (sign up at outx.ai)
  2. The OutX Chrome extension installed and active
  3. Your API key from mentions.outx.ai/api-doc
The OutX Chrome extension must be installed and active on at least one team member’s browser within the last 48 hours. Without this, API calls will return a 403 error. See Authentication for details.

End-to-End Walkthrough

1

Get Your API Key

  1. Log in to your OutX account
  2. Go to mentions.outx.ai/api-doc
  3. Click “Reveal API Key”
  4. Copy your API key
Store it in an environment variable for easy use:
export OUTX_API_KEY="your-api-key-here"
2

Install the Chrome Extension

Install the OutX Chrome extension and log in with your OutX account. The extension will automatically maintain a browser session that the API uses to execute tasks.
The extension runs in the background. Just keep Chrome open and it will stay active.
3

Fetch a LinkedIn Profile

Send a POST request to create a profile fetch task. You will receive an api_agent_task_id that you use to check for results.
curl -X POST \
  "https://api.outx.ai/linkedin-agent/fetch-profile" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $OUTX_API_KEY" \
  -d '{"profile_slug": "williamhgates"}'
Response:
{
  "success": true,
  "api_agent_task_id": "abc-123-def-456",
  "message": "Profile fetch task created successfully"
}
4

Poll for Results

The task is now queued. Poll the task status endpoint until the status changes from pending to completed.
curl -X GET \
  "https://api.outx.ai/linkedin-agent/get-task-status?api_agent_task_id=abc-123-def-456" \
  -H "x-api-key: $OUTX_API_KEY"
Pending response:
{
  "success": true,
  "data": {
    "id": "abc-123-def-456",
    "status": "pending",
    "task_input": {
      "task_type": "agent_profile_fetch",
      "profile_slug": "williamhgates"
    },
    "task_output": null
  }
}
5

Get Profile Data

Once the task completes, the response includes the full profile data in task_output:
{
  "success": true,
  "data": {
    "id": "abc-123-def-456",
    "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...",
      "experience": [...],
      "education": [...],
      "skills": [...]
    }
  }
}
You now have full LinkedIn profile data accessible via a simple API.

Complete Working Example

Here is a single, copy-paste-ready script that performs the entire flow:
# Step 1: Create the task
TASK_ID=$(curl -s -X POST \
  "https://api.outx.ai/linkedin-agent/fetch-profile" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $OUTX_API_KEY" \
  -d '{"profile_slug": "williamhgates"}' | jq -r '.api_agent_task_id')

echo "Task created: $TASK_ID"

# Step 2: Poll until complete
while true; do
  RESULT=$(curl -s -X GET \
    "https://api.outx.ai/linkedin-agent/get-task-status?api_agent_task_id=$TASK_ID" \
    -H "x-api-key: $OUTX_API_KEY")

  STATUS=$(echo $RESULT | jq -r '.data.status')
  echo "Status: $STATUS"

  if [ "$STATUS" = "completed" ]; then
    echo $RESULT | jq '.data.task_output'
    break
  fi

  sleep 5
done

Next Steps

Frequently Asked Questions

Q: How long does a profile fetch task take to complete? Usually seconds to a few minutes, depending on when the Chrome extension picks up the task. The extension checks for new tasks on a regular schedule. Most tasks complete within 30 seconds under normal conditions.
Q: How often should I poll for task status? Every 5 seconds is recommended. Set a timeout of 2-3 minutes to avoid polling indefinitely. The example code on this page uses 30 attempts with a 5-second delay, which provides a 2.5-minute window for task completion.