v2_get_recommendations
Read recommendations for one brand. The diagnosis view lists findings and their suggested actions.
See the REST reference for GET /v2/recommendations.
Signature
v2_get_recommendations(
*,
action_id: str | None = None,
action_type: Literal['create_content', 'update_content', 'outreach', 'fix_listing', 'update_robots', 'unblock_crawler', 'add_schema', 'fix_schema', 'fix_business_facts'] | None = None,
assignee: str | None = None,
brand_id: str | None = None,
channel: Literal['site_audit', 'owned_content', 'social', 'outreach'] | None = None,
content_type: str | None = None,
cursor: str | None = None,
include_citation_benchmark: bool | None = None,
include_citation_projection: bool | None = None,
item_id: str | None = None,
limit: int | None = None,
location_id: str | None = None,
month: str | None = None,
offset: int | None = None,
priority: Literal['high', 'medium', 'low'] | None = None,
prompt_id: str | None = None,
report_id: str | None = None,
status: Literal['open', 'resolved', 'dismissed'] | Literal['new', 'in_progress', 'completed', 'dismissed', 'archived', 'open', 'done'] | None = None,
type: Literal['debugger', 'content', 'citation', 'technical', 'local'] | None = None,
view: Literal['diagnosis', 'board', 'action'] | None = None,
) -> Response[Any]Parameters
action_id- Identifier for the action.
action_type- Filter results by action type.
assignee- Filter by the person assigned to a board item.
brand_id- Identifier for the brand.
channel- Filter results by channel.
content_type- Filter results by content type.
cursor- Pass the previous page's next cursor with the original filters.
include_citation_benchmark- Include the citation comparison for the selected record.
include_citation_projection- Include the citation projection for the selected item.
item_id- Identifier for the item.
limit- Maximum number of records per page. Each view sets its own limit.
location_id- Identifier for the location.
month- UTC reporting month in YYYY-MM format.
offset- Number of records to skip. For draft lists, send the returned next_offset.
priority- Filter results by priority.
prompt_id- Identifier for the prompt.
report_id- Identifier for the report.
status- Only return records with this status.
type- Select the recommendation or record type.
view- Choose the result to read. See the linked REST reference for the fields and access each view requires.
Return value
For diagnosis, response.data is a list of recommendations with a title, priority, action type and supporting evidence.
Errors
- AeoApiError includes the HTTP status, error code and request ID. An invalid key raises UnauthenticatedError. Check the key’s scopes if you receive ForbiddenError.
- Invalid arguments can raise ValueError or TypeError before the SDK sends a request.
- AeoTransportError means the request could not reach the API after any allowed retries, or the response could not be read as JSON.
- PreconditionFailedError means the revision has changed. Read the current record before editing it again.
- For a conflict, read the error message before repeating the write. Check the saved record for a competing edit or a repeated request.
Python example
import os
from aeo_sdk import AeoClient
with AeoClient(os.environ["AEO_API_KEY"], base_url=os.environ["AEO_API_BASE_URL"]) as client:
response = client.v2_get_recommendations(
brand_id='00000000-0000-4000-8000-000000000001',
view='diagnosis',
)
print(response.body)Async example
import asyncio
import os
from aeo_sdk import AsyncAeoClient
async def main():
async with AsyncAeoClient(os.environ["AEO_API_KEY"], base_url=os.environ["AEO_API_BASE_URL"]) as client:
response = await client.v2_get_recommendations(
brand_id='00000000-0000-4000-8000-000000000001',
view='diagnosis',
)
print(response.body)
asyncio.run(main())Requests by feature
Recommendations and visibility analyst
See Python client setup for the environment variables, response properties and retry settings.