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

> Colors, logos, fonts, images and social links for any website. 10 credits.

Returns a site's brand assets under `data.brand`. Parameters are camelCase, like `screenshotColors`.

**10 credits.** Failed requests are never charged.

> [card] [Guide: Brand](https://docs.prefetch.io/company-data/brand.md)
>
> Every color option, design tokens, the response fields and examples.


## OpenAPI

````yaml GET /brand
openapi: 3.1.0
info:
  title: Prefetch API
  description: >-
    Extract brand identity, company data, screenshots, IAB classifications, and
    clean page content 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:
  /brand:
    get:
      tags:
        - Endpoints
      summary: Extract brand assets
      description: >-
        Extracts brand colors, logos, fonts, images, and social media links from
        a website. A screenshot is always captured. **Credit cost: 10.**
      operationId: getBrand
      parameters:
        - $ref: '#/components/parameters/url'
        - name: screenshotColors
          in: query
          required: false
          description: >-
            Extract N dominant colors from the page screenshot. Range: 2–12.
            Omit to skip screenshot color extraction.
          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 (useful for
            sites that detect ad blockers).
          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
        - name: designTokens
          in: query
          required: false
          description: >-
            Add `brand.design_tokens`: the site's colors by role (primary,
            background, text, heading, link), its heading and body type, and its
            button and input styles, read from the rendered page. Pass `true` to
            enable. Requests with this set are never answered from curated data.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Brand extraction result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/BrandData'
                  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:
    BrandData:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: The URL that was scraped.
          example: https://stripe.com
        domain:
          type: string
          description: Normalized domain extracted from the URL.
          example: stripe.com
        brand:
          $ref: '#/components/schemas/BrandBlock'
      required:
        - url
        - domain
        - brand
    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
          description: >-
            Always false. Absent, like `meta`, on authentication and rate-limit
            errors, which are answered before a request is processed.
        error:
          type: string
          description: >-
            Human-readable error message. The wording can change: branch on
            `error_code`.
          example: Credit limit exceeded
        error_code:
          type: string
          enum:
            - INVALID_REQUEST
            - PAYLOAD_TOO_LARGE
            - NOT_FOUND
            - CONFLICT
            - UNAUTHORIZED
            - FORBIDDEN
            - CREDITS_EXHAUSTED
            - RATE_LIMITED
            - CONCURRENCY_LIMITED
            - URL_BLOCKED
            - URL_NOT_PERMITTED
            - DNS_RESOLUTION_FAILED
            - TARGET_BLOCKED
            - TARGET_CONNECTION_FAILED
            - TARGET_TIMEOUT
            - TARGET_SSL_ERROR
            - TARGET_SERVER_ERROR
            - TARGET_CLIENT_ERROR
            - TARGET_NOT_A_PAGE
            - NO_LINKS_FOUND
            - TARGET_UNLOADABLE
            - RESEARCH_INCONCLUSIVE
            - TIMEOUT
            - SERVICE_BUSY
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
          description: >-
            What went wrong, for machines. Stable: a code keeps its meaning once
            published. See [Error handling](/concepts/errors).
          example: CREDITS_EXHAUSTED
        retryable:
          type: boolean
          description: >-
            Whether the same request can succeed if sent again after a short
            wait (honour `Retry-After` when present). False for problems with
            the request or the target.
          example: false
        retryAfterSeconds:
          type: integer
          description: 'On `RATE_LIMITED`: seconds until a request will be accepted.'
        limit:
          type: integer
          description: >-
            On `CONCURRENCY_LIMITED`: how many requests this key may have in
            flight.
        meta:
          $ref: '#/components/schemas/Meta'
      required:
        - error
        - error_code
        - retryable
    BrandBlock:
      type: object
      description: Brand identity extracted from the page.
      properties:
        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'
        design_tokens:
          $ref: '#/components/schemas/DesignTokens'
      required:
        - colors
        - fonts
        - logos
        - images
        - social_links
    ColorsBlock:
      type: object
      properties:
        brand_colors:
          type: array
          items:
            $ref: '#/components/schemas/ColorItem'
          description: >-
            The brand palette, built from the logo and brand assets. Always
            present.
        code_colors:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/CodeColorItem'
          description: >-
            Colors scraped from the page's code, keyed by nearest named color.
            Present only when `css=true`, `html=true`, or `javascript=true`.
            Sources are merged into one map, not split per source.
          example:
            blueviolet:
              - color: '#635bff'
                group: blueviolet
                distance: 0
                name: blueviolet-100
        screenshot_colors:
          type: array
          items:
            $ref: '#/components/schemas/ColorItem'
          description: >-
            Dominant colors sampled from the screenshot. Present only when
            `screenshotColors=N` is passed.
        roles:
          type: object
          properties:
            primary:
              type: string
              nullable: true
            secondary:
              type: string
              nullable: true
            background:
              type: string
              nullable: true
            text:
              type: string
              nullable: true
            link:
              type: string
              nullable: true
          required:
            - primary
            - secondary
            - background
            - text
            - link
          description: >-
            The role each color plays on the page, read from its rendered
            styles: the primary and secondary button fills, the page background,
            body text and links. Hex, or null where the page gives no clear
            answer.
          example:
            primary: '#635BFF'
            secondary: '#0A2540'
            background: '#FFFFFF'
            text: '#425466'
            link: '#635BFF'
      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.
        assets:
          type: array
          items:
            $ref: '#/components/schemas/BrandAssetItem'
          description: Additional brand imagery found on the site and its social profiles.
        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
    DesignTokens:
      type: object
      description: >-
        The site's design system by role, read from the rendered page. Present
        only when the request sets `designTokens=true`. Best effort: a field the
        page gives no reliable answer for is `null`.
      properties:
        color_scheme:
          type: string
          enum:
            - light
            - dark
          nullable: true
          description: Whether the page background is light or dark.
          example: light
        colors:
          type: object
          properties:
            primary:
              type: string
              nullable: true
              description: >-
                The main action color: the fill of the most prominent button, or
                a colored link when no button is filled.
              example: '#533AFD'
            secondary:
              type: string
              nullable: true
              description: >-
                The fill of the next most prominent button, when it is a
                distinct color.
            background:
              type: string
              nullable: true
              description: The page background.
              example: '#FFFFFF'
            text:
              type: string
              nullable: true
              description: Body text.
              example: '#50617A'
            heading:
              type: string
              nullable: true
              description: The color most headings share.
              example: '#061B31'
            link:
              type: string
              nullable: true
              description: The most common color of in-content links.
              example: '#533AFD'
        typography:
          type: object
          properties:
            body:
              type: object
              properties:
                font_family:
                  type: string
                  nullable: true
                  description: The first family in the stack.
                  example: sohne-var
                font_stack:
                  type: array
                  items:
                    type: string
                  description: The full `font-family` list, in order.
                  example:
                    - sohne-var
                    - Helvetica Neue
                    - Arial
                    - sans-serif
                font_size:
                  type: string
                  nullable: true
                  example: 16px
                font_weight:
                  type: number
                  nullable: true
                  example: 400
                line_height:
                  type: string
                  nullable: true
                  description: '`null` when the site leaves it at `normal`.'
                  example: 24px
            heading:
              type: object
              properties:
                font_family:
                  type: string
                  nullable: true
                  description: The lead heading's first family.
                  example: sohne-var
                font_stack:
                  type: array
                  items:
                    type: string
                font_weight:
                  type: number
                  nullable: true
                  example: 500
            sizes:
              type: object
              description: >-
                Font size of the first visible heading at each level, and of
                body text.
              properties:
                h1:
                  type: string
                  nullable: true
                  example: 48px
                h2:
                  type: string
                  nullable: true
                  example: 32px
                h3:
                  type: string
                  nullable: true
                  example: 26px
                body:
                  type: string
                  nullable: true
                  example: 16px
        components:
          type: object
          properties:
            button_primary:
              $ref: '#/components/schemas/ButtonTokens'
            button_secondary:
              $ref: '#/components/schemas/ButtonTokens'
            input:
              type: object
              nullable: true
              description: The first visible text field.
              properties:
                background:
                  type: string
                  nullable: true
                  example: '#FFFFFF'
                text_color:
                  type: string
                  nullable: true
                  example: '#061B31'
                border_color:
                  type: string
                  nullable: true
                  example: '#E5EDF5'
                border_radius:
                  type: string
                  nullable: true
                  example: 4px
        border_radius:
          type: string
          nullable: true
          description: >-
            The primary button's corner radius, a good proxy for the site's
            rounding.
          example: 4px
    ColorItem:
      type: object
      properties:
        color:
          type: string
          description: The color in `rgb()` form.
          example: rgb(99, 91, 255)
        hex:
          type: string
          description: The color as a hex triplet.
          example: '#635BFF'
        name:
          type: string
          description: >-
            A human-readable name for the color, such as `Medium Slate Blue` or
            `midnightblue`.
          example: Medium Slate Blue
        type:
          type: string
          description: >-
            How the brand uses the color, when known: `accent`, `brand`, `dark`,
            `light` or `background`.
          example: accent
        source:
          type: string
          description: >-
            Where the color came from. Present on `screenshot_colors` entries
            only.
          example: screenshot
      required:
        - color
        - hex
        - name
    CodeColorItem:
      type: object
      description: One color scraped from the page's CSS, HTML, or JavaScript.
      properties:
        color:
          type: string
          description: The raw value as written on the page.
          example: '#635bff'
        group:
          type: string
          description: Nearest named color, used as the group key.
          example: blueviolet
        distance:
          type: number
          description: Distance to that named color. 0 is an exact match.
          example: 0
        name:
          type: string
          description: Tint label within the group, ordered nearest-first.
          example: blueviolet-100
      required:
        - color
        - group
        - distance
        - 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.
        type:
          type: string
          description: What the image is, when known, such as `logo`.
          example: logo
        format:
          type: string
          description: The image format, when known, such as `svg` or `png`.
          example: svg
        background:
          type: string
          description: The logo's background, when known, such as `transparent`.
          example: transparent
      required:
        - url
    BrandAssetItem:
      type: object
      description: >-
        An image harvested from the site or its social profiles, such as a
        Twitter banner.
      properties:
        url:
          type: string
          format: uri
        alt:
          type: string
          nullable: true
        width:
          type: number
          nullable: true
        height:
          type: number
          nullable: true
      required:
        - url
    ButtonTokens:
      type: object
      nullable: true
      properties:
        background:
          type: string
          nullable: true
          description: Fill color. `null` for an outlined or text-only button.
          example: '#533AFD'
        text_color:
          type: string
          nullable: true
          description: Label color.
          example: '#FFFFFF'
        border_color:
          type: string
          nullable: true
          description: Border color, when the button has a visible border.
        border_radius:
          type: string
          nullable: true
          description: Corner radius. `9999px` means fully rounded (a pill).
          example: 4px
        font_weight:
          type: number
          nullable: true
          description: Label weight.
          example: 400
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Prefetch API key. Obtain one from the dashboard.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.