Skip to content

Your first API read

Get a REST API key, list the brands it can access, and read visibility scores using the current root-level endpoints.

3 min read
On this page

This walkthrough makes two read requests: list your accessible brands, then read one brand's visibility scores. It does not create prompts or change tracking.

Before you start

You need REST API access and a brand your account can read. The REST API is normally included with Scale and eligible Enterprise accounts; account-specific access can differ. Settings → Developer shows whether it is available. Paid-plan MCP access uses a different credential and is not the same as a REST API key.

A key inherits your effective brand access through membership, team grants or active client assignments. It does not grant access to every brand in an agency just because you have a key. Client assignments remain read-only.

1. Get your API key

Open Settings → Developer. In REST API Key, use Generate API key if none exists, or Copy API key for a key you can reveal. The dedicated API Keys page also manages it.

Keep the key in your local environment for the requests below. Replace only the placeholder with your own key:

Terminal
export TRAKKR_API_KEY='YOUR_API_KEY'

Keep it out of public source files and browser code. Regenerating a key invalidates the earlier one, so use the existing key if other integrations depend on it.

2. List brands you can read

Terminal
curl --fail-with-body \
  -H "Authorization: Bearer $TRAKKR_API_KEY" \
  'https://api.trakkr.ai/get-brands?include=markets,aliases'

The response contains a brands list. Find the intended brand and copy its id, which is a UUID. The optional includes add its markets and aliases. An empty list is not a zero visibility result; it means this request returned no accessible brands.

Read Brands API for the full fields and filters.

3. Read scores for that brand

Set the ID returned by the first request, then request the score summary:

Terminal
export TRAKKR_BRAND_ID='BRAND_UUID_FROM_GET_BRANDS'
curl --fail-with-body \
  -H "Authorization: Bearer $TRAKKR_API_KEY" \
  "https://api.trakkr.ai/get-scores?brand_id=$TRAKKR_BRAND_ID&days=7&view=summary"

Inspect latest_scores.date, the current scores and the historical entries before comparing them with a report. days=7 selects the history and comparison window; it does not mean every headline is a seven-day average. Use view=by_model for a model breakdown. The views are documented in Scores API.

The current external score contract can return 0 when a visibility measurement is unavailable. Check the app's report and per-model evidence before interpreting an API zero as confirmed absence. Zero and missing scores explains this limit.

If a request fails

  • Read the HTTP status and response body. Check that the Bearer header contains the REST key, not an MCP token.
  • For a key or access denial, confirm the key is current, REST access is enabled and your account can read the requested brand. Do not keep regenerating the key to solve a brand-permission problem.
  • For a request error, copy the brand UUID from get-brands and use a supported view. The history window for this endpoint is 7 to 365 days.
  • For a rate limit, slow the requests and follow any retry guidance in the response. These two endpoints allow 60 requests per minute.

Use the API playground for a request you can inspect, and API errors for the response contract. Do not paste a key into a support message; share the status, endpoint and safe error text instead.