---
title: "Estimate a batch of checks | AI answer collection and runs | AEO API"
description: "Quotes up to 20 managed checks in one request."
url: "https://aeoapi.dev/docs/features/ai-answer-collection-and-runs/post-runs-estimate-managed-batch"
canonical: "https://aeoapi.dev/docs/features/ai-answer-collection-and-runs/post-runs-estimate-managed-batch"
last_updated: "2026-11-30"
---

AI answer collection and runs

# Estimate a batch of checks

Quotes up to 20 managed checks in one request.

[`POST /v2/runs`](https://aeoapi.dev/docs/api-reference#post-v2-runs)

- Body `workflow` is `managed_batch`.
- Body `estimate` is `true`. Default is `false`.

## Authentication and access

**Authentication**

Bearer API key

**Scopes**

collections:write

**Roles**

editor, owner, service

**Plans**

Optimizer, Analyzer

**Credits**

The estimate uses zero credits.

## Parameters

Request parameters

| Name | Where | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | `string` | Yes |  |

## Request body

```
{
  "estimate": true,
  "items": [
    {
      "idempotency_key": "example-estimate-0001",
      "request": {
        "brand_id": "00000000-0000-4000-8000-000000000001",
        "market": {
          "country": "US",
          "language": "en"
        }
      }
    }
  ],
  "workflow": "managed_batch"
}
```

Request body fields 1

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `estimate` | `true` | Yes |  |
| `items` | `array of object` | Yes |  |
| `items[].idempotency_key` | `string` | Yes |  |
| `items[].request` | `object` | Yes |  |
| `items[].request.allow_country_level` | `boolean` | No | Allow a country-level answer when the source cannot apply the requested location. |
| `items[].request.answer_mode` | `"standard" \| "new"` | No | Use standard for the normal answer or new to request a new answer. |
| `items[].request.brand_id` | `string (uuid)` | Yes |  |
| `items[].request.market` | `object` | Yes | \`\`components.schemas.Market\`\`. |
| `items[].request.market.city` | `string \| null` | No |  |
| `items[].request.market.country` | `string` | Yes |  |
| `items[].request.market.language` | `string` | Yes |  |
| `items[].request.market.latitude` | `number \| null` | No |  |
| `items[].request.market.location_id` | `string (uuid) \| null` | No |  |
| `items[].request.market.longitude` | `number \| null` | No |  |
| `items[].request.market.postal_code` | `string \| null` | No |  |
| `items[].request.market.region` | `string \| null` | No |  |
| `items[].request.sources` | `array of object \| null` | No |  |
| `items[].request.sources.device` | `"desktop" \| "mobile" \| "unknown" \| null` | No |  |
| `items[].request.sources.mode` | `"ui_normal" \| "ui_search" \| "api_normal" \| "api_web" \| "ai_mode" \| "ai_overview" \| "organic_search"` | Conditional | The mode used to collect the answer. The unverified value appears only in evidence. |
| `items[].request.sources.platform` | `"chatgpt" \| "gemini" \| "claude" \| "perplexity" \| "google" \| "bing" \| "brave" \| "meta_ai" \| "grok" \| "universal"` | Conditional | The platform where the answer was observed. |
| `items[].request.sources.provider` | `string \| null` | No |  |
| `items[].request.website` | `string \| null` | No |  |
| `workflow` | `"managed_batch"` | Yes |  |

## Request examples

Set `AEO_API_BASE_URL` to `https://api.aeoapi.dev` and `AEO_API_KEY` to your server-side API key. Set the other environment variables to the values for your request.

Save the JSON request body as `request.json`. Replace sample IDs, revisions and other values with your own.

```bash
curl --fail-with-body -X POST "$AEO_API_BASE_URL/v2/runs" \
  -H "Authorization: Bearer $AEO_API_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @request.json
```

```python
import json
from pathlib import Path
from os import environ
from aeo_sdk import AeoClient

body = json.loads(Path("request.json").read_text())

with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
    response = client.v2_post_runs(
        body=body,
        idempotency_key=environ["IDEMPOTENCY_KEY"],
    )
    print(response.body)
```

```typescript
import { AeoClient } from "@aeoapi/aeo-sdk";
import { readFile } from "node:fs/promises";

const client = new AeoClient(process.env.AEO_API_KEY!, {
  baseUrl: process.env.AEO_API_BASE_URL!,
});
const body = JSON.parse(await readFile("request.json", "utf8"));
const response = await client.v2PostRuns(
  body,
  {
    idempotencyKey: process.env.IDEMPOTENCY_KEY!,
  },
);
console.log(response.body);
```

## Responses

#### HTTP 200

Successful Response

`application/json`

Response fields are listed below.

HTTP 200 response fields 1

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | `array of object \| object` | Yes | The requested result. See the fields below for its contents. |
| `data[].brand_id` | `string (uuid)` | Yes |  |
| `data[].data` | `object` | Conditional |  |
| `data[].data.brand_id` | `string` | Conditional |  |
| `data[].data.eligible_engines` | `array of object` | Conditional |  |
| `data[].data.eligible_engines[].applied_location` | `object \| null` | No |  |
| `data[].data.eligible_engines[].applied_location.city` | `string \| null` | No |  |
| `data[].data.eligible_engines[].applied_location.country` | `string \| null` | No |  |
| `data[].data.eligible_engines[].applied_location.granularity` | `"country" \| "region" \| "city" \| "postal" \| "coordinates"` | Conditional |  |
| `data[].data.eligible_engines[].applied_location.latitude` | `number \| null` | No |  |
| `data[].data.eligible_engines[].applied_location.longitude` | `number \| null` | No |  |
| `data[].data.eligible_engines[].applied_location.postal_code` | `string \| null` | No |  |
| `data[].data.eligible_engines[].applied_location.region` | `string \| null` | No |  |
| `data[].data.eligible_engines[].charge_per_step` | `integer` | Conditional |  |
| `data[].data.eligible_engines[].reserve_per_step` | `integer` | Conditional |  |
| `data[].data.eligible_engines[].source` | `object` | Conditional |  |
| `data[].data.eligible_engines[].unenforced_controls` | `array of string` | Conditional |  |
| `data[].data.estimate_fingerprint` | `string` | Conditional |  |
| `data[].data.estimated_credits` | `integer` | Conditional |  |
| `data[].data.excluded_sources` | `array of object` | Conditional | Sources omitted from the estimate. Location estimates include the affected location_id with each exclusion. Location exclusions have reason location_not_supported. Sources outside your plan have reason feature_not_offered. |
| `data[].data.excluded_sources[].location_id` | `string (uuid)` | No |  |
| `data[].data.expires_at` | `string` | Conditional |  |
| `data[].data.location_totals` | `array of object` | No |  |
| `data[].data.location_totals[].eligible_engines` | `array of object` | No |  |
| `data[].data.location_totals[].eligible_engines[].source` | `object` | Conditional |  |
| `data[].data.location_totals[].eligible_engines[].unenforced_controls` | `array of string` | Conditional |  |
| `data[].data.location_totals[].estimated_credits` | `integer` | Conditional |  |
| `data[].data.location_totals[].location_id` | `string (uuid)` | Conditional |  |
| `data[].data.location_totals[].market` | `object` | Conditional |  |
| `data[].data.location_totals[].market.city` | `string \| null \| null` | No |  |
| `data[].data.location_totals[].market.country` | `string` | Conditional |  |
| `data[].data.location_totals[].market.language` | `string` | Conditional |  |
| `data[].data.location_totals[].market.latitude` | `number \| null` | No |  |
| `data[].data.location_totals[].market.location_id` | `string (uuid)` | No |  |
| `data[].data.location_totals[].market.longitude` | `number \| null` | No |  |
| `data[].data.location_totals[].market.postal_code` | `string \| null` | No |  |
| `data[].data.location_totals[].market.region` | `string \| null \| null` | No |  |
| `data[].data.location_totals[].maximum_credits` | `integer` | Conditional |  |
| `data[].data.location_totals[].prompt_count` | `integer` | Conditional |  |
| `data[].data.maximum_credits` | `integer` | Conditional |  |
| `data[].data.poll_url` | `string` | Conditional |  |
| `data[].data.prompt_count` | `integer` | Conditional |  |
| `data[].data.prompt_set_revision` | `string` | Conditional |  |
| `data[].data.run_id` | `string \| null` | No |  |
| `data[].data.website` | `string \| null` | Conditional |  |
| `data[].idempotency_key` | `string` | Yes |  |
| `data[].status` | `200 \| integer` | Yes |  |
| `data[].error` | `object` | Conditional |  |
| `data[].error.code` | `string` | Conditional |  |
| `data[].error.field_errors` | `array of object` | No |  |
| `data[].error.field_errors[].field` | `string \| null` | Conditional |  |
| `data[].error.field_errors[].message` | `string` | Conditional |  |
| `data[].error.message` | `string` | Conditional |  |
| `meta` | `object` | Yes | Information about this response, including any warnings or pagination details. |
| `meta.as_of` | `string (date-time)` | Yes | The point in time that the response represents. |
| `meta.cohort_version` | `string \| null` | No | Identifies the version of the group used to calculate the results. |
| `meta.collected_at` | `string (date-time) \| null` | Yes | When the data was collected, if available. |
| `meta.metric_version` | `string \| null` | No | The version of the metric definition used for these results. |
| `meta.next_cursor` | `string \| null` | Yes | When present, pass this value as cursor to request the next page with the same filters. |
| `meta.next_refresh_at` | `string (date-time) \| null` | Yes |  |
| `meta.request_id` | `string (uuid)` | Yes | Keep this ID when reporting a problem with the request. |
| `meta.restricted_fields` | `array of string` | No | Fields that your current access does not allow the API to return. |
| `meta.rights_filtered` | `boolean` | Yes | Indicates whether access rights affected the returned data. |
| `meta.schema_version` | `"1.0"` | Yes | The version of the response format. |
| `meta.stale` | `boolean` | Yes |  |
| `meta.warnings` | `array of string` | Yes | Read these notes for limitations that affect the results. |

## Errors

Read `code` and `message` in the error response. Keep `request_id` when you contact support.

- HTTP 400 [`invalid_request`](https://aeoapi.dev/docs/errors#invalid_request)
- HTTP 401 [`unauthenticated`](https://aeoapi.dev/docs/errors#unauthenticated)
- HTTP 403 [`forbidden`](https://aeoapi.dev/docs/errors#forbidden)
- HTTP 404 [`not_found`](https://aeoapi.dev/docs/errors#not_found)
- HTTP 422 [`validation_error`](https://aeoapi.dev/docs/errors#validation_error)
- HTTP 429 [`rate_limited`](https://aeoapi.dev/docs/errors#rate_limited)

[AI answer collection and runs reference](https://aeoapi.dev/docs/features/ai-answer-collection-and-runs)
