AI search topics
Read search topic results
Read the ranked topics and example questions for the selected market and month. An empty topic list includes a reason.
- Path
run_idstarts withai_search_topics:.
Authentication and access
- Authentication
- Bearer API key
- Scopes
- prompts:read
- Roles
- approver, editor, owner, publisher, service, viewer
- Plans
- Optimizer
- Credits
- No credit charge.
Parameters
| Name | Where | Type | Required | Description |
|---|---|---|---|---|
run_id | path | string | Yes |
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 GET "$AEO_API_BASE_URL/v2/runs/$RUN_ID" \
-H "Authorization: Bearer $AEO_API_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_get_runs_run_id(
run_id=environ["RUN_ID"],
)
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.v2GetRunsRunId(
process.env.RUN_ID!,
);
console.log(response.body);Responses
For a job with data.state, queued and running mean the job is still in progress. Read the result at completed or partial. Stop polling at failed or cancelled.
HTTP 200
Read an AI search topics run
application/json
Response fields are listed below.
| 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 | "ai_search_topics" | Yes | |
data.phase | "researching" | "drafting" | "validating" | "collecting" | "analyzing" | "exporting" | "purging" | null | Yes | |
data.poll_url | string (uri-reference) | 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 | null | Yes | |
data.result.estimate | object | Conditional | |
data.result.estimate.confidence | "low" | "insufficient" | Conditional | |
data.result.estimate.confidence_reason | "uncalibrated" | "period_not_covered" | "insufficient_sample" | "score_not_interpretable" | Conditional | |
data.result.estimate.label_language | "en" | Conditional | |
data.result.estimate.language_scope | "exact" | "unfiltered" | Conditional | |
data.result.estimate.market | object | Conditional | |
data.result.estimate.market.country | "US" | "DZ" | Conditional | |
data.result.estimate.market.language | "en-US" | "fr-DZ" | Conditional | |
data.result.estimate.measured_population_language | "en" | "mixed" | "unknown" | Conditional | |
data.result.estimate.method | "interest_estimate" | "relative_interest_index" | Conditional | |
data.result.estimate.method_version | string | Conditional | |
data.result.estimate.period | object | Conditional | |
data.result.estimate.period.data_vintage | string (date) | null | Conditional | |
data.result.estimate.period.end | string (date) | Conditional | |
data.result.estimate.period.granularity | "month" | Conditional | |
data.result.estimate.period.start | string (date) | Conditional | |
data.result.estimate.platform_attribution | "none" | "unknown" | "partial" | Conditional | |
data.result.estimate.platforms_covered | array of "chatgpt" | "gemini" | "claude" | "perplexity" | "google" | "bing" | "brave" | "meta_ai" | "grok" | "universal" | Conditional | |
data.result.estimate.reference_set | object | object | Conditional | |
data.result.estimate.reference_set.kind | "reference_list" | "reference_set" | Conditional | |
data.result.estimate.reference_set.ranked_count | integer | Conditional | |
data.result.estimate.reference_set.size | integer | null | Conditional | |
data.result.estimate.reference_set.version | string | Conditional | |
data.result.estimate.reference_set.source_truncated | boolean | Conditional | |
data.result.estimate.sample | object | object | Conditional | |
data.result.estimate.sample.notes | array of string | Conditional | |
data.result.estimate.sample.unit | "topic_interest_monthly" | "topic_interest_score" | Conditional | |
data.result.estimate.sample.score_base | integer | null | Conditional | |
data.result.estimate.source_label | "estimate" | Conditional | |
data.result.period | object | Conditional | |
data.result.period.data_vintage | string (date) | null | Conditional | |
data.result.period.end | string (date) | Conditional | |
data.result.period.granularity | "month" | Conditional | |
data.result.period.start | string (date) | Conditional | |
data.result.reason | "period_not_covered" | "insufficient_sample" | "score_not_interpretable" | null | Conditional | |
data.result.synthetic | boolean | Conditional | |
data.result.topics | array of object | Conditional | |
data.result.topics[].example_prompts | array of object | Conditional | |
data.result.topics[].example_prompts[].provenance | "synthetic" | Conditional | |
data.result.topics[].example_prompts[].text | string | Conditional | |
data.result.topics[].metric | object | object | Conditional | |
data.result.topics[].metric.relative_index | integer | Conditional | |
data.result.topics[].metric.interest_index | number | Conditional | Relative interest index for the month shown. |
data.result.topics[].platforms | array of object | No | |
data.result.topics[].platforms[].confidence | "low" | Conditional | |
data.result.topics[].platforms[].platform | "chatgpt" | "google_ai_overviews" | Conditional | |
data.result.topics[].platforms[].relative_index | integer | Conditional | |
data.result.topics[].platforms[].trend | "up" | "flat" | "down" | null | Conditional | |
data.result.topics[].rank | integer | Conditional | |
data.result.topics[].topic | string | Conditional | |
data.result.topics[].topic_id | string (uuid) | Conditional | |
data.result.topics[].trend | object | Conditional | |
data.result.topics[].trend.comparison_period | object | null | Conditional | |
data.result.topics[].trend.comparison_period.end | string (date) | Conditional | |
data.result.topics[].trend.comparison_period.granularity | "month" | Conditional | |
data.result.topics[].trend.comparison_period.start | string (date) | Conditional | |
data.result.topics[].trend.direction | "up" | "down" | "flat" | "not_measured" | Conditional | |
data.result.topics[].trend.reason | "comparison_not_covered" | "comparison_value_zero" | "rebased_scores" | null | Conditional | |
data.revision | integer | Yes | |
data.run_id | string | Yes | Identifies the run. Keep any prefix when using it in a request. |
data.state | "queued" | "running" | "awaiting_approval" | "approved" | "executing" | "verifying" | "completed" | "partial" | "failed" | "cancelled" | "rejected" | "stale_approval" | Yes | |
data.status | "queued" | "running" | "awaiting_approval" | "approved" | "executing" | "verifying" | "completed" | "partial" | "failed" | "cancelled" | "rejected" | "stale_approval" | Yes | |
data.updated_at | string (date-time) | Yes | |
data.workflow | "ai_search_topics" | 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 403
forbidden - HTTP 404
not_found - HTTP 422
validation_error - HTTP 429
rate_limited