Skip to main content
GET
/
brand
Extract brand assets
curl --request GET \
  --url https://api.prefetch.io/brand \
  --header 'X-API-Key: <api-key>'
{
  "success": true,
  "data": {
    "domain": "stripe.com",
    "url": "https://stripe.com",
    "colors": {
      "brand_colors": [
        {
          "hex": "#18E299",
          "name": "mediumspringgreen"
        }
      ],
      "logo_colors": [
        {
          "hex": "#18E299",
          "name": "mediumspringgreen"
        }
      ],
      "screenshot_colors": [
        {
          "hex": "#18E299",
          "name": "mediumspringgreen"
        }
      ],
      "css_colors": [
        {
          "hex": "#18E299",
          "name": "mediumspringgreen"
        }
      ],
      "html_colors": [
        {
          "hex": "#18E299",
          "name": "mediumspringgreen"
        }
      ],
      "javascript_colors": [
        {
          "hex": "#18E299",
          "name": "mediumspringgreen"
        }
      ]
    },
    "fonts": {
      "families": [
        "Inter",
        "Roboto"
      ]
    },
    "logos": {
      "primary": {
        "url": "https://cdn.example.com/logo.svg",
        "width": 123,
        "height": 123
      },
      "secondary": [
        {
          "url": "https://cdn.example.com/logo.svg",
          "width": 123,
          "height": 123
        }
      ],
      "favicon_url": "https://stripe.com/favicon.ico",
      "icon_url": "<string>",
      "apple_touch_icon": "<string>"
    },
    "images": {
      "og_image": "<string>",
      "twitter_image": "<string>",
      "screenshot_url": "<string>"
    },
    "social_links": {
      "twitter": "https://twitter.com/stripe",
      "linkedin": "https://linkedin.com/company/stripe"
    }
  },
  "meta": {
    "requestId": "a3f2c1d4-7b6e-4f2a-9c1d-8e3f2a1b4c5d",
    "durationMs": 1842
  }
}

Documentation Index

Fetch the complete documentation index at: https://prefetch.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Overview

/brand uses headless Chrome to visit a page and extract a comprehensive set of brand assets:
  • Colors — extracted from the logo, optionally from the screenshot and source code
  • Logos — primary logo URL with dimensions, plus secondary candidates and favicon
  • Fonts — font family names detected on the page
  • Images — OG image, Twitter card image, screenshot URL
  • Social links — keyed by platform (twitter, linkedin, github, etc.)

Color extraction options

ParameterWhat it extracts
(default)Logo colors (brand_colors) only
screenshotColors=6+ N dominant colors from the page screenshot
css=true+ Colors defined in CSS stylesheets
html=true+ Colors defined in HTML attributes
javascript=true+ Colors defined in JavaScript source
filterAchromatic=trueExclude near-white, near-black, and greyscale results
You can combine any of these.

Example requests

curl "https://api.prefetch.io/brand?url=https://stripe.com" \
  -H "X-API-Key: $PREFETCH_API_KEY"

Example response

{
  "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"
    }
  },
  "meta": {
    "requestId": "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a",
    "durationMs": 4130
  }
}

Authorizations

X-API-Key
string
header
required

Your Prefetch API key. Obtain one from the dashboard.

Query Parameters

url
string
required

The website URL to process. https:// is prepended automatically if no protocol is provided.

Example:

"https://stripe.com"

screenshotColors
integer

Extract N dominant colors from the page screenshot. Range: 2–12. Omit to skip screenshot color extraction.

Required range: 2 <= x <= 12
css
boolean
default:false

Extract colors from linked CSS files. Pass true to enable.

html
boolean
default:false

Extract colors from inline HTML. Pass true to enable.

javascript
boolean
default:false

Extract colors from linked JS files. Pass true to enable.

screenshotWidth
integer
default:1440

Viewport width in pixels. Range: 320–3000. Default: 1440.

Required range: 320 <= x <= 3000
screenshotHeight
integer
default:900

Viewport height in pixels. Range: 320–3000. Default: 900.

Required range: 320 <= x <= 3000
screenshotFormat
enum<string>
default:jpeg

Screenshot format. Default: jpeg.

Available options:
jpeg,
png,
pdf
screenshotFullPage
boolean
default:false

Capture the full scrollable page. Pass true to enable.

disableAdblocker
boolean
default:false

Disable the built-in adblocker. Pass true to enable (useful for sites that detect ad blockers).

filterAchromatic
boolean
default:false

Exclude near-white, near-black, and greyscale colors from results. Pass true to enable.

Response

Brand extraction result.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required