Markdown
All endpoints

Compare two sets

POST/v1/reports/compare

Compare two sets collected under the same conditions: up, down, not clear or not enough data.

Price

Price
Free

This endpoint is free, so it does not accept Idempotency-Key or X-Max-Price; sending either returns invalid_params.

Parameters

Send these in the JSON body, not in the URL.

aobjectRequired

The earlier set.

a.job_idsarray of stringsRequired

The jobs to measure. 1–20 items, no duplicates.

a.enginesarray of strings

Only measure these platforms. Leave it out to include every platform in the jobs. At least 1 item, no duplicates.

a.promptsarray of strings

Only measure these questions. Leave it out to include every question in the jobs. 1–100 items, each up to 2,000 characters, no duplicates.

bobjectRequired

The later set. An answer cannot be in both sets.

b.job_idsarray of stringsRequired

The jobs to measure. 1–20 items, no duplicates.

b.enginesarray of strings

Only measure these platforms. Leave it out to include every platform in the jobs. At least 1 item, no duplicates.

b.promptsarray of strings

Only measure these questions. Leave it out to include every question in the jobs. 1–100 items, each up to 2,000 characters, no duplicates.

brandstring

The brand name. Give at least one of brand and domains. Up to 100 characters.

aliasesarray of strings

Other ways the brand is written. Up to 20 items, each up to 100 characters, no duplicates.

excludearray of strings

Phrases that contain the brand name but are not the brand, such as “Apple pie” for the brand “Apple”. Up to 20 items, each up to 100 characters, no duplicates.

domainsarray of strings

Domains that count as yours, subdomains included. Give at least one of brand and domains. 1–20 items, each up to 253 characters, no duplicates.

Headers

AuthorizationRequired

Bearer followed by your API key.

Response

A successful call returns HTTP 200 with the data in data.item, one CompareReport object. Every field is always present: [] means none this time and null means not available or unknown.

FieldTypeDescription
methodMethodThe method version and definitions
rowsCompareRow[]One row per comparable group and metric
comparablebooleanWhether at least one group could be compared. Even when true, mismatches may list groups that could not
mismatchesstring[]What could not be compared, and why

Nested objects

Method4 fields
FieldTypeDescription
versionstringMethod version. It changes whenever a denominator, interval or matching rule changes
denominators{ answer_rate: string, mention_rate: string, citation_rate: string }The denominator of each of the three rates
brand_rulesstringThe brand matching rules
seedintegerThe resampling seed, so the same input always gives the same result
CompareRow11 fields
FieldTypeDescription
enginestringPlatform ID
channel_idstring | nullThe route actually used; null when none of these answers was sent
tier"basic" | "full"Basic or full tier
conditions{ surface: string | null, interface: string | null, login: string | null, thinking: boolean | null, country: string | null, region: string | null, requested_country: string | null, requested_region: string | null }The capture conditions of this group. When the actual region is unknown, groups use the region you asked for
metric"answer_rate" | "mention_rate" | "citation_rate"Which rate is compared
aRateThe rate of the earlier set, counting only questions with data on both sides
bRateThe rate of the later set, counting only questions with data on both sides
differencenumber | nullb − a
lownumber | nullLower bound of the 95% interval of the difference; null when the verdict is not_enough
highnumber | nullUpper bound of the 95% interval of the difference
verdict"up" | "down" | "not_clear" | "not_enough" | "single_prompt"up: higher. down: lower. not_clear: no clear difference, which does not mean no change. not_enough: not enough data. single_prompt: only one question, so only the difference and interval are given
Rate8 fields
FieldTypeDescription
countintegerNumber of matching answers
sample_sizeintegerNumber of answers in the denominator
prompt_countintegerNumber of questions with data
valuenumber | nullThe rate: the average of the per-question rates, so with several questions it can differ from count ÷ sample_size. null means no data, not zero
lownumber | nullLower bound of the 95% interval
highnumber | nullUpper bound of the 95% interval
method"wilson_95" | "cluster_bootstrap_95" | nullHow the interval was computed: wilson_95 for one question, cluster_bootstrap_95 for several
enoughbooleanWhether there is enough data. When false, do not draw a conclusion from this rate

Common errors

An error means nothing was charged, except settlement_unknown: it means billing is not known yet, so ask again with the same Idempotency-Key. See every error code.

ErrorHTTPMeaningCharged?
invalid_params400A parameter is invalidNot charged
not_found404It does not exist, is private or was deletedNot charged
report_too_large400Too many answers for one report; use fewer jobs, or filter by engine or promptNot charged
unauthorized401No credential was sent, or it is invalid, disabled or expiredNot charged
rate_limited429Too many requests, or too many calls in progressNot charged