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

> Enrich a URL with brand data, company info, and IAB classification in a single request. Costs 20 credits.

## Overview

`/enrich` is the most comprehensive endpoint. It runs brand extraction, company info extraction, and website classification **in parallel** and returns all results in a single response.

This is equivalent to calling `/brand` + `/company` + `/classify` together, but more efficient because the page is only loaded once.

**Use `/enrich` when you want a complete profile of a domain.**

## Cost comparison

| Approach                            | Credits | Requests |
| ----------------------------------- | ------- | -------- |
| `/enrich`                           | 20      | 1        |
| `/brand` + `/company` + `/classify` | 20      | 3        |

## Example request

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

  ```bash With screenshot colors and CSS theme={null}
  curl "https://api.prefetch.io/enrich?url=https://stripe.com&screenshotColors=6&css=true" \
    -H "X-API-Key: $PREFETCH_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(
    "https://api.prefetch.io/enrich?url=https://stripe.com&screenshotColors=6",
    { headers: { "X-API-Key": process.env.PREFETCH_API_KEY } }
  );
  const { success, data } = await res.json();

  // Access all three data sets
  console.log(data.colors.brand_colors[0].hex);            // "#635BFF"
  console.log(data.company.name);                           // "Stripe, Inc."
  console.log(data.classification.category);                // "Personal Finance"
  console.log(data.classification.tagline_description);     // "Payment infrastructure for the internet."
  ```

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

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

## Example response

```json theme={null}
{
  "success": true,
  "data": {
    "domain": "stripe.com",
    "url": "https://stripe.com",
    "colors": {
      "brand_colors": [
        { "hex": "#635BFF", "name": "blueviolet" },
        { "hex": "#00D4FF", "name": "cyan" }
      ],
      "screenshot_colors": [
        { "hex": "#FFFFFF", "name": "white" },
        { "hex": "#0A2540", "name": "darkblue" }
      ]
    },
    "fonts": {
      "families": ["Sohne", "Inter"]
    },
    "logos": {
      "primary": {
        "url": "https://assets.prefetch.io/logos/stripe-logo.svg",
        "width": null,
        "height": null
      },
      "secondary": [],
      "favicon_url": "https://stripe.com/favicon.ico",
      "icon_url": null,
      "apple_touch_icon": null
    },
    "images": {
      "og_image": "https://stripe.com/img/v3/home/social.png",
      "twitter_image": "https://stripe.com/img/v3/home/social.png",
      "screenshot_url": "https://assets.prefetch.io/screenshots/stripe-1440x900.jpg"
    },
    "social_links": {
      "twitter": "https://twitter.com/stripe",
      "linkedin": "https://linkedin.com/company/stripe"
    },
    "company": {
      "name": "Stripe, Inc.",
      "emails": ["support@stripe.com"],
      "addresses": ["354 Oyster Point Blvd, South San Francisco, CA 94080"]
    },
    "classification": {
      "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": "e5f6a7b8-c9d0-1e2f-3a4b-5c6d7e8f9a0b",
    "durationMs": 5280
  }
}
```

## All parameters

`/enrich` accepts the same parameters as `/brand` for controlling color extraction and screenshot settings:

| Parameter            | Default  | Description                                          |
| -------------------- | -------- | ---------------------------------------------------- |
| `url`                | required | Website URL to enrich                                |
| `screenshotColors`   | —        | Extract N dominant screenshot colors (2–12)          |
| `css`                | `false`  | Extract colors from CSS source                       |
| `html`               | `false`  | Extract colors from HTML source                      |
| `javascript`         | `false`  | Extract colors from JavaScript source                |
| `screenshotWidth`    | `1440`   | Viewport width (320–3000)                            |
| `screenshotHeight`   | `900`    | Viewport height (320–3000)                           |
| `screenshotFormat`   | `jpeg`   | Screenshot format: `jpeg`, `png`, `pdf`              |
| `screenshotFullPage` | `false`  | Capture full scrollable height                       |
| `disableAdblocker`   | `false`  | Disable the built-in adblocker                       |
| `filterAchromatic`   | `false`  | Exclude near-white, near-black, and greyscale colors |


## OpenAPI

````yaml GET /enrich
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:
  /enrich:
    get:
      tags:
        - Endpoints
      summary: Enrich a URL
      description: >-
        Runs brand extraction, company info extraction, and website
        classification in parallel and returns all results in a single response.
        **Credit cost: 20.**


        This is the most comprehensive endpoint — equivalent to calling
        `/brand`, `/company`, and `/classify` together but more efficient
        because the page is only loaded once.
      operationId: enrichUrl
      parameters:
        - $ref: '#/components/parameters/url'
        - name: screenshotColors
          in: query
          required: false
          description: 'Extract N dominant colors from the page screenshot. Range: 2–12.'
          schema:
            type: integer
            minimum: 2
            maximum: 12
        - name: css
          in: query
          required: false
          description: Extract colors from linked CSS files. Pass `true` to enable.
          schema:
            type: boolean
            default: false
        - name: html
          in: query
          required: false
          description: Extract colors from inline HTML. Pass `true` to enable.
          schema:
            type: boolean
            default: false
        - name: javascript
          in: query
          required: false
          description: Extract colors from linked JS files. Pass `true` to enable.
          schema:
            type: boolean
            default: false
        - name: screenshotWidth
          in: query
          required: false
          description: 'Viewport width in pixels. Range: 320–3000. Default: 1440.'
          schema:
            type: integer
            minimum: 320
            maximum: 3000
            default: 1440
        - name: screenshotHeight
          in: query
          required: false
          description: 'Viewport height in pixels. Range: 320–3000. Default: 900.'
          schema:
            type: integer
            minimum: 320
            maximum: 3000
            default: 900
        - name: screenshotFormat
          in: query
          required: false
          description: 'Screenshot format. Default: `jpeg`.'
          schema:
            type: string
            enum:
              - jpeg
              - png
              - pdf
            default: jpeg
        - name: screenshotFullPage
          in: query
          required: false
          description: Capture the full scrollable page. Pass `true` to enable.
          schema:
            type: boolean
            default: false
        - name: disableAdblocker
          in: query
          required: false
          description: Disable the built-in adblocker. Pass `true` to enable.
          schema:
            type: boolean
            default: false
        - name: filterAchromatic
          in: query
          required: false
          description: >-
            Exclude near-white, near-black, and greyscale colors from results.
            Pass `true` to enable.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Enrichment result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/EnrichData'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - success
                  - data
                  - meta
        '400':
          description: Invalid URL or parameters.
          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:
    EnrichData:
      type: object
      description: Combined output from brand, company, and classify extraction.
      properties:
        domain:
          type: string
          example: stripe.com
        url:
          type: string
          format: uri
          example: https://stripe.com
        colors:
          $ref: '#/components/schemas/ColorsBlock'
        fonts:
          $ref: '#/components/schemas/BrandFonts'
        logos:
          $ref: '#/components/schemas/LogosBlock'
        images:
          $ref: '#/components/schemas/ImagesBlock'
        social_links:
          $ref: '#/components/schemas/SocialLinks'
        company:
          $ref: '#/components/schemas/CompanyInfo'
        classification:
          $ref: '#/components/schemas/ClassifyData'
      required:
        - domain
        - url
        - colors
        - fonts
        - logos
        - images
        - social_links
        - company
        - classification
    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
    ColorsBlock:
      type: object
      properties:
        brand_colors:
          type: array
          items:
            $ref: '#/components/schemas/ColorItem'
          description: Colors extracted from the logo and brand assets.
        logo_colors:
          type: array
          items:
            $ref: '#/components/schemas/ColorItem'
          description: Colors extracted from the primary logo.
        screenshot_colors:
          type: array
          items:
            $ref: '#/components/schemas/ColorItem'
          description: >-
            Dominant colors extracted from the page screenshot. Present only
            when `screenshotColors` parameter is provided.
        css_colors:
          type: array
          items:
            $ref: '#/components/schemas/ColorItem'
          description: Colors extracted from CSS stylesheets. Present only when `css=true`.
        html_colors:
          type: array
          items:
            $ref: '#/components/schemas/ColorItem'
          description: >-
            Colors extracted from HTML attributes. Present only when
            `html=true`.
        javascript_colors:
          type: array
          items:
            $ref: '#/components/schemas/ColorItem'
          description: >-
            Colors extracted from JavaScript source. Present only when
            `javascript=true`.
      required:
        - brand_colors
    BrandFonts:
      type: object
      properties:
        families:
          type: array
          items:
            type: string
          description: Font family names detected on the page.
          example:
            - Inter
            - Roboto
      required:
        - families
    LogosBlock:
      type: object
      properties:
        primary:
          $ref: '#/components/schemas/LogoObject'
          description: Best candidate for the primary logo.
        secondary:
          type: array
          items:
            $ref: '#/components/schemas/LogoObject'
          description: Other logo candidates found on the page.
        favicon_url:
          type: string
          format: uri
          nullable: true
          description: URL to the site favicon.
          example: https://stripe.com/favicon.ico
        icon_url:
          type: string
          format: uri
          nullable: true
          description: URL to the site icon.
        apple_touch_icon:
          type: string
          format: uri
          nullable: true
          description: URL to the Apple Touch Icon.
      required:
        - primary
        - secondary
        - favicon_url
        - icon_url
        - apple_touch_icon
    ImagesBlock:
      type: object
      properties:
        og_image:
          type: string
          format: uri
          nullable: true
          description: OpenGraph image URL.
        twitter_image:
          type: string
          format: uri
          nullable: true
          description: Twitter card image URL.
        screenshot_url:
          type: string
          format: uri
          nullable: true
          description: URL to the page screenshot stored in cloud storage.
      required:
        - og_image
        - twitter_image
        - screenshot_url
    SocialLinks:
      type: object
      additionalProperties:
        type: string
      description: Social media profile URLs keyed by platform name.
      example:
        twitter: https://twitter.com/stripe
        linkedin: https://linkedin.com/company/stripe
    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
    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
    ColorItem:
      type: object
      properties:
        hex:
          type: string
          description: Hex color code.
          example: '#18E299'
        name:
          type: string
          description: Closest named CSS color.
          example: mediumspringgreen
      required:
        - hex
        - name
    LogoObject:
      type: object
      nullable: true
      properties:
        url:
          type: string
          format: uri
          nullable: true
          description: Public URL to the logo asset.
          example: https://cdn.example.com/logo.svg
        width:
          type: number
          nullable: true
          description: Intrinsic width of the logo in pixels.
        height:
          type: number
          nullable: true
          description: Intrinsic height of the logo in pixels.
      required:
        - url
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Prefetch API key. Obtain one from the dashboard.

````