Compare two sets
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.
| Field | Type | Description |
|---|---|---|
method | Method | The method version and definitions |
rows | CompareRow[] | One row per comparable group and metric |
comparable | boolean | Whether at least one group could be compared. Even when true, mismatches may list groups that could not |
mismatches | string[] | What could not be compared, and why |
Nested objects
Method4 fields
| Field | Type | Description |
|---|---|---|
version | string | Method 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_rules | string | The brand matching rules |
seed | integer | The resampling seed, so the same input always gives the same result |
CompareRow11 fields
| Field | Type | Description |
|---|---|---|
engine | string | Platform ID |
channel_id | string | null | The 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 |
a | Rate | The rate of the earlier set, counting only questions with data on both sides |
b | Rate | The rate of the later set, counting only questions with data on both sides |
difference | number | null | b − a |
low | number | null | Lower bound of the 95% interval of the difference; null when the verdict is not_enough |
high | number | null | Upper 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
| Field | Type | Description |
|---|---|---|
count | integer | Number of matching answers |
sample_size | integer | Number of answers in the denominator |
prompt_count | integer | Number of questions with data |
value | number | null | The 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 |
low | number | null | Lower bound of the 95% interval |
high | number | null | Upper bound of the 95% interval |
method | "wilson_95" | "cluster_bootstrap_95" | null | How the interval was computed: wilson_95 for one question, cluster_bootstrap_95 for several |
enough | boolean | Whether 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.
| Error | HTTP | Meaning | Charged? |
|---|---|---|---|
invalid_params | 400 | A parameter is invalid | Not charged |
not_found | 404 | It does not exist, is private or was deleted | Not charged |
report_too_large | 400 | Too many answers for one report; use fewer jobs, or filter by engine or prompt | Not charged |
unauthorized | 401 | No credential was sent, or it is invalid, disabled or expired | Not charged |
rate_limited | 429 | Too many requests, or too many calls in progress | Not charged |