AI answer collection and runs
Cancel a managed run
Cancels a managed run. The run stays available to read.
- Path
run_idstarts withmanaged:.
Authentication and access
- Authentication
- Bearer API key
- Scopes
- collections:write
- Roles
- editor, owner, service
- Plans
- Optimizer, Analyzer
- Credits
- No credit charge.
- Billing access
- Required
Parameters
| Name | Where | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | Yes | |
Idempotency-Key | header | string | Yes | For 7 days, sending the same key and body for the same account and operation returns the original response. Changing the body for that key returns HTTP 409. |
reason | query | string | No | Why you are cancelling the run. Supply 1 to 500 characters. |
Request body
Send this request without a body.
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.
curl --fail-with-body -X DELETE "$AEO_API_BASE_URL/v2/runs/$RUN_ID" \
-H "Authorization: Bearer $AEO_API_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY"from os import environ
from aeo_sdk import AeoClient
with AeoClient(environ["AEO_API_KEY"], base_url=environ["AEO_API_BASE_URL"]) as client:
response = client.v2_delete_runs_run_id(
run_id=environ["RUN_ID"],
idempotency_key=environ["IDEMPOTENCY_KEY"],
)
print(response.body)import { AeoClient } from "@aeoapi/aeo-sdk";
const client = new AeoClient(process.env.AEO_API_KEY!, {
baseUrl: process.env.AEO_API_BASE_URL!,
});
const response = await client.v2DeleteRunsRunId(
process.env.RUN_ID!,
{
idempotencyKey: process.env.IDEMPOTENCY_KEY!,
},
);
console.log(response.body);Responses
HTTP 202 means the API accepted the cancellation request. Follow the Location header to read the job and check data.state. To check the whole managed run, use GET /v2/runs/{run_id} with the original managed run ID and read data.status. Stop polling at cancelled, completed, partial or failed.
HTTP 202
Collect or cancel work result.
| Name | Type | Required | Description |
|---|---|---|---|
Location | string (uri) | No | Authenticated polling URI returned in data.poll_url. |
X-RateLimit-Limit | integer | No | Requests in rate window. |
X-RateLimit-Remaining | integer | No | Remaining request tokens. |
X-RateLimit-Reset | integer | No | UTC Unix seconds when window resets. |
X-Request-Id | string (uuid) | No | Trace identifier. |
X-Usage-Units | integer | No | CU charged by this response; GET and account/usage always zero. |
application/json
{
"data": {
"billed_units": 0,
"created_at": "2026-11-06T00:00:00Z",
"error": null,
"estimated_units": 0,
"id": "00000000-0000-4000-8000-000000000001",
"kind": "collection",
"poll_url": "https://api.aeoapi.dev/v2/runs/job:00000000-0000-4000-8000-000000000001",
"progress": 0,
"reserved_units": 0,
"result": null,
"revision": 1,
"state": "queued",
"updated_at": "2026-11-06T00:00:00Z"
},
"meta": {
"as_of": "2026-11-06T00:00:00Z",
"collected_at": null,
"next_cursor": null,
"next_refresh_at": null,
"request_id": "00000000-0000-4000-8000-000000000001",
"rights_filtered": false,
"schema_version": "1.0",
"stale": false,
"warnings": []
}
}| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The requested result. See the fields below for its contents. |
data.billed_units | integer | Yes | The credits charged for this work. |
data.created_at | string (date-time) | Yes | |
data.error | object | null | Yes | |
data.error.code | "invalid_request" | "unauthenticated" | "quota_exceeded" | "forbidden" | "not_found" | "conflict" | "precondition_failed" | "validation_error" | "rate_limited" | "source_pending" | "feature_not_offered" | "internal_error" | Conditional | |
data.error.duplicate_of | string (uuid) | No | ID of your existing prompt. |
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 | |
data.error.request_id | string (uuid) | Conditional | |
data.error.retryable | boolean | Conditional | |
data.error.similar_prompts | array of object | No | Other matching prompts in your library. |
data.error.similar_prompts[].prompt_id | string (uuid) | Conditional | |
data.estimated_units | integer | Yes | |
data.id | string (uuid) | Yes | |
data.kind | "collection" | "prompt_generation" | "deletion" | "audit" | "optimization" | Yes | |
data.phase | "researching" | "drafting" | "validating" | "collecting" | "analyzing" | "exporting" | "purging" | null | No | |
data.poll_url | string (uri) | Yes | Send an authenticated GET request to this URL to read the current result. |
data.progress | number | Yes | |
data.reserved_units | integer | Yes | Credits held for the run. |
data.result | object | object | object | object | object | null | Yes | |
data.result.accepted | integer | Conditional | |
data.result.answers | array of object | No | |
data.result.answers[].answer_text | string | Conditional | |
data.result.answers[].answer_text_truncated | boolean | Conditional | |
data.result.answers[].brand_cited | boolean | Conditional | |
data.result.answers[].brand_mentioned | boolean | null | Conditional | |
data.result.answers[].citations | array of object | Conditional | |
data.result.answers[].citations[].order | integer | Conditional | |
data.result.answers[].citations[].url | string | Conditional | |
data.result.answers[].observation_id | string | Conditional | |
data.result.evidence_cursor | string | null | Conditional | |
data.result.failed | integer | Conditional | |
data.result.kind | "collection" | Conditional | |
data.result.observation_ids | array of string (uuid) | Conditional | |
data.result.observations | array of object | No | |
data.result.observations[].applied_location | object | null | Conditional | |
data.result.observations[].applied_location.city | string | null | No | |
data.result.observations[].applied_location.country | string | null | No | |
data.result.observations[].applied_location.granularity | "country" | "region" | "city" | "postal" | "coordinates" | Conditional | |
data.result.observations[].applied_location.latitude | number | null | No | |
data.result.observations[].applied_location.longitude | number | null | No | |
data.result.observations[].applied_location.postal_code | string | null | No | |
data.result.observations[].applied_location.region | string | null | No | |
data.result.observations[].observation_id | string (uuid) | Conditional | |
data.result.details | array of object | No | |
data.result.details[].rationale | string | Conditional | |
data.result.details[].suggestion_index | integer | Conditional | |
data.result.details[].template_version | string | Conditional | |
data.result.details[].warnings | array of string | Conditional | |
data.result.kind | "prompt_generation" | Conditional | |
data.result.outcome | object | No | Explains why the result contains no suggestions. |
data.result.outcome.reason | "no_eligible_candidates" | "web_evidence_missing" | Conditional | Whether no candidate qualified or usable web evidence was missing. |
data.result.outcome.web_evidence_used | boolean | Conditional | Whether the generation received a reply with confirmed web activity. |
data.result.suggestions | array of object | Conditional | |
data.result.suggestions[].action | "create" | Conditional | |
data.result.suggestions[].allow_similar | boolean | No | Save the prompt even if you already track the same question or a differently worded question with the same meaning. |
data.result.suggestions[].brand_id | string (uuid) | null | No | |
data.result.suggestions[].category_ids | array of string | null | Conditional | |
data.result.suggestions[].intent | "discovery" | "recommendation" | "evaluation" | "pricing" | "comparison" | "alternatives" | "use_case" | "transaction" | "local" | "troubleshooting" | "trust" | "informational" | Conditional | |
data.result.suggestions[].market | object | Conditional | |
data.result.suggestions[].market.city | string | null | null | No | |
data.result.suggestions[].market.country | string | Conditional | |
data.result.suggestions[].market.language | string | Conditional | |
data.result.suggestions[].market.region | string | null | null | No | |
data.result.suggestions[].tags | array of string | null | No | |
data.result.suggestions[].text | string | Conditional | |
data.result.backup_expiry_at | string (date-time) | null | Conditional | |
data.result.kind | "deletion" | Conditional | |
data.result.purged | boolean | Conditional | |
data.result.resource_id | string (uuid) | Conditional | |
data.result.retained_record_reasons | array of string | Conditional | |
data.result.agent_readiness | object | No | Our defined website access criteria for AI agents at checked_at (not a universal AI-readiness standard; no indexing, ranking, citation or answer outcome is measured). |
data.result.agent_readiness.checked_at | string (date-time) | Conditional | |
data.result.agent_readiness.checks | array of object | Conditional | |
data.result.agent_readiness.checks[].assessment | "verified" | "detected" | "not_detected" | "not_assessed" | No | |
data.result.agent_readiness.checks[].category | "core" | "robots" | "content" | "discovery" | "protocol" | Conditional | |
data.result.agent_readiness.checks[].evidence | array of object | Conditional | |
data.result.agent_readiness.checks[].evidence[].method | string | Conditional | |
data.result.agent_readiness.checks[].evidence[].observed | string | Conditional | |
data.result.agent_readiness.checks[].evidence[].url | string | Conditional | |
data.result.agent_readiness.checks[].id | string | Conditional | |
data.result.agent_readiness.checks[].label | string | Conditional | |
data.result.agent_readiness.checks[].limitations | array of string | Conditional | |
data.result.agent_readiness.checks[].recommendation | string | null | Conditional | |
data.result.agent_readiness.checks[].reference | string | No | |
data.result.agent_readiness.checks[].scored | boolean | Conditional | |
data.result.agent_readiness.checks[].spec_version | string | No | |
data.result.agent_readiness.checks[].status | "pass" | "fail" | "unknown" | "not_applicable" | Conditional | |
data.result.agent_readiness.limitations | array of string | Conditional | |
data.result.agent_readiness.scope | "essential" | "full" | Conditional | |
data.result.agent_readiness.score | object | Conditional | eligible = passed + failed + unknown over applicable scored checks; value = 100 * passed / (passed + failed), or null when no scored check was conclusive. |
data.result.agent_readiness.score.eligible | integer | Conditional | |
data.result.agent_readiness.score.failed | integer | Conditional | |
data.result.agent_readiness.score.passed | integer | Conditional | |
data.result.agent_readiness.score.unknown | integer | Conditional | |
data.result.agent_readiness.score.value | number | null | Conditional | |
data.result.agent_readiness.status | "completed" | "partial" | "not_assessed" | Conditional | |
data.result.agent_readiness.version | string | Conditional | |
data.result.budget_exhausted | boolean | No | |
data.result.business_facts | object | No | |
data.result.business_facts.locations | array of object | Conditional | |
data.result.business_facts.locations[].location_id | string (uuid) | null | Conditional | |
data.result.business_facts.locations[].score | object | Conditional | |
data.result.business_facts.locations[].score.fields | object | Conditional | |
data.result.business_facts.locations[].score.fields.[key] | number | null | No | Value for each key. |
data.result.business_facts.locations[].score.matched_fields | integer | Conditional | |
data.result.business_facts.locations[].score.mismatched_fields | integer | Conditional | |
data.result.business_facts.locations[].score.overall | number | null | Conditional | |
data.result.business_facts.omitted_sources | integer | Conditional | |
data.result.business_facts.score | object | Conditional | |
data.result.business_facts.score.fields | object | Conditional | |
data.result.business_facts.score.fields.[key] | number | null | No | Value for each key. |
data.result.business_facts.score.matched_fields | integer | Conditional | |
data.result.business_facts.score.mismatched_fields | integer | Conditional | |
data.result.business_facts.score.overall | number | null | Conditional | |
data.result.business_facts.sources | array of object | Conditional | |
data.result.business_facts.sources[].fields | array of object | Conditional | |
data.result.business_facts.sources[].fields[].expected | string | array of string | object | null | Conditional | |
data.result.business_facts.sources[].fields[].expected.[key] | string | number | array of string | No | Value for each key. |
data.result.business_facts.sources[].fields[].field | string | Conditional | |
data.result.business_facts.sources[].fields[].observed | string | array of string | object | null | Conditional | |
data.result.business_facts.sources[].fields[].observed.[key] | string | number | array of string | No | Value for each key. |
data.result.business_facts.sources[].fields[].status | "matched" | "mismatched" | "not_found" | Conditional | |
data.result.business_facts.sources[].final_url | string | null | Conditional | |
data.result.business_facts.sources[].http_status | integer | null | Conditional | |
data.result.business_facts.sources[].location_id | string (uuid) | null | Conditional | |
data.result.business_facts.sources[].source | "supplied" | "profile" | "citation" | Conditional | |
data.result.business_facts.sources[].status | "matched" | "mismatched" | "not_found" | "could_not_fetch" | Conditional | |
data.result.business_facts.sources[].url | string | Conditional | |
data.result.completeness | "preliminary" | "partial" | "complete" | "blocked" | No | |
data.result.content_coverage_note | string | No | |
data.result.crawler_access | object | No | |
data.result.crawler_access.assessed | integer | Conditional | |
data.result.crawler_access.eligible | integer | Conditional | |
data.result.crawler_access.note | string | Conditional | |
data.result.crawler_access.pages | array of object | Conditional | |
data.result.crawler_access.pages[].agents | array of object | Conditional | |
data.result.crawler_access.pages[].agents[].access | "allowed" | "blocked_by_robots" | "blocked_by_firewall" | "challenged" | "rate_limited" | "unknown" | Conditional | |
data.result.crawler_access.pages[].agents[].agent | string | Conditional | |
data.result.crawler_access.pages[].agents[].evidence | object | Conditional | |
data.result.crawler_access.pages[].agents[].evidence.body_size_ratio | number | null | Conditional | |
data.result.crawler_access.pages[].agents[].evidence.browser_status | integer | null | Conditional | |
data.result.crawler_access.pages[].agents[].evidence.crawler_status | integer | null | Conditional | |
data.result.crawler_access.pages[].agents[].evidence.marker | "challenge_page" | "block_page" | "block_redirect" | "empty_or_short_body" | null | Conditional | |
data.result.crawler_access.pages[].agents[].purpose | "search" | "user_fetch" | "training" | Conditional | |
data.result.crawler_access.pages[].agents[].robots_access | "allowed" | "blocked" | null | No | Whether robots.txt allows this crawler on this page. HTTP 4xx responses other than 429 mean allowed. The value is null if the rules could not be checked. |
data.result.crawler_access.pages[].agents[].visibility_risk | boolean | Conditional | |
data.result.crawler_access.pages[].url | string | Conditional | |
data.result.crawler_access.score | number | null | Conditional | |
data.result.findings | array of object | Conditional | |
data.result.findings[].code | string | null | Conditional | |
data.result.findings[].confidence | number | Conditional | |
data.result.findings[].evidence | string | Conditional | |
data.result.findings[].id | string (uuid) | Conditional | |
data.result.findings[].recommendation | string | Conditional | |
data.result.findings[].severity | "critical" | "high" | "medium" | "low" | "info" | Conditional | |
data.result.findings[].url | string (uri) | Conditional | |
data.result.findings[].verification | string | Conditional | |
data.result.first_result_at | string (date-time) | null | No | |
data.result.kind | "audit" | Conditional | |
data.result.next_cursor | string | null | Conditional | |
data.result.pages_billed | integer | No | Pages counted toward the final charge. |
data.result.pages_checked | integer | Conditional | |
data.result.pages_discovered | integer | No | |
data.result.pages_skipped | integer | Conditional | |
data.result.profile | "instant" | "detailed" | No | |
data.result.schema_consistency | object | No | |
data.result.schema_consistency.pages | array of object | Conditional | |
data.result.schema_consistency.pages[].fields | array of object | Conditional | |
data.result.schema_consistency.pages[].fields[].basis | "visible" | "profile" | Conditional | |
data.result.schema_consistency.pages[].fields[].expected | string | array of string | object | null | Conditional | |
data.result.schema_consistency.pages[].fields[].expected.[key] | string | number | array of string | No | Value for each key. |
data.result.schema_consistency.pages[].fields[].field | string | Conditional | |
data.result.schema_consistency.pages[].fields[].observed | string | array of string | object | null | Conditional | |
data.result.schema_consistency.pages[].fields[].observed.[key] | string | number | array of string | No | Value for each key. |
data.result.schema_consistency.pages[].fields[].status | "matched" | "mismatched" | "not_found" | Conditional | |
data.result.schema_consistency.pages[].issues | array of object | Conditional | |
data.result.schema_consistency.pages[].issues[].code | "missing_local_business" | "missing_required_properties" | "differs_from_visible" | "differs_from_profile" | "conflicting_blocks" | Conditional | |
data.result.schema_consistency.pages[].issues[].compared | array of object | object | object | Conditional | |
data.result.schema_consistency.pages[].issues[].compared[].expected | string | array of string | object | null | Conditional | |
data.result.schema_consistency.pages[].issues[].compared[].expected.[key] | string | number | array of string | No | Value for each key. |
data.result.schema_consistency.pages[].issues[].compared[].field | string | Conditional | |
data.result.schema_consistency.pages[].issues[].compared[].observed | string | array of string | object | null | Conditional | |
data.result.schema_consistency.pages[].issues[].compared[].observed.[key] | string | number | array of string | No | Value for each key. |
data.result.schema_consistency.pages[].issues[].compared[].basis | "visible" | "profile" | Conditional | |
data.result.schema_consistency.pages[].issues[].compared[].status | "matched" | "mismatched" | "not_found" | Conditional | |
data.result.schema_consistency.pages[].issues[].fields | array of string | Conditional | |
data.result.schema_consistency.pages[].location_id | string (uuid) | null | Conditional | |
data.result.schema_consistency.pages[].markup | "json_ld" | "microdata" | null | Conditional | |
data.result.schema_consistency.pages[].schema_type | string | null | Conditional | |
data.result.schema_consistency.pages[].url | string | Conditional | |
data.result.schema_consistency.pages_with_issues | integer | Conditional | |
data.result.schema_consistency.score | number | null | Conditional | |
data.result.skipped_reasons | array of string | No | |
data.result.approval_expires_at | string (date-time) | null | Conditional | |
data.result.approval_id | string (uuid) | null | Conditional | |
data.result.artifact_download_url | string (uri) | null | Conditional | |
data.result.artifact_sha256 | string | null | Conditional | |
data.result.diff | string | null | Conditional | |
data.result.external_revision | string | null | null | Conditional | |
data.result.kind | "optimization" | Conditional | |
data.result.synthetic | boolean | No | |
data.result.target_url | string (uri) | Conditional | |
data.result.verification_findings | array of object | Conditional | |
data.result.verification_findings[].code | string | null | Conditional | |
data.result.verification_findings[].confidence | number | Conditional | |
data.result.verification_findings[].evidence | string | Conditional | |
data.result.verification_findings[].id | string (uuid) | Conditional | |
data.result.verification_findings[].recommendation | string | Conditional | |
data.result.verification_findings[].severity | "critical" | "high" | "medium" | "low" | "info" | Conditional | |
data.result.verification_findings[].url | string (uri) | Conditional | |
data.result.verification_findings[].verification | string | Conditional | |
data.revision | integer | Yes | |
data.state | "queued" | "running" | "awaiting_approval" | "approved" | "executing" | "verifying" | "completed" | "partial" | "failed" | "cancelled" | "rejected" | "stale_approval" | Yes | |
data.updated_at | string (date-time) | Yes | |
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. |
| Name | Type | Required | Description |
|---|---|---|---|
data | object | Yes | The requested result. See the fields below for its contents. |
data.billed_units | integer | No | The credits charged for this work. |
data.brand_id | string | Yes | Identifies the brand this result belongs to. |
data.completed_pages | integer | No | |
data.due_pages | integer | No | |
data.next_offset | integer | null | No | |
data.pages | array of object | No | |
data.pages[].brand_mentioned_on_page | boolean | null | No | |
data.pages[].changed_since_previous_check | boolean | null | No | |
data.pages[].citing_answers | integer | No | |
data.pages[].classification_basis | "curated_domain" | "url_pattern" | "page_content" | "unknown" | No | |
data.pages[].classification_confidence | number | No | |
data.pages[].competitors_mentioned_on_page | object | No | |
data.pages[].competitors_mentioned_on_page.[key] | boolean | null | No | Value for each key. |
data.pages[].domain | string | No | |
data.pages[].last_checked_at | string | No | |
data.pages[].page_id | string | Conditional | |
data.pages[].page_status | "in_progress" | "live" | "gone" | Conditional | |
data.pages[].page_type | "blog" | "directory" | "review_site" | "news" | "forum" | "brand_site" | "competitor_site" | "marketplace" | "docs" | "social" | "press_release" | "comparison" | "roundup" | "guide" | "institution" | "reference" | "other" | "unknown" | "video" | No | |
data.pages[].page_type_confidence | number | null | No | |
data.pages[].source_category | "directory" | "review_site" | "local_directory" | "industry_directory" | "forum" | "social" | "video" | "news" | "local_news" | "comparison" | "marketplace" | "brand_site" | "competitor_site" | "docs" | "press" | "other" | No | |
data.pages[].url | string | Conditional | |
data.run_id | string | Yes | Identifies the run. Keep any prefix when using it in a request. |
data.status | "in_progress" | "completed" | "cancelled" | Yes | |
data.total_pages | integer | No | |
data.workflow | "cited_page_sweep" | "cited_page_labelling" | Yes | The workflow selected for this run or estimate. |
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 - HTTP 401
unauthenticated - HTTP 402
quota_exceeded - HTTP 403
forbidden - HTTP 404
not_found - HTTP 409
conflict - HTTP 412
precondition_failed - HTTP 422
validation_error - HTTP 429
rate_limited - HTTP 500
internal_error - HTTP 503
source_pending,feature_not_offered