Skip to content

    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.

    GET /v2/runs/{run_id}

    • Path run_id starts with ai_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

    Request parameters
    NameWhereTypeRequiredDescription
    run_idpathstringYes

    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.

    HTTP 200 response fields 1
    NameTypeRequiredDescription
    dataobjectYesThe requested result. See the fields below for its contents.
    data.billed_unitsintegerYesThe credits charged for this work.
    data.created_atstring (date-time)Yes
    data.errorobject | nullYes
    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_ofstring (uuid)NoID of your existing prompt.
    data.error.field_errorsarray of objectNo
    data.error.field_errors[].fieldstring | nullConditional
    data.error.field_errors[].messagestringConditional
    data.error.messagestringConditional
    data.error.request_idstring (uuid)Conditional
    data.error.retryablebooleanConditional
    data.error.similar_promptsarray of objectNoOther matching prompts in your library.
    data.error.similar_prompts[].prompt_idstring (uuid)Conditional
    data.estimated_unitsintegerYes
    data.idstring (uuid)Yes
    data.kind"ai_search_topics"Yes
    data.phase"researching" | "drafting" | "validating" | "collecting" | "analyzing" | "exporting" | "purging" | nullYes
    data.poll_urlstring (uri-reference)YesSend an authenticated GET request to this URL to read the current result.
    data.progressnumberYes
    data.reserved_unitsintegerYesCredits held for the run.
    data.resultobject | nullYes
    data.result.estimateobjectConditional
    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.marketobjectConditional
    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_versionstringConditional
    data.result.estimate.periodobjectConditional
    data.result.estimate.period.data_vintagestring (date) | nullConditional
    data.result.estimate.period.endstring (date)Conditional
    data.result.estimate.period.granularity"month"Conditional
    data.result.estimate.period.startstring (date)Conditional
    data.result.estimate.platform_attribution"none" | "unknown" | "partial"Conditional
    data.result.estimate.platforms_coveredarray of "chatgpt" | "gemini" | "claude" | "perplexity" | "google" | "bing" | "brave" | "meta_ai" | "grok" | "universal"Conditional
    data.result.estimate.reference_setobject | objectConditional
    data.result.estimate.reference_set.kind"reference_list" | "reference_set"Conditional
    data.result.estimate.reference_set.ranked_countintegerConditional
    data.result.estimate.reference_set.sizeinteger | nullConditional
    data.result.estimate.reference_set.versionstringConditional
    data.result.estimate.reference_set.source_truncatedbooleanConditional
    data.result.estimate.sampleobject | objectConditional
    data.result.estimate.sample.notesarray of stringConditional
    data.result.estimate.sample.unit"topic_interest_monthly" | "topic_interest_score"Conditional
    data.result.estimate.sample.score_baseinteger | nullConditional
    data.result.estimate.source_label"estimate"Conditional
    data.result.periodobjectConditional
    data.result.period.data_vintagestring (date) | nullConditional
    data.result.period.endstring (date)Conditional
    data.result.period.granularity"month"Conditional
    data.result.period.startstring (date)Conditional
    data.result.reason"period_not_covered" | "insufficient_sample" | "score_not_interpretable" | nullConditional
    data.result.syntheticbooleanConditional
    data.result.topicsarray of objectConditional
    data.result.topics[].example_promptsarray of objectConditional
    data.result.topics[].example_prompts[].provenance"synthetic"Conditional
    data.result.topics[].example_prompts[].textstringConditional
    data.result.topics[].metricobject | objectConditional
    data.result.topics[].metric.relative_indexintegerConditional
    data.result.topics[].metric.interest_indexnumberConditionalRelative interest index for the month shown.
    data.result.topics[].platformsarray of objectNo
    data.result.topics[].platforms[].confidence"low"Conditional
    data.result.topics[].platforms[].platform"chatgpt" | "google_ai_overviews"Conditional
    data.result.topics[].platforms[].relative_indexintegerConditional
    data.result.topics[].platforms[].trend"up" | "flat" | "down" | nullConditional
    data.result.topics[].rankintegerConditional
    data.result.topics[].topicstringConditional
    data.result.topics[].topic_idstring (uuid)Conditional
    data.result.topics[].trendobjectConditional
    data.result.topics[].trend.comparison_periodobject | nullConditional
    data.result.topics[].trend.comparison_period.endstring (date)Conditional
    data.result.topics[].trend.comparison_period.granularity"month"Conditional
    data.result.topics[].trend.comparison_period.startstring (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" | nullConditional
    data.revisionintegerYes
    data.run_idstringYesIdentifies 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_atstring (date-time)Yes
    data.workflow"ai_search_topics"YesThe workflow selected for this run or estimate.
    metaobjectYesInformation about this response, including any warnings or pagination details.
    meta.as_ofstring (date-time)YesThe point in time that the response represents.
    meta.cohort_versionstring | nullNoIdentifies the version of the group used to calculate the results.
    meta.collected_atstring (date-time) | nullYesWhen the data was collected, if available.
    meta.metric_versionstring | nullNoThe version of the metric definition used for these results.
    meta.next_cursorstring | nullYesWhen present, pass this value as cursor to request the next page with the same filters.
    meta.next_refresh_atstring (date-time) | nullYes
    meta.request_idstring (uuid)YesKeep this ID when reporting a problem with the request.
    meta.restricted_fieldsarray of stringNoFields that your current access does not allow the API to return.
    meta.rights_filteredbooleanYesIndicates whether access rights affected the returned data.
    meta.schema_version"1.0"YesThe version of the response format.
    meta.stalebooleanYes
    meta.warningsarray of stringYesRead these notes for limitations that affect the results.

    Errors

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

    AI search topics reference