> ## 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 /classify

> Classify a website into an IAB content taxonomy category with descriptions, stock tickers, and ISIN codes. Costs 5 credits.

## Overview

`/classify` analyzes a website's content and assigns it an [IAB Content Taxonomy](https://www.iab.com/guidelines/content-taxonomy/) category. It returns:

* **IAB category** — parent category (e.g. "Technology & Computing")
* **IAB subcategory** — more specific classification (e.g. "Software")
* **Description** — a short summary of what the site does
* **Tagline description** — one-line tagline
* **Long description** — extended multi-sentence description
* **Stock tickers** — associated ticker symbols if the company is publicly traded
* **ISINs** — associated ISIN security codes

This endpoint uses a hybrid approach: it first attempts a fast static fetch, falling back to headless Chrome only if the page requires JavaScript to render meaningful content.

## Example request

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

  ```javascript Node.js theme={null}
  const res = await fetch(
    "https://api.prefetch.io/classify?url=https://stripe.com",
    { headers: { "X-API-Key": process.env.PREFETCH_API_KEY } }
  );
  const { success, data } = await res.json();
  console.log(`${data.category} > ${data.subcategory}`);
  // "Personal Finance > Financial Planning"
  ```

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

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

## Example response

```json theme={null}
{
  "success": true,
  "data": {
    "url": "https://stripe.com",
    "iab_id": "IAB13-11",
    "iab_parent_id": "IAB13",
    "category": "Personal Finance",
    "subcategory": "Financial Planning",
    "description": "Stripe provides payment processing infrastructure for internet businesses.",
    "tagline_description": "Payment infrastructure for the internet.",
    "long_description": "Stripe provides payment processing infrastructure for internet businesses, enabling companies to accept payments, manage subscriptions, and handle global commerce operations.",
    "stock_tickers": [],
    "isins": []
  },
  "meta": {
    "requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
    "durationMs": 1842
  }
}
```

## IAB taxonomy

The `iab_id` field follows the IAB Content Taxonomy 3.0 format:

* `IAB13` — parent category ID
* `IAB13-11` — subcategory ID (parent ID + hyphen + number)

Common parent categories include `IAB19` (Technology & Computing), `IAB3` (Business), `IAB4` (Careers), and `IAB13` (Personal Finance).


## OpenAPI

````yaml GET /classify
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:
  /classify:
    get:
      tags:
        - Endpoints
      summary: Classify a website
      description: >-
        Classifies a website into an IAB content taxonomy category with
        human-readable descriptions, stock tickers, and ISIN codes. **Credit
        cost: 5.**
      operationId: classifyUrl
      parameters:
        - $ref: '#/components/parameters/url'
      responses:
        '200':
          description: Classification result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/ClassifyData'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - success
                  - data
                  - meta
              example:
                success: true
                data:
                  url: https://stripe.com
                  iab_id: IAB13-11
                  iab_parent_id: IAB13
                  category: Personal Finance
                  subcategory: Financial Planning
                  description: >-
                    Stripe provides payment processing infrastructure for
                    internet businesses.
                  tagline_description: Payment infrastructure for the internet.
                  long_description: >-
                    Stripe provides payment processing infrastructure for
                    internet businesses, enabling companies to accept payments,
                    manage subscriptions, and handle global commerce operations.
                  stock_tickers: []
                  isins: []
                meta:
                  requestId: a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d
                  durationMs: 1842
        '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:
    ClassifyData:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: The URL that was classified.
          example: https://stripe.com
        iab_id:
          type: string
          description: IAB subcategory ID.
          example: IAB13-11
        iab_parent_id:
          type: string
          nullable: true
          description: IAB parent category ID.
          example: IAB13
        category:
          type: string
          description: IAB parent category name.
          example: Personal Finance
        subcategory:
          type: string
          nullable: true
          description: IAB subcategory name.
          example: Financial Planning
        description:
          type: string
          description: Short human-readable description of the website.
        tagline_description:
          type: string
          description: One-line tagline description.
        long_description:
          type: string
          description: Extended multi-sentence description of the website.
        stock_tickers:
          type: array
          items:
            type: string
          description: >-
            Stock ticker symbols associated with the company, if publicly
            traded.
        isins:
          type: array
          items:
            type: string
          description: ISIN codes associated with the company's securities.
      required:
        - url
        - iab_id
        - iab_parent_id
        - category
        - subcategory
        - description
    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
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Prefetch API key. Obtain one from the dashboard.

````