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

# GET /company

> Extract legal company name, contact emails, and physical addresses from a website. Costs 5 credits.

## Overview

`/company` scrapes a website to identify the legal entity behind it. It looks for structured data (JSON-LD, schema.org), footer content, contact pages, and other signals to extract:

* **Company name** — legal entity name (e.g. "Stripe, Inc.")
* **Emails** — contact and support email addresses
* **Addresses** — physical locations including street, city, state, ZIP, country

This endpoint uses a hybrid approach: it first attempts a fast static fetch, falling back to headless Chrome only when needed.

## Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.prefetch.io/company?url=https://stripe.com" \
    -H "X-API-Key: $PREFETCH_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(
    "https://api.prefetch.io/company?url=https://stripe.com",
    { headers: { "X-API-Key": process.env.PREFETCH_API_KEY } }
  );
  const { success, data } = await res.json();
  console.log(data.company.name);   // "Stripe, Inc."
  console.log(data.company.emails); // ["support@stripe.com"]
  ```

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

  r = requests.get(
      "https://api.prefetch.io/company",
      params={"url": "https://stripe.com"},
      headers={"X-API-Key": os.environ["PREFETCH_API_KEY"]},
  )
  company = r.json()["data"]["company"]
  print(company["name"])
  print(company["addresses"])
  ```
</CodeGroup>

## Example response

```json theme={null}
{
  "success": true,
  "data": {
    "domain": "stripe.com",
    "url": "https://stripe.com",
    "company": {
      "name": "Stripe, Inc.",
      "emails": [
        "support@stripe.com"
      ],
      "addresses": [
        "354 Oyster Point Blvd, South San Francisco, CA 94080"
      ]
    }
  },
  "meta": {
    "requestId": "b9e1a2f3-4c5d-6e7f-8a9b-0c1d2e3f4a5b",
    "durationMs": 3210
  }
}
```


## OpenAPI

````yaml GET /company
openapi: 3.1.0
info:
  title: Prefetch API
  description: >-
    Extract brand identity, company data, screenshots, and IAB classifications
    from any URL.
  version: 1.0.0
  contact:
    email: support@prefetch.io
servers:
  - url: https://api.prefetch.io
    description: Production
security:
  - apiKey: []
tags:
  - name: Endpoints
    description: Data extraction endpoints. All require authentication and consume credits.
  - name: Health
    description: Health and readiness probes. No authentication required.
paths:
  /company:
    get:
      tags:
        - Endpoints
      summary: Extract company info
      description: >-
        Extracts the legal company name, contact email addresses, and physical
        addresses from a website. **Credit cost: 5.**
      operationId: getCompany
      parameters:
        - $ref: '#/components/parameters/url'
      responses:
        '200':
          description: Company information.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/CompanyData'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - success
                  - data
                  - meta
              example:
                success: true
                data:
                  domain: stripe.com
                  url: https://stripe.com
                  company:
                    name: Stripe, Inc.
                    emails:
                      - support@stripe.com
                    addresses:
                      - 354 Oyster Point Blvd, South San Francisco, CA 94080
                meta:
                  requestId: b9e1a2f3-4c5d-6e7f-8a9b-0c1d2e3f4a5b
                  durationMs: 3210
        '400':
          description: Invalid or missing URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Revoked key, expired key, credit limit, or blocklisted URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: URL hostname could not be resolved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily busy — retry shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '504':
          description: Request timed out.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    url:
      name: url
      in: query
      required: true
      description: >-
        The website URL to process. `https://` is prepended automatically if no
        protocol is provided.
      schema:
        type: string
        example: https://stripe.com
  schemas:
    CompanyData:
      type: object
      properties:
        domain:
          type: string
          description: Normalized domain.
          example: stripe.com
        url:
          type: string
          format: uri
          description: The URL that was scraped.
          example: https://stripe.com
        company:
          $ref: '#/components/schemas/CompanyInfo'
      required:
        - domain
        - url
        - company
    Meta:
      type: object
      properties:
        requestId:
          type: string
          format: uuid
          description: Unique identifier for this request.
          example: a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d
        durationMs:
          type: integer
          nullable: true
          description: Time taken to process the request in milliseconds.
          example: 1842
      required:
        - requestId
        - durationMs
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
          description: Human-readable error message.
          example: Credit limit exceeded
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - success
        - error
        - meta
    CompanyInfo:
      type: object
      properties:
        name:
          type: string
          nullable: true
          description: Legal entity name of the company.
          example: Stripe, Inc.
        emails:
          type: array
          items:
            type: string
            format: email
          description: Contact email addresses found on the site.
          example:
            - support@stripe.com
        addresses:
          type: array
          items:
            type: string
          description: Physical addresses found on the site.
          example:
            - 354 Oyster Point Blvd, South San Francisco, CA 94080
      required:
        - name
        - emails
        - addresses
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Prefetch API key. Obtain one from the dashboard.

````