> ## Documentation Index
> Fetch the complete documentation index at: https://www.outx.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LinkedIn Company Posts API - Fetch Company Page Posts

> Fetch recent posts from any LinkedIn company page using the OutX LinkedIn API. Monitor competitor activity, industry trends, and company announcements.

<script type="application/ld+json">
  {`{
    "@context": "https://schema.org",
    "@type": "WebAPI",
    "name": "OutX LinkedIn Company Posts API",
    "url": "https://api.outx.ai/linkedin-agent/fetch-company-posts",
    "description": "Fetch recent posts from any LinkedIn company page via API. Monitor competitor activity, industry trends, and company announcements.",
    "documentation": "https://outx.ai/docs/linkedin-api/fetch-company-posts",
    "provider": {
      "@type": "Organization",
      "name": "OutX.ai",
      "url": "https://www.outx.ai"
    }
    }`}
</script>

The Fetch Company Posts endpoint creates an async task to retrieve recent posts from a LinkedIn company page. You provide a company slug and receive a task ID to poll for the list of posts with engagement data.

## Endpoint

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

## Request Body

<ParamField body="company_slug" type="string" required>
  The LinkedIn company slug (e.g., `"microsoft"` from `linkedin.com/company/microsoft`)
</ParamField>

<Tip>
  The `company_slug` is the last segment of a LinkedIn company URL. For `https://www.linkedin.com/company/openai`, the slug is `openai`.
</Tip>

## Response

The endpoint returns immediately with a task ID. The actual posts are fetched asynchronously.

<ResponseField name="success" type="boolean">
  Whether the task was created successfully
</ResponseField>

<ResponseField name="api_agent_task_id" type="string">
  UUID to poll for results via [Get Task Status](/linkedin-api/get-task-status)
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable confirmation
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "api_agent_task_id": "550e8400-e29b-41d4-a716-446655440000",
    "message": "Company posts tracking task created successfully"
  }
  ```
</ResponseExample>

## Polling for Results

After creating the task, poll the [Get Task Status](/linkedin-api/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 cleaned list of posts and a total count:

```json theme={null}
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "task_input": {
      "task_type": "agent_company_tracking",
      "company_slug": "openai"
    },
    "task_output": {
      "posts": [
        {
          "entityUrn": "urn:li:activity:7234567890123456789",
          "linkedin_post_urn": "7234567890123456789",
          "social_urn": "urn:li:activity:7234567890123456789",
          "post_url": "openai_7234567890123456789",
          "poster": {
            "poster_name": "OpenAI",
            "url": "openai",
            "poster_urn": "openai",
            "type": "company",
            "headline": "AI Research and Deployment",
            "image_url": "https://media.licdn.com/dms/image/..."
          },
          "author_type": "company",
          "post_type": "company",
          "content": "We're excited to share our latest research on reasoning models...",
          "video_urls": null,
          "image_urls": ["https://media.licdn.com/dms/image/..."],
          "reactions": {
            "likes": 4823,
            "impressions": null,
            "comments": 312,
            "shares": 891
          },
          "created_at": "3d",
          "posted_at": "2026-03-10T14:00:00.000Z"
        }
      ],
      "total": 15
    }
  }
}
```

## Code Examples

<RequestExample>
  ```bash cURL theme={null}
  # Create the task
  curl -X POST \
    "https://api.outx.ai/linkedin-agent/fetch-company-posts" \
    -H "Content-Type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -d '{"company_slug": "openai"}'

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

  ```javascript JavaScript theme={null}
  async function fetchCompanyPosts(companySlug) {
    // Create the task
    const response = await fetch(
      "https://api.outx.ai/linkedin-agent/fetch-company-posts",
      {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          "x-api-key": "YOUR_API_KEY",
        },
        body: JSON.stringify({ company_slug: companySlug }),
      }
    );

    const { api_agent_task_id } = await response.json();

    // Poll for results
    while (true) {
      const statusRes = await fetch(
        `https://api.outx.ai/linkedin-agent/get-task-status?api_agent_task_id=${api_agent_task_id}`,
        { headers: { "x-api-key": "YOUR_API_KEY" } }
      );

      const result = await statusRes.json();
      if (result.data.status === "completed") {
        return result.data.task_output;
      }

      await new Promise((r) => setTimeout(r, 5000));
    }
  }

  const posts = await fetchCompanyPosts("openai");
  console.log(posts);
  ```

  ```python Python theme={null}
  import requests
  import time

  def fetch_company_posts(company_slug):
      headers = {
          "Content-Type": "application/json",
          "x-api-key": "YOUR_API_KEY",
      }

      # Create the task
      response = requests.post(
          "https://api.outx.ai/linkedin-agent/fetch-company-posts",
          headers=headers,
          json={"company_slug": company_slug},
      )
      task_id = response.json()["api_agent_task_id"]

      # Poll for results
      while True:
          result = requests.get(
              "https://api.outx.ai/linkedin-agent/get-task-status",
              headers={"x-api-key": "YOUR_API_KEY"},
              params={"api_agent_task_id": task_id},
          ).json()

          if result["data"]["status"] == "completed":
              return result["data"]["task_output"]

          time.sleep(5)

  posts = fetch_company_posts("openai")
  print(posts)
  ```
</RequestExample>

## Error Responses

| Status | Error                                 | Description                                                                                        |
| ------ | ------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `400`  | `Missing or invalid 'company_slug'`   | The `company_slug` field is missing or not a string                                                |
| `401`  | `Missing API Key` / `Invalid API Key` | API key is missing or invalid                                                                      |
| `403`  | `Plugin installation required...`     | No team member has an active Chrome extension. See [Authentication](/api-reference/authentication) |

## FAQ

<AccordionGroup>
  <Accordion title="What data does each post include?">
    Each cleaned post includes: `entityUrn` and `linkedin_post_urn` (post identifiers), `social_urn` (the activity URN to use with like/comment endpoints), `post_url` (slug portion of the share URL), `poster` (company info with name, slug, type, headline, and image URL), `content` (post text), `image_urls` (array of image URLs or `null`), `video_urls` (array of video URLs or `null`), `reactions` (likes, comments, shares, impressions), `created_at` (relative time like `"3d"`), and `posted_at` (ISO timestamp).
  </Accordion>

  <Accordion title="How many posts does this return?">
    The endpoint fetches up to 50 posts from the company's LinkedIn feed in one call. The response includes a `total` field with the actual count of posts returned. The exact number depends on the company's recent activity.
  </Accordion>

  <Accordion title="How is this different from the Company Watchlist?">
    This endpoint returns a one-time snapshot of a company's recent posts. The [Company Watchlist](/api-reference/watchlist/company/create) in the Intelligence API continuously monitors a company and delivers new posts in real time as they are published, without requiring you to poll manually.
  </Accordion>

  <Accordion title="Can I use the social_urn from posts for liking or commenting?">
    Yes. Each post in the response includes a `social_urn` field (e.g., `"urn:li:activity:7234567890123456789"`). You can pass this directly to the [Like Post](/linkedin-api/like-post) or [Comment on Post](/linkedin-api/comment-post) endpoints as the `social_urn` parameter.
  </Accordion>

  <Accordion title="How long does the task take to complete?">
    Most company post fetch tasks complete within seconds to a couple of minutes, depending on when the Chrome extension picks up the task. We recommend polling every 5 seconds with a timeout of 2-3 minutes.
  </Accordion>
</AccordionGroup>

## Related

* [Get Task Status](/linkedin-api/get-task-status) - Poll for task results
* [Fetch Company](/linkedin-api/fetch-company) - Get company profile data
* [Like Post](/linkedin-api/like-post) - Like a post using its activity URN
* [Comment on Post](/linkedin-api/comment-post) - Comment on a post using its activity URN

***

## Learn More

* [LinkedIn API Guide](https://www.outx.ai/blog/linkedin-api-guide)
* [How to Scrape LinkedIn Data Safely](https://www.outx.ai/blog/scrape-data-linkedin)
