> ## 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 Data API - Fetch Company Profile

> Fetch full LinkedIn company page data including description, employee count, industry, followers, and specialties using the OutX LinkedIn Company API.

<script type="application/ld+json">
  {`{
    "@context": "https://schema.org",
    "@type": "WebAPI",
    "name": "OutX LinkedIn Company API",
    "url": "https://api.outx.ai/linkedin-agent/fetch-company",
    "description": "Fetch any LinkedIn company page data including description, employee count, industry, followers, and specialties via API.",
    "documentation": "https://outx.ai/docs/linkedin-api/fetch-company",
    "provider": {
      "@type": "Organization",
      "name": "OutX.ai",
      "url": "https://www.outx.ai"
    }
    }`}
</script>

The Fetch Company endpoint creates an async task to retrieve full LinkedIn company page data. You provide a company slug (the part after `linkedin.com/company/`) and receive a task ID to poll for results.

## Endpoint

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

## 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 part of a LinkedIn company URL. For `https://www.linkedin.com/company/microsoft`, the slug is `microsoft`.
</Tip>

## Response

The endpoint returns immediately with a task ID. The actual company data is 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 fetch 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 company data:

```json theme={null}
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "completed",
    "task_input": {
      "task_type": "agent_company_fetch",
      "company_slug": "microsoft"
    },
    "task_output": {
      "company": {
        "company_urn": "1035",
        "company_slug": "microsoft",
        "company_type": "Public Company",
        "company_name": "Microsoft",
        "company_website_url": "https://www.microsoft.com",
        "company_founded_on": "1975-01-01",
        "company_industry": "Software Development",
        "company_employee_count": "10001+",
        "company_headquarters": "Redmond, Washington, US",
        "company_description": "Every company has a mission. What's ours? To empower every person and every organization on the planet to achieve more.",
        "company_location": "Redmond, Washington",
        "company_postal_code": "98052",
        "company_logo_url": "https://media.licdn.com/dms/image/..."
      }
    }
  }
}
```

## Code Examples

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

  # 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 fetchCompany(companySlug) {
    // Create the task
    const response = await fetch(
      "https://api.outx.ai/linkedin-agent/fetch-company",
      {
        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 company = await fetchCompany("microsoft");
  console.log(company);
  ```

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

  def fetch_company(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",
          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)

  company = fetch_company("microsoft")
  print(company)
  ```
</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 the company response include?">
    The company data includes: `company_name`, `company_urn`, `company_slug`, `company_type`, `company_website_url`, `company_founded_on` (as `"YYYY-01-01"`), `company_industry`, `company_employee_count` (as a string range like `"1001-5000"` or `"10001+"`), `company_headquarters`, `company_description`, `company_location`, `company_postal_code`, and `company_logo_url`. Fields are `null` when not publicly available on the company page.
  </Accordion>

  <Accordion title="What format should the company_slug be in?">
    The `company_slug` is the last segment of the LinkedIn company URL. For `https://www.linkedin.com/company/google`, the slug is `google`. Do not include the full URL or the `/company/` prefix.
  </Accordion>

  <Accordion title="Can I fetch private or unlisted company pages?">
    The API fetches company data that is visible to the LinkedIn account running the Chrome extension. Most public company pages are accessible. Private or restricted pages may return limited data.
  </Accordion>

  <Accordion title="How long does the task take to complete?">
    Most company fetch tasks complete within seconds to a few 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>

  <Accordion title="How is this different from the Company Watchlist in the Intelligence API?">
    The Fetch Company endpoint returns a one-time snapshot of a company's profile data. The [Company Watchlist](/api-reference/watchlist/company/create) in the Intelligence API continuously monitors a company's LinkedIn posts and activity over time, sending you new posts as they are published.
  </Accordion>
</AccordionGroup>

## Related

* [Get Task Status](/linkedin-api/get-task-status) - Poll for task results
* [Fetch Company Posts](/linkedin-api/fetch-company-posts) - Get recent posts from a company page
* [Fetch Profile](/linkedin-api/fetch-profile) - Fetch a person's LinkedIn profile
* [Quick Start](/linkedin-api/quickstart) - End-to-end tutorial

***

## 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)
