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

Fetch Profile

Full endpoint reference for profile fetching

Fetch Posts

Retrieve posts from LinkedIn profiles

Like Post

Automate liking LinkedIn posts

Comment on Post

Post comments programmatically

AI Agent Prompt

Use the following instructions when building an AI agent that integrates with the OutX LinkedIn Data API.

Prerequisites

  • API key stored in OUTX_API_KEY environment variable
  • OutX Chrome extension installed and active on at least one team member’s browser

Quick Reference

ActionMethodEndpointKey Params
Fetch profilePOST/linkedin-agent/fetch-profileprofile_slug (required)
Fetch postsPOST/linkedin-agent/fetch-profiles-postsprofile_urns (required, array)
Like postPOST/linkedin-agent/like-postsocial_urn (required)
Comment on postPOST/linkedin-agent/comment-postsocial_urn (required), comment_text (required)
Check task statusGET/linkedin-agent/get-task-statusapi_agent_task_id (required, query param)

Async Pattern

All LinkedIn Data endpoints return {api_agent_task_id} immediately. You must poll get-task-status until status is "completed", then read task_output.

Guardrails — ALWAYS DO

  1. Use x-api-key header for authentication
  2. Use base URL https://api.outx.ai
  3. Poll get-task-status every 5 seconds after submitting a task
  4. Set a timeout (30 attempts / 2.5 minutes) to avoid polling indefinitely
  5. Check status field: "pending""processing""completed" or "failed"
  6. Space API calls at least 10–30 seconds apart — OutX is a proxy, not a rate limiter
  7. Distribute calls throughout the day — don’t batch everything in a short window

Guardrails — NEVER DO

  1. Never hardcode API keys in source code
  2. Never assume responses are synchronous — always poll for results
  3. Never send engagement actions without a valid social_urn
  4. Never skip error handling for 403 (Chrome extension not active)
  5. Never burst API calls — sending many requests in rapid succession risks LinkedIn flagging the account
For the full OutX API skill file, see outx-skill.md.

Frequently Asked Questions

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

Learn More