# 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.

`a` object Required

The earlier set.

`a.job_ids` array of strings Required

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

`a.engines` array of strings

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

`a.prompts` array 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.

`b` object Required

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

`b.job_ids` array of strings Required

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

`b.engines` array of strings

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

`b.prompts` array 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.

`brand` string

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

`aliases` array of strings

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

`exclude` array 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.

`domains` array 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

`Authorization` Required

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

**Method 4 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 |

**CompareRow 11 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 |

**Rate 8 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](https://www.askcrawl.com/docs/errors/).

| Error | HTTP | Meaning | Charged? |
| --- | --- | --- | --- |
| [`invalid_params`](https://www.askcrawl.com/docs/errors/#invalid_params) | 400 | A parameter is invalid | Not charged |
| [`not_found`](https://www.askcrawl.com/docs/errors/#not_found) | 404 | It does not exist, is private or was deleted | Not charged |
| [`report_too_large`](https://www.askcrawl.com/docs/errors/#report_too_large) | 400 | Too many answers for one report; use fewer jobs, or filter by engine or prompt | Not charged |
| [`unauthorized`](https://www.askcrawl.com/docs/errors/#unauthorized) | 401 | No credential was sent, or it is invalid, disabled or expired | Not charged |
| [`rate_limited`](https://www.askcrawl.com/docs/errors/#rate_limited) | 429 | Too many requests, or too many calls in progress | Not charged |

```
curl https://api.askcrawl.com/v1/reports/compare \
  -H <b>"Authorization: Bearer $API_KEY"</b> \
  -H <b>"Content-Type: application/json"</b> \
  -d '{
    <b>"a"</b>: {
      <b>"job_ids"</b>: [
        <b>"2f6c1c0e-5b7a-4d1e-9a53-0c8e4f7b21a6"</b>
      ]
    },
    <b>"b"</b>: {
      <b>"job_ids"</b>: [
        <b>"9d3b7e42-1a6f-4c58-b0e7-6a2f5d914c3b"</b>
      ]
    },
    <b>"brand"</b>: <b>"Apple"</b>
  }'
```

Up

[API reference](https://www.askcrawl.com/docs/api/)

Related

[Visibility report](https://www.askcrawl.com/docs/api/reports-visibility/)

Basis

[Errors and charges](https://www.askcrawl.com/docs/errors/)

[Billing, holds and settlement](https://www.askcrawl.com/docs/billing/)

Next

[Quickstart](https://www.askcrawl.com/docs/quickstart/)

[Connect an AI assistant](https://www.askcrawl.com/docs/mcp/)

> Page: https://www.askcrawl.com/docs/api/reports-compare/ · Content date: 2026-12-01
