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": [
        {
          "color": "rgb(99,91,255)",
          "hex": "#635BFF",
          "name": "blueviolet",
          "percentage": 38,
          "source": "logo"
        }
      ],
      "screenshot_colors": [
        {
          "color": "rgb(99,91,255)",
          "hex": "#635BFF",
          "name": "blueviolet",
          "percentage": 38,
          "source": "logo"
        }
      ],
      "code_colors": {
        "css": [
          "<string>"
        ],
        "html": [
          "<string>"
        ],
        "javascript": [
          "<string>"
        ]
      }
    },
    "fonts": {
      "families": [
        "Sohne",
        "Inter"
      ],
      "google_fonts": [
        "<string>"
      ],
      "typekit": [
        "<string>"
      ]
    },
    "logos": {
      "primary": {
        "url": "https://assets.prefetch.io/logos/stripe-logo.svg",
        "source": "jsonld",
        "score": 185,
        "isSvg": true
      },
      "secondary": [
        {
          "url": "https://assets.prefetch.io/logos/stripe-logo.svg",
          "source": "jsonld",
          "score": 185,
          "isSvg": true
        }
      ],
      "favicon_url": "https://stripe.com/favicon.ico",
      "icon_url": "<string>",
      "apple_touch_icon": "<string>"
    },
    "images": {
      "og_image": "<string>",
      "twitter_image": "<string>",
      "assets": [
        "<string>"
      ],
      "screenshot_url": "<string>",
      "screenshot_colors": [
        {
          "color": "rgb(99,91,255)",
          "hex": "#635BFF",
          "name": "blueviolet",
          "percentage": 38,
          "source": "logo"
        }
      ]
    },
    "social_links": {
      "twitter": "<string>",
      "linkedin": "<string>",
      "github": "<string>",
      "facebook": "<string>",
      "instagram": "<string>",
      "youtube": "<string>"
    }
  },
  "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 via pixel analysis, optionally from the screenshot and source code
  • Logos — primary and secondary candidates scored by confidence
  • Fonts — font family names including Google Fonts and Typekit
  • Images — OG image, Twitter card image, screenshot
  • Social links — Twitter/X, LinkedIn, GitHub, Facebook, Instagram, YouTube

Color extraction options

ParameterWhat it extracts
(default)Logo 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
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": [
        {
          "color": "rgb(99,91,255)",
          "hex": "#635BFF",
          "name": "blueviolet",
          "percentage": 38,
          "source": "logo"
        },
        {
          "color": "rgb(0,212,255)",
          "hex": "#00D4FF",
          "name": "cyan",
          "percentage": 24,
          "source": "logo"
        }
      ],
      "screenshot_colors": [
        {
          "color": "rgb(255,255,255)",
          "hex": "#FFFFFF",
          "name": "white",
          "percentage": 61,
          "source": "screenshot"
        }
      ]
    },
    "fonts": {
      "families": ["Sohne", "Inter"],
      "google_fonts": [],
      "typekit": []
    },
    "logos": {
      "primary": {
        "url": "https://assets.prefetch.io/logos/stripe-logo.svg",
        "source": "jsonld",
        "score": 185,
        "isSvg": true
      },
      "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",
      "assets": [],
      "screenshot_url": "https://assets.prefetch.io/screenshots/stripe-1440x900.jpg",
      "screenshot_colors": [
        {
          "color": "rgb(255,255,255)",
          "hex": "#FFFFFF",
          "name": "white",
          "percentage": 61,
          "source": "screenshot"
        }
      ]
    },
    "social_links": {
      "twitter": "https://twitter.com/stripe",
      "linkedin": "https://linkedin.com/company/stripe",
      "github": "https://github.com/stripe",
      "facebook": null,
      "instagram": null,
      "youtube": null
    }
  },
  "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. http:// is prepended automatically if no protocol is provided. Maximum 2048 characters.

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 defined in CSS source code. Default: false.

html
boolean
default:false

Extract colors defined in HTML attributes. Default: false.

javascript
boolean
default:false

Extract colors defined in JavaScript source code. Default: false.

width
integer
default:1440

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

Required range: 320 <= x <= 5000
height
integer
default:900

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

Required range: 320 <= x <= 5000
format
enum<string>
default:jpeg

Image format. Default: jpeg.

Available options:
jpeg,
png,
webp
full_page
boolean
default:false

Capture full scrollable page height. Default: false.

Response

Brand extraction result.

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