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

# Get Company

> Get detailed information about a company / organization

## Endpoint

```
GET /api/v1/company
```

## Authentication

Include your API key in the request header:

```bash theme={null}
X-API-Key: your-api-key-here
```

## Parameters

<ParamField query="companyUrlOrUrn" type="string" required>
  The company / organization to fetch. Accepts any of:

  * **Company URL**. Example: `https://www.linkedin.com/company/doctolib` (a trailing slash makes no difference). School and showcase page URLs work too.
  * **Public identifier (slug)**, also fine. Example: `doctolib`
  * **Company URN**. Example: `urn:li:fsd_company:4999584`

  The slug is the last path segment of a company URL (`linkedin.com/company/<slug>`). Pass just the slug, not the `/company/` prefix.

  Member profile inputs (a `/in/<slug>` URL or a `urn:li:fsd_profile:…`) are rejected with `INVALID_PARAMETER` — use [Get Profile](/api-reference/endpoint/get-profile) for people.
</ParamField>

## Response

<ResponseField name="company" type="object">
  Company / organization information

  <Expandable title="Company object">
    <ResponseField name="id" type="string">
      Company URN (unique identifier), e.g. "urn:li:fsd\_company:4999584"
    </ResponseField>

    <ResponseField name="companyId" type="string">
      Numeric company id as a string, e.g. "4999584"
    </ResponseField>

    <ResponseField name="name" type="string">
      Company name, e.g. "Doctolib"
    </ResponseField>

    <ResponseField name="publicIdentifier" type="string">
      Public identifier (slug), e.g. "doctolib"
    </ResponseField>

    <ResponseField name="url" type="string">
      Canonical company page URL
    </ResponseField>

    <ResponseField name="websiteUrl" type="string">
      The company's own website (optional)
    </ResponseField>

    <ResponseField name="domain" type="string">
      Website domain, derived from `websiteUrl` with any leading `www.` removed, e.g. "doctolib.com" (optional)
    </ResponseField>

    <ResponseField name="industry" type="string">
      Primary industry, e.g. "Computer Software" (optional)
    </ResponseField>

    <ResponseField name="employeeCount" type="number">
      Number of employees on the platform (optional)
    </ResponseField>

    <ResponseField name="employeeCountRange" type="object">
      Employee count bracket (optional)

      <Expandable title="EmployeeCountRange object">
        <ResponseField name="start" type="number">
          Lower bound, e.g. 1001
        </ResponseField>

        <ResponseField name="end" type="number">
          Upper bound, e.g. 5000 (absent for open-ended brackets like "10,001+")
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="foundedOn" type="object">
      Founding date (optional; only `year` is guaranteed when present)

      <Expandable title="FoundedOn object">
        <ResponseField name="year" type="number">
          Year, e.g. 2010
        </ResponseField>

        <ResponseField name="month" type="number">
          Month (1-12), when available
        </ResponseField>

        <ResponseField name="day" type="number">
          Day of month, when available
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="headquarter" type="object">
      Headquarters address (optional)

      <Expandable title="Address object">
        <ResponseField name="line1" type="string">
          Street address line 1
        </ResponseField>

        <ResponseField name="line2" type="string">
          Street address line 2
        </ResponseField>

        <ResponseField name="city" type="string">
          City, e.g. "Levallois-Perret"
        </ResponseField>

        <ResponseField name="geographicArea" type="string">
          State / region, e.g. "Île-de-France"
        </ResponseField>

        <ResponseField name="postalCode" type="string">
          Postal code
        </ResponseField>

        <ResponseField name="country" type="string">
          ISO country code, e.g. "FR"
        </ResponseField>

        <ResponseField name="description" type="string">
          Office label, e.g. "Headquarters"
        </ResponseField>

        <ResponseField name="headquarter" type="boolean">
          `true` for the headquarters entry
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="locations" type="array">
      All known office locations (optional). Each entry has the same shape as `headquarter`.
    </ResponseField>

    <ResponseField name="followerCount" type="number">
      Number of followers (optional)
    </ResponseField>

    <ResponseField name="logoUrl" type="string">
      Company logo image URL
    </ResponseField>

    <ResponseField name="coverImageUrl" type="string">
      Company cover/background image URL (optional)
    </ResponseField>

    <ResponseField name="description" type="string">
      Company "About" description (optional)
    </ResponseField>

    <ResponseField name="specialities" type="array">
      Specialities / focus areas (string array, optional)
    </ResponseField>

    <ResponseField name="phone" type="string">
      Public contact phone number (optional)
    </ResponseField>

    <ResponseField name="tagline" type="string">
      Company tagline (optional)
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.fetchin.io/api/v1/company?companyUrlOrUrn=https://www.linkedin.com/company/doctolib" \
    -H "X-API-Key: your-api-key-here"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.fetchin.io/api/v1/company?companyUrlOrUrn=https://www.linkedin.com/company/doctolib',
    {
      headers: {
        'X-API-Key': 'your-api-key-here'
      }
    }
  );

  const company = await response.json();
  console.log(company);
  ```

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

  headers = {
      'X-API-Key': 'your-api-key-here'
  }

  params = {
      'companyUrlOrUrn': 'https://www.linkedin.com/company/doctolib'
  }

  response = requests.get(
      'https://api.fetchin.io/api/v1/company',
      headers=headers,
      params=params
  )

  company = response.json()
  print(company)
  ```

  ```php PHP theme={null}
  <?php

  $apiKey = 'your-api-key-here';
  $companyUrl = 'https://www.linkedin.com/company/doctolib';

  $url = "https://api.fetchin.io/api/v1/company?companyUrlOrUrn=" . urlencode($companyUrl);

  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'X-API-Key: ' . $apiKey
  ]);

  $response = curl_exec($ch);
  $company = json_decode($response, true);

  curl_close($ch);
  print_r($company);
  ?>
  ```
</CodeGroup>

## Example Response

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "id": "urn:li:fsd_company:4999584",
    "companyId": "4999584",
    "name": "Doctolib",
    "publicIdentifier": "doctolib",
    "url": "https://www.linkedin.com/company/doctolib/",
    "websiteUrl": "https://careers.doctolib.com/",
    "domain": "careers.doctolib.com",
    "industry": "Computer Software",
    "employeeCount": 3714,
    "employeeCountRange": { "start": 1001, "end": 5000 },
    "headquarter": {
      "line1": "54, Quai Charles Pasqua",
      "city": "Levallois-Perret",
      "geographicArea": "Île-de-France",
      "postalCode": "92300",
      "country": "FR",
      "description": "Siège social",
      "headquarter": true
    },
    "locations": [
      {
        "city": "Levallois-Perret",
        "geographicArea": "Île-de-France",
        "country": "FR",
        "headquarter": true
      }
    ],
    "followerCount": 323490,
    "logoUrl": "https://media.licdn.com/dms/image/...",
    "coverImageUrl": "https://media.licdn.com/dms/image/...",
    "description": "We're a B Corp company committed to build together the healthcare we all dream of.",
    "specialities": ["Santé", "e-health", "telehealth", "online appointments"]
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": "Missing companyUrlOrUrn parameter",
    "code": "MISSING_PARAMETER"
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": "companyUrlOrUrn must reference a company, not a member profile",
    "code": "INVALID_PARAMETER"
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "error": "Invalid API key",
    "code": "INVALID_API_KEY"
  }
  ```

  ```json 404 Not Found theme={null}
  {
    "error": "Unable to find company data from slug",
    "code": "COMPANY_NOT_FOUND"
  }
  ```

  ```json 429 Too Many Requests theme={null}
  {
    "error": "Quota exceeded. Upgrade your plan or wait for renewal.",
    "code": "QUOTA_EXHAUSTED"
  }
  ```

  ```json 500 Internal Server Error theme={null}
  {
    "error": "Internal server error",
    "code": "INTERNAL_ERROR"
  }
  ```

  ```json 503 Service Unavailable theme={null}
  {
    "error": "Service temporarily unable to serve this request. Please retry.",
    "code": "SERVICE_UNAVAILABLE"
  }
  ```
</ResponseExample>

## Errors

See [Error Handling](/concepts/error-handling) for the full list of error codes and recommended handling.

* `400` `MISSING_PARAMETER` / `INVALID_PARAMETER` / `INVALID_URN`
* `401` `INVALID_API_KEY`
* `404` `COMPANY_NOT_FOUND`
* `429` `RATE_LIMITED` / `QUOTA_EXHAUSTED`
* `500` `INTERNAL_ERROR`
* `503` `SERVICE_UNAVAILABLE`

## Notes

<Info>
  This endpoint consumes 1 credit from your monthly quota. Failed requests (errors) do not count against your quota.
</Info>

<Warning>
  Company data is fetched in real-time from professional data sources. Response times may vary. A `503 SERVICE_UNAVAILABLE` is safe to retry after a short delay.
</Warning>

<Tip>
  Most fields beyond `name`, `companyId`, and `publicIdentifier` are optional — a company page may simply not list a phone number, tagline, or founding date. Always guard for missing keys.
</Tip>

## Use Cases

<CardGroup cols={2}>
  <Card title="Account enrichment" icon="building">
    Enrich your CRM with firmographic data: size, industry, HQ, website
  </Card>

  <Card title="Lead scoring" icon="chart-line">
    Segment and score accounts by employee count, industry, and location
  </Card>

  <Card title="Market research" icon="magnifying-glass">
    Analyze competitors and market segments by company attributes
  </Card>

  <Card title="Data completion" icon="table-cells">
    Fill gaps in vendor and partner records from a professional profile URL
  </Card>
</CardGroup>


## OpenAPI

````yaml GET /api/v1/company
openapi: 3.1.0
info:
  title: Fetchin API
  version: 1.0.0
  description: Public B2B data API for fetching posts and profile information
servers:
  - url: https://api.fetchin.io
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /api/v1/company:
    get:
      summary: Get company
      description: >-
        Get detailed information about a company / organization. Consumes 1
        credit.
      parameters:
        - name: companyUrlOrUrn
          in: query
          required: true
          description: >-
            The company / organization to fetch. Accepts a company page URL
            (example `https://www.linkedin.com/company/doctolib`; school and
            showcase URLs work too), a public identifier/slug (example
            `doctolib`), or a company URN (example
            `urn:li:fsd_company:4999584`). Member profile inputs (a `/in/<slug>`
            URL or a `urn:li:fsd_profile:…`) are rejected with
            INVALID_PARAMETER.
          schema:
            type: string
          example: https://www.linkedin.com/company/doctolib
      responses:
        '200':
          description: Successfully fetched company
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Company URN (unique identifier)
                    example: urn:li:fsd_company:4999584
                  companyId:
                    type: string
                    description: Numeric company id as a string
                    example: '4999584'
                  name:
                    type: string
                    example: Doctolib
                  publicIdentifier:
                    type: string
                    description: Public identifier (slug)
                    example: doctolib
                  url:
                    type: string
                    description: Canonical company page URL
                    example: https://www.linkedin.com/company/doctolib/
                  websiteUrl:
                    type: string
                    description: The company's own website
                  domain:
                    type: string
                    description: Website domain, minus a leading www.
                    example: doctolib.com
                  industry:
                    type: string
                    example: Computer Software
                  employeeCount:
                    type: number
                    description: Number of employees on the platform
                  employeeCountRange:
                    type: object
                    properties:
                      start:
                        type: number
                      end:
                        type: number
                        description: Absent for open-ended brackets
                  foundedOn:
                    type: object
                    properties:
                      year:
                        type: number
                      month:
                        type: number
                      day:
                        type: number
                  headquarter:
                    type: object
                    properties:
                      line1:
                        type: string
                      line2:
                        type: string
                      city:
                        type: string
                        example: Levallois-Perret
                      geographicArea:
                        type: string
                        description: State / region
                        example: Île-de-France
                      postalCode:
                        type: string
                      country:
                        type: string
                        description: ISO country code
                        example: FR
                      description:
                        type: string
                        description: Office label, e.g. "Headquarters"
                      headquarter:
                        type: boolean
                        description: true for the headquarters entry
                  locations:
                    type: array
                    items:
                      type: object
                      properties:
                        line1:
                          type: string
                        line2:
                          type: string
                        city:
                          type: string
                          example: Levallois-Perret
                        geographicArea:
                          type: string
                          description: State / region
                          example: Île-de-France
                        postalCode:
                          type: string
                        country:
                          type: string
                          description: ISO country code
                          example: FR
                        description:
                          type: string
                          description: Office label, e.g. "Headquarters"
                        headquarter:
                          type: boolean
                          description: true for the headquarters entry
                  followerCount:
                    type: number
                  logoUrl:
                    type: string
                  coverImageUrl:
                    type: string
                    description: Cover/background image URL
                  description:
                    type: string
                  specialities:
                    type: array
                    items:
                      type: string
                  phone:
                    type: string
                  tagline:
                    type: string
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
components:
  responses:
    BadRequest:
      description: Bad request - a required parameter is missing or a value is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingParameter:
              value:
                error: Missing profileUrlOrUrn parameter
                code: MISSING_PARAMETER
            invalidParameter:
              value:
                error: limit must be a number between 1 and 100
                code: INVALID_PARAMETER
            invalidUrn:
              value:
                error: 'Invalid URN format: foo'
                code: INVALID_URN
    Unauthorized:
      description: Unauthorized - the X-API-Key header is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missingApiKey:
              value:
                error: Missing API key. Include X-API-Key header.
                code: UNAUTHENTICATED
            invalidApiKey:
              value:
                error: Invalid API key
                code: INVALID_API_KEY
    NotFound:
      description: >-
        Not found - the request was served successfully but the requested
        professional entity does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            profileNotFound:
              value:
                error: LinkedIn profile not found
                code: PROFILE_NOT_FOUND
            postNotFound:
              value:
                error: Unable to find post from url
                code: POST_NOT_FOUND
            companyNotFound:
              value:
                error: Unable to find company slug from urn
                code: COMPANY_NOT_FOUND
    TooManyRequests:
      description: >-
        Too many requests - either your per-second rate limit (RATE_LIMITED) or
        your monthly credit quota (QUOTA_EXHAUSTED) was exceeded. Branch on
        `code` to tell them apart.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            rateLimited:
              value:
                error: Rate limit exceeded. Try again later.
                code: RATE_LIMITED
            quotaExhausted:
              value:
                error: Quota exceeded. Upgrade your plan or wait for renewal.
                code: QUOTA_EXHAUSTED
    InternalError:
      description: >-
        Internal server error - an unexpected error occurred in our API. Safe to
        retry; contact support if it persists.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            internalError:
              value:
                error: Internal server error
                code: INTERNAL_ERROR
    ServiceUnavailable:
      description: >-
        Service unavailable - our API is temporarily unable to serve this
        request (capacity exhausted or overloaded). This is on our side, not
        yours and not an upstream service outage. Retry with backoff, honoring
        the Retry-After header.
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            serviceUnavailable:
              value:
                error: >-
                  Service temporarily unable to serve this request. Please
                  retry.
                code: SERVICE_UNAVAILABLE
  schemas:
    Error:
      type: object
      required:
        - error
        - code
      properties:
        error:
          type: string
          description: >-
            Human-readable description of what went wrong. For display/logging;
            do not branch on this string.
        code:
          type: string
          enum:
            - MISSING_PARAMETER
            - INVALID_PARAMETER
            - INVALID_URN
            - UNAUTHENTICATED
            - INVALID_API_KEY
            - FORBIDDEN
            - NOT_FOUND
            - PROFILE_NOT_FOUND
            - POST_NOT_FOUND
            - COMPANY_NOT_FOUND
            - RATE_LIMITED
            - QUOTA_EXHAUSTED
            - INTERNAL_ERROR
            - UPSTREAM_ERROR
            - SERVICE_UNAVAILABLE
            - UPSTREAM_TIMEOUT
          description: >-
            Stable, machine-readable error code. Branch your integration on this
            value, not on the HTTP status alone or the message text.
        details:
          type: object
          additionalProperties: true
          description: Optional structured context (e.g. creditsNeeded on quota errors).
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````