Skip to main content

Prerequisites

  • A Scrunch workspace
  • An API key with Query access
  • A brand ID for the brand you want to query

Call the API

1

Set your API key

Get your API key from Organization Settings → API Keys and set it as environment variables:
export SCRUNCH_API_KEY="your-api-key-here"
export SCRUNCH_BRAND_ID="your-brand-id"
2

Make your first Query API request

This example retrieves weekly brand presence for the last 30 days.
curl "https://api.scrunchai.com/v1/$SCRUNCH_BRAND_ID/query?fields=date_week,brand_presence_percentage&start_date=2025-01-01&end_date=2025-01-31" \
  -H "Authorization: Bearer $SCRUNCH_API_KEY" \
  -H "Accept: application/json"
Example output:
{
  "total": 4,
  "limit": 1000,
  "offset": 0,
  "rows": [
    {
      "date_week": "2025-01-06",
      "brand_presence_percentage": 42.1
    },
    {
      "date_week": "2025-01-13",
      "brand_presence_percentage": 47.8
    }
  ]
}

Next steps