Skip to main content
The insights surface is four read-only endpoints, one per scope in the hierarchy. Each returns a bare list of metric rows for the entity you ask about (and, via aggregation_level, the levels below it). Numbers combine Thrad and ChatGPT (OpenAI Ads) supply by default; you can isolate or split a single supply.
All four take the same query parameters and return the same list shape. The only difference is scope: the entity you target and the deepest aggregation_level you may request.
Insights money uses the same micros scale as budgets and bids ($1 = 1,000,000), and every money metric arrives as a pair: an integer *_micros value plus a formatted *_display string. ctr likewise arrives as ctr_ratio (a 0–1 fraction) plus ctr_display ("10.00%").
The *_micros integer is the canonical, parseable value — never parse *_display, whose formatting may change.
One vocabulary. You select, filter, sort, and read the same field names: impressions, clicks, spend_micros, cpc_micros, cpm_micros, ctr_ratio. There is no bare spend or ctr field anywhere in this API.

Authorizations

string
required
Bearer token using your organization’s API key: Authorization: Bearer ak_.... There is one active key per organization — create or rotate it in the Thrad Platform dashboard under Settings → API keys. Store it as the THRAD_ADS_API_KEY environment variable.

Query parameters

These apply to every insights endpoint. Repeated parameters use the name[] convention (e.g. fields[]=impressions&fields[]=clicks).
string
default:"daily"
How rows are bucketed over time: hourly, daily (default), monthly, or none. With none a single row covers the whole requested range and has no readable_time. monthly rolls daily data up by calendar month. Any other value returns invalid_value.
string
The row grain: ad_account, campaign, ad_group, or ad. Defaults to the endpoint’s own scope. It must be at or below the endpoint scope — e.g. GET /v1/campaigns/{id}/insights?aggregation_level=ad returns one row per ad in that campaign, but aggregation_level=ad_account on a campaign endpoint is rejected with aggregation_level_too_high. Use a deeper level to discover the entity ids beneath a scope; there are no separate list endpoints.
array
One or more JSON window objects, each {"start": "...", "end": "..."} where both bounds are ISO 8601 timestamps carrying a UTC offset or trailing Z. One format — there is no type discriminator and no unix_range / date_range / hour_range variant. When omitted, a trailing 30-day window is used.
end must be after start (invalid_time_range), and neither bound may be null. An offset-less timestamp is rejected rather than assumed UTC. Each window may span at most 366 days (range_too_wide); with time_granularity=hourly, 25 hours or less (hourly_range_too_wide).
array
Which metrics to project onto each row, named by their output field: impressions, clicks, spend_micros, cpc_micros, cpm_micros, ctr_ratio. Defaults to impressions, clicks, spend_micros. Each money field yields its *_micros value and its *_display companion; ctr_ratio yields ctr_ratio + ctr_display. An unknown name returns unknown_field.
array
One or more JSON { "field", "operator", "value" } objects. Three kinds of field are accepted:An unknown field returns invalid_filter; a disallowed operator returns invalid_filter_operator.
array
One or more JSON { "field", "direction" } objects, applied in order. field must be one of the same output metric names (spend_micros, cpc_micros, cpm_micros, ctr_ratio, impressions, clicks); direction is asc or desc. Anything else returns invalid_value. Row id is always the final deterministic tiebreak.
array
Break each row into sub-rows along one dimension. At most one segment (too_many_segments otherwise).
  • source — split into thrad + openai sub-rows. Supported at every level; the sub-rows sum to the combined total.
  • country / device — break by country_code / device_type. Ad-group or ad scope only (unsupported_segment higher up), Thrad supply only (segment_source_unsupported if source=openai), and only none or daily granularity (segment_granularity_unsupported). This path aggregates a single window, so it rejects an entity-id filters[] (unsupported_segment) and more than one time_ranges[] (invalid_time_range).
  • product — not supported (unsupported_segment). Any other value returns invalid_segment.
string
default:"all"
Which supply to report: thrad, openai, or all (default — combined Thrad + ChatGPT). A convenience equivalent to the source filter above.
ChatGPT (OpenAI Ads) insights are daily-only. source=openai with time_granularity=hourly is a hard error (hourly_unsupported_for_external_source); a combined (all) hourly request silently reports Thrad supply only.
integer
default:"20"
Maximum rows in the page, 1–2000 (default 20). Out of range returns invalid_value.
string
Cursor for the previous page — pass a prior response’s first_id. Mutually exclusive with after (invalid_cursor if both). An unknown cursor returns invalid_cursor.
string
Cursor for the next page — pass a prior response’s last_id. Mutually exclusive with before.
includes[] and override_segment_group_order[] are not supported. Passing either returns 400 unsupported_parameter — they are never silently ignored.

Response

Every endpoint returns the same bare list object — not the platform { success, data, error, meta } envelope.
string
Always "list".
array
The metric rows for this page. Each row is a flat object.
integer
Number of rows in data on this page.
string
Id of the first row in the page. Pass it as before to fetch the previous page. null for an empty page.
string
Id of the last row in the page. Pass it as after to fetch the next page. null for an empty page.
boolean
true if more rows exist beyond this page.

Choosing supply (Thrad vs ChatGPT)

By default insights combine Thrad and ChatGPT (OpenAI Ads) supply into one number. There are three ways to look at supply individually:
  • source=thrad|openai — report a single supply. source=all (the default) is combined.
  • filters[]={"field":"source","operator":"IN","value":["thrad"]} — the same selection expressed as a filter. If you also pass source and the two disagree, you get invalid_filter.
  • segments[]=source — keep the combined window but split each row into a thrad sub-row and an openai sub-row. Each sub-row carries a source field and :source=… in its id, and the two sum to the combined total.

Errors

Errors use the bare error shape — { "error": { "message", "type", "param", "code" } } — not the platform envelope. type is one of invalid_request_error, authentication_error, rate_limit_error, or server_error.
A single response is capped at a fixed maximum number of rows (the decoded set is sorted, filtered, and paginated in memory). If you need more, narrow the scope or window, or page with before/after.