← All one-liners·#067·Web Scraping·self contained·beginner

Extract Website Branding with Firecrawl

Scrapes a website to automatically extract its brand colors, fonts, and typography using Firecrawl's LLM extraction.

Setup
  • → export FIRECRAWL_API_KEY='fc-...'
  • → Install jq (e.g., brew install jq)
Cost per run
$0.002 per scrape (Firecrawl API)
The one-liner
$ curl -sX POST https://api.firecrawl.dev/v1/scrape \
  -H "Authorization: Bearer $FIRECRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://stripe.com",
    "formats": ["extract"],
    "extract": {
      "prompt": "Extract brand colors, fonts, and typography"
    }
  }' | jq '.data.extract'
What each stage does
  1. [01] curlcurl -sX POST https://api.firecrawl.dev/v1/scrape
    Initiates a silent POST request to the Firecrawl scrape endpoint.
  2. [02] curl-H "Authorization: Bearer $FIRECRAWL_API_KEY"
    Authenticates the API request using your Firecrawl API key.
  3. [03] curl-d '{ "url": "https://stripe.com", "formats": ["extract"], ... }'
    Sends the target URL and specifies the 'extract' format to trigger LLM-based data extraction.
  4. [04] jq| jq '.data.extract'
    Filters the raw JSON response to isolate and pretty-print the extracted branding information.
Expected output (sample)
{
  "colors": ["#635BFF", "#0A2540", "#00D4FF"],
  "fonts": ["Söhne", "Söhne Mono"],
  "typography": "Clean, sans-serif, highly legible for fintech."
}
Caveats & tips
  • Requires a valid Firecrawl API key with sufficient credits.
  • Extraction quality depends on the website's structure and whether it actively blocks automated scraping.