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

Request Body

profile_urns
string[]
required
Non-empty array of LinkedIn person URNs (e.g., ["urn:li:person:ABC123"])
Don’t have a profile URN? If you only have a LinkedIn profile slug (e.g., williamhgates from linkedin.com/in/williamhgates), use the Fetch Profile endpoint first to retrieve the full profile data, which includes the person URN in the response.

Response

The endpoint returns immediately with a task ID:
success
boolean
Whether the task was created successfully
api_agent_task_id
string
UUID to poll for results via Get Task Status
message
string
Human-readable confirmation
{
  "success": true,
  "api_agent_task_id": "550e8400-e29b-41d4-a716-446655440000",
  "message": "Profiles tracking task created successfully"
}

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": [
        {
          "linkedin_post_url": "https://www.linkedin.com/feed/update/urn:li:activity:7123456789012345678",
          "linkedin_post_urn": "7123456789012345678",
          "social_urn": "urn:li:activity:7123456789012345678",
          "content": "Excited to share our latest research on...",
          "post_author": {
            "author_slug": "johndoe",
            "author_type": "person",
            "full_name": "John Doe",
            "headline": "CEO at Example Corp",
            "image_url": "https://media.licdn.com/dms/image/..."
          },
          "posted_at": "2025-01-15T10:30:00.000Z",
          "likes_count": 245,
          "shares_count": 12,
          "comments_count": 32,
          "videos": null,
          "image_urls": null
        }
      ]
    }
  }
}

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.

Learn More