Recommendations and visibility analyst
Read a proposed action
Read the approval state, approver and approved credit cap, along with any draft or run the action produced.
- Query
viewisaction. - Query
action_idstarts withanalyst_action:.
Authentication and access
- Authentication
- Bearer API key
- Scopes
- analytics:read
- Roles
- approver, editor, owner, publisher, service, viewer
- Plans
- Optimizer, Analyzer
- Credits
- No credit charge.
- Action kind content_draft. Scopes analytics:read, optimizations:read. Plans Optimizer.
- FAQ drafts also require this permission. Scope
prompts:read. - Action kind fresh_check. Scopes analytics:read, collections:read. Plans Optimizer, Analyzer.
Parameters
| Name | Where | Type | Required | Description |
|---|---|---|---|---|
brand_id | query | string (uuid) | Yes | |
view | query | "action" | Yes | |
action_id | query | 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 --get "$AEO_API_BASE_URL/v2/recommendations" \
-H "Authorization: Bearer $AEO_API_KEY" \
--data-urlencode "brand_id=$BRAND_ID" \
--data-urlencode 'view=action' \
--data-urlencode "action_id=$ACTION_ID"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_recommendations(
brand_id=environ["BRAND_ID"],
view="action",
action_id=environ["ACTION_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.v2GetRecommendations(
{
brand_id: process.env.BRAND_ID!,
view: "action",
action_id: process.env.ACTION_ID!,
},
);
console.log(response.body);Responses
HTTP 200
Successful Response
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.action_id | string | Yes | |
data.analyst_run_id | string | Yes | |
data.approved_at | string | null | Yes | |
data.approved_by | string | null | Yes | |
data.approved_max_credits | integer | null | Yes | |
data.brand_id | string | Yes | Identifies the brand this result belongs to. |
data.draft | object | null | Yes | |
data.draft_fingerprint | string | null | Yes | |
data.estimated_credits | integer | Yes | The expected credit cost for this selection. |
data.finding_id | string | Yes | |
data.kind | "content_draft" | "fresh_check" | Yes | |
data.maximum_credits | integer | Yes | The upper credit estimate for this selection. |
data.organization_facts_status | "partner_confirmed" | "pending_partner_confirmation" | null | Yes | |
data.passage_id | string | null | Yes | |
data.proposed_at | string | Yes | |
data.proposed_by | string | Yes | |
data.quote | object | null | Yes | |
data.run | object | null | Yes | |
data.run.brand_id | string | Conditional | |
data.run.charged_credits | integer | Conditional | |
data.run.check_id | string | null | Conditional | |
data.run.check_url | string | null | Conditional | |
data.run.citation_status | "in_progress" | "completed" | No | Citation preparation status for this run, when applicable. |
data.run.created_at | string | Conditional | |
data.run.estimated_credits | integer | Conditional | |
data.run.failure_reasons | array of "access_restricted" | "limit_reached" | "input_missing" | "approval_expired" | "cancelled" | "check_failed" | "check_incomplete" | Conditional | |
data.run.hold_reasons | array of "retry_pending" | "under_review" | Conditional | |
data.run.phase | string | null | Conditional | |
data.run.progress | object | Conditional | |
data.run.progress.by_location | array of object | No | |
data.run.progress.by_location[].by_source | array of object | Conditional | |
data.run.progress.by_location[].completed_steps | integer | Conditional | |
data.run.progress.by_location[].expected_steps | integer | Conditional | |
data.run.progress.by_location[].location_id | string (uuid) | Conditional | |
data.run.progress.by_source | array of object | Conditional | |
data.run.progress.completed_steps | integer | Conditional | |
data.run.progress.expected_steps | integer | Conditional | |
data.run.prompt_set_revision | string | Conditional | |
data.run.released_credits | integer | Conditional | |
data.run.report_id | string | null | Conditional | |
data.run.report_status | "pending" | "ready" | "not_available" | Conditional | |
data.run.report_url | string | null | Conditional | |
data.run.reserved_credits | integer | Conditional | |
data.run.run_id | string | Conditional | |
data.run.status | string | Conditional | |
data.run.updated_at | string | Conditional | |
data.run.website | string | null | Conditional | |
data.run_id | string | null | Yes | Identifies the run. Keep any prefix when using it in a request. |
data.status | "proposed" | "approved" | Yes | |
data.v2_action_id | string | No | |
meta | object | Yes | Information about this response, including any warnings or pagination details. |
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