Skip to main content
The Fetch Profiles Posts endpoint creates an async task to retrieve recent posts from one or more LinkedIn profiles. You provide an array of LinkedIn person URNs and receive a task ID to poll for results.

Endpoint

POST https://api.outx.ai/linkedin-agent/fetch-profiles-posts

Headers

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

Request Body

FieldTypeRequiredDescription
profile_urnsstring[]YesNon-empty array of LinkedIn person URNs (e.g., ["urn:li:person:ABC123"])
{
  "profile_urns": [
    "urn:li:person:ABC123",
    "urn:li:person:DEF456"
  ]
}
A LinkedIn person URN looks like urn:li:person:ABC123. You can find this in LinkedIn page source or via the Fetch Profile endpoint’s output.

Response

The endpoint returns immediately with a task ID:
{
  "success": true,
  "api_agent_task_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Profiles tracking 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

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 posts data:
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "task_input": {
      "task_type": "agent_profiles_tracking",
      "profile_urns": ["urn:li:person:ABC123"]
    },
    "task_output": {
      "posts": [
        {
          "urn": "urn:li:activity:7123456789012345678",
          "author_name": "John Doe",
          "author_urn": "urn:li:person:ABC123",
          "content": "Excited to share our latest research on...",
          "posted_at": "2025-01-15T10:30:00Z",
          "likes_count": 245,
          "comments_count": 32,
          "reposts_count": 12,
          "media_type": "image",
          "post_url": "https://www.linkedin.com/feed/update/urn:li:activity:7123456789012345678"
        }
      ]
    }
  }
}

Code Examples

# Create the task
curl -X POST \
  "https://api.outx.ai/linkedin-agent/fetch-profiles-posts" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"profile_urns": ["urn:li:person:ABC123"]}'

# 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_urns' (must be a non-empty array)The profile_urns field is missing, not an array, or empty
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

LinkedIn person URNs (urn:li:person:ABC123) can be found in LinkedIn page source, through the LinkedIn API, or from the output of the Fetch Profile endpoint. They are unique identifiers for LinkedIn members.
You can pass multiple URNs in a single request. The profile_urns array must contain at least one URN. For very large batches, consider splitting into smaller requests to ensure timely processing.
The API returns recent posts visible on the profile’s activity feed. The exact range depends on LinkedIn’s own feed rendering and typically covers the most recent posts available on the profile page.
For one-off fetches, use this endpoint. For ongoing monitoring of LinkedIn profiles and their posts, consider the Intelligence API’s People Watchlist, which automatically tracks profiles and collects new posts on a schedule.