Skip to content

Content optimization API

Turn recommendations into proposed edits. Review them with evidence, approve a specific revision, and read the approved content through the API.

Home / Products / Content optimization API

Take a recommendation through editorial review

Content optimization gives teams a way to prepare and review edits for AI search. Start with a recommendation for a page you control or assemble a draft from saved source passages. A passage is an extract from a page or document. Developers can use the API to put the evidence, draft, and review decision into the tools their teams already use.

Agencies can send a client a proposed change with the original finding and the evidence behind it. SEO and content teams can give writers a starting point and ask reviewers to check specific claims before publication. Product teams can build an interface that shows editors the draft and gives reviewers a specific revision to approve. The publishing team decides what goes on the website.

Find a recommendation and read its evidence

Use GET /v2/recommendations with view=diagnosis to find a recommendation. Filter by type, such as content, citation, technical, local, or debugger for diagnostic findings. Each recommendation includes an ID, a priority, an effort estimate of small, medium, or large, and any evidence IDs. It describes the issue to investigate, the expected impact, and how to verify a change.

Use the board view to find work items for a brand. Filter the board by status, channel, or priority. An agency can use that view to find open work for a client before choosing the page and recommendation to use for a draft.

Set AEO_API_BASE_URL to https://api.aeoapi.dev and BRAND_ID to your brand ID. Send a key with recommendations:read from your server. This request reads content recommendations.

curl --fail-with-body --get "$AEO_API_BASE_URL/v2/recommendations" \
  -H "Authorization: Bearer $AEO_API_KEY" \
  --data-urlencode "brand_id=$BRAND_ID" \
  --data-urlencode "view=diagnosis" \
  --data-urlencode "type=content"

Generate a proposed edit and record a decision

  1. Choose the recommendation IDs and the page you want to revise. Call PATCH /v2/recommendations with section=act and workflow=optimization. Send brand_id, recommendation_ids, target_url, and max_units to cap credits. Send the required request key header shown in the operation reference. If you retry, resend the same key and body.
  2. Read the job with GET /v2/recommendations and view=action. Use data.v2_action_id from the start response as action_id. The result can include the target URL, the proposed changes, and verification findings. Use the state to tell when the job is waiting for approval.
  3. Have an approver or owner send the decision to PATCH /v2/recommendations with section=decide, action_id, decision, expected_revision, and reason. Send a request key for this decision. On approval, also send the artifact_sha256, a fingerprint that identifies the proposed content the reviewer saw.

Keep the action ID and revision with the review in your application. After approval, read the approved draft for your team to publish.

Assemble and revise an editorial draft

Use POST /v2/passages/search to find relevant extracts in saved content. Send a brand ID and a search query. The response can include the passage ID, text, source URL, revision, and relevance score. The default limit is 10 and you can request up to 40 results. Read the source alongside the extract when you use it to support a claim.

Use PUT /v2/brands/{brand_id}/drafts/{draft_id} to create an editorial draft in a supported format such as a blog post. Supply the board item ID, title, primary keyword, keyword records, and sections with headings and passage IDs. The request accepts 1 to 12 sections and 1 to 20 keyword records.

Read GET /v2/brands/{brand_id}/drafts/{draft_id} for the draft content, source passages, status, and revision. Use PATCH /v2/brands/{brand_id}/drafts/{draft_id} to edit the title and body using expected_revision. Submit the current revision with transition=submit. To approve it, send transition=approve, the expected revision, and the content_sha256 returned for the content under review.

When you build the review screen, show the revision beside the draft and put each source passage next to the claim it supports. Use the source URL to let reviewers check the extract in context. If the text needs work, the reviewer can request changes. The writer can then revise the draft and send the updated version for another review.

Check a saved revision before publication

For a check against saved evidence, use PUT /v2/brands/{brand_id}/evidence/{kind}/{key} to store the draft and the questions as fixed versions with prepublish_draft and prepublish_prompts. Include the basis, reference, and expiry for your right to use the content. Add prepublish_competitors for licensed comparison passages. With prepublish_capture, you can supply both the original page markup and the markup after it renders, from the same revision and capture context.

Use POST /v2/runs with workflow=prepublish_review. Send the brand ID, the draft and prompt set revision IDs, and any saved comparison or capture IDs you want to include. Use the required request key header. Follow the poll URL with GET /v2/runs/{run_id} to review the supporting passages, any differences in facts between captures, and missing evidence. Use the retrieval simulator guide to choose between that review and a benchmark that compares which passages rank higher for selected questions.

For example, a team revising a product comparison can check whether the new copy supports a claim about plan features. It can also compare the original and rendered markup to see whether the same facts are present in both. The reviewer can ask for changes before the publishing team uses the draft.

When comparing two versions of a page, keep the questions and comparison inputs the same. Read the sample and exclusion counts alongside a simulated win rate. A missing score means too few eligible comparisons. A score of zero means the paragraph had enough comparisons and ranked above the best competing passage in none of them.

Plan access and what to measure after publication

Optimizer costs $399 per month and includes draft generation from recommendations, editorial draft review, and the prepublication checks described here. Both plans can read recommendations. Read requests use zero credits. Draft generation and other processing can use credits.

Approval records the decision. Your team or publishing integration applies the edit. Simulated passage rankings apply to the chosen questions and evidence. To measure what happened after publication, collect the same questions again with AI visibility tracking and inspect cited pages with Citation intelligence. Use Answer accuracy to check whether collected answers repeat a claim you addressed.

Questions

Can I read recommendations on Analyzer?

Yes. Both plans can read recommendations. You need Optimizer to generate a draft from a recommendation and send it through review. Compare recommendations and draft access by plan.

How do I start a draft for an existing page?

Choose the recommendation IDs and the page URL. Send them to the recommendations operation with section set to act, the draft workflow, and a credit cap. See the request for a draft from recommendations.

Can I make changes before I submit an editorial draft?

Yes. Update the title and body with the current revision number. Then submit the new revision for review. See the draft update and review transitions.

Does approving a draft publish it?

Your team or publishing integration handles publication. Approval records the revision and content your reviewer approved. See how to read an approved draft.

What evidence can I bring to a prepublication check?

Save a draft and its questions. You can also include licensed competitor passages for a comparison, or raw and rendered HTML from the same revision to check for differences in facts. See how to prepare prepublication evidence.

Does the retrieval simulator predict citations?

It compares how passages rank in a simulation for the prompts and pages you supplied. Read the comparison coverage and exclusions when interpreting the result. See how to interpret the simulated win rate.