Skip to content

    Run AI search topics estimates

    Get ranked topic estimates for a category, market, and month. Use the comparison trends and example questions to decide what to track.

    This workflow is available on Optimizer. Analyzer accounts, including trials, receive HTTP 403. Set your API base URL and key before sending requests.

    Estimate the credits

    Use POST /v2/runs with estimate set to true and workflow set to ai_search_topics. Your key needs prompts:write, an editor, owner, or service role, and access to an active brand.

    Use a country and language for market. Set period.start to the first day of a complete UTC calendar month and period.end to the first day of the next month. Use YYYY-MM-DD for both dates.

    Save the body as topics-estimate.json. Replace the example brand ID, category, market, and month with your own values.

    {
      "estimate": true,
      "workflow": "ai_search_topics",
      "brand_id": "00000000-0000-4000-8000-000000000001",
      "category_id": "gcid:dentist",
      "market": {
        "country": "US",
        "language": "en-US"
      },
      "period": {
        "start": "2026-09-01",
        "end": "2026-10-01"
      }
    }
    curl --fail-with-body "$AEO_API_BASE_URL/v2/runs" \
      -H "Authorization: Bearer $AEO_API_KEY" \
      -H "Content-Type: application/json" \
      --data-binary @topics-estimate.json

    An estimate uses zero credits and creates no run. Check data.charge_units, data.reserve_units, and data.expires_at before starting. If the API returns HTTP 422 for unsupported coverage, check field_errors and update the affected input.

    Start the run

    Use POST /v2/runs with the same brand and workflow. In topics-start.json, use the returned data.estimate_id and set max_units to at least data.reserve_units. Starting a run requires a billable account.

    {
      "workflow": "ai_search_topics",
      "brand_id": "00000000-0000-4000-8000-000000000001",
      "estimate_id": "00000000-0000-4000-8000-000000000002",
      "max_units": 20
    }

    Set TOPICS_REQUEST_KEY to a new value of 8 to 128 visible ASCII characters. When you retry, send the same key and request body.

    curl --fail-with-body "$AEO_API_BASE_URL/v2/runs" \
      -H "Authorization: Bearer $AEO_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $TOPICS_REQUEST_KEY" \
      --data-binary @topics-start.json

    HTTP 202 returns data.run_id, data.status, and data.poll_url. The Location header matches the poll URL.

    Poll the run

    Use GET /v2/runs/{run_id} with a key that has prompts:read. Set TOPICS_RUN_ID to the full data.run_id, including the ai_search_topics: prefix. Polling uses zero credits.

    curl --fail-with-body "$AEO_API_BASE_URL/v2/runs/$TOPICS_RUN_ID" \
      -H "Authorization: Bearer $AEO_API_KEY"

    Wait between requests while the run is in progress. Read data.result when the run completes.

    Read the estimates

    Read data.result.period for the month and data.result.estimate.confidence for the confidence level. Each item in data.result.topics includes a topic label, rank, estimated interest, comparison trend, and example questions.

    Use the rank and metric to compare topics within the returned result. The metrics estimate relative interest. Review and edit questions from example_prompts before saving them as prompts to track.

    A completed run can return an empty topics list. Read data.result.reason for the explanation. An empty result uses zero credits.

    Request platform estimates

    To request estimates for both ChatGPT and Google AI Overviews, add "platforms": ["chatgpt", "google_ai_overviews"] to the estimate request. To request a single platform, set platform_scope to its ID and omit platforms. Omit both fields for the overall estimate.

    Check data.platform_costs for the credit breakdown. Use the total in data.reserve_units to set max_units when you start the run.

    Each item in data.result.topics can include a platforms array. Each entry includes the platform ID, a relative_index from 0 to 100, a trend that can be null, and a confidence level. Use the index to compare topics within the same platform. Display only the entries returned for that topic.