Skip to content

    v2_get_reports

    Read a brand's monthly report. Omit month for the latest month with saved observations, or specify a month to inspect an earlier period.

    See the REST reference for GET /v2/reports.

    Signature

    v2_get_reports(
        *,
        action_id: str | None = None,
        ai_search: str | None = None,
        brand_id: str | None = None,
        engine: str | None = None,
        follow_up_action_id: str | None = None,
        from_month: str | None = None,
        month: str | None = None,
        prompt_id: str | None = None,
        report_id: str | None = None,
        to_month: str | None = None,
        topic_id: str | None = None,
        view: Literal['action_outcome', 'report', 'compare', 'rollup'] | None = None,
    ) -> Response[Any]

    Parameters

    action_id
    Identifier for the action.
    ai_search
    Limit results to one AI search product, such as google_ai_overviews.
    brand_id
    Identifier for the brand.
    engine
    Filter results by engine.
    follow_up_action_id
    Identifier for the follow up action.
    from_month
    Earlier UTC report month, in YYYY-MM format.
    month
    UTC reporting month in YYYY-MM format.
    prompt_id
    Identifier for the prompt.
    report_id
    Identifier for the report.
    to_month
    Later UTC report month, in YYYY-MM format.
    topic_id
    Identifier for the topic.
    view
    Choose the result to read. See the linked REST reference for the fields and access each view requires.

    Return value

    For report, response.data contains month, available_months, overall metrics, engine breakdowns and trends.

    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.

    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_reports(
            brand_id='00000000-0000-4000-8000-000000000001',
            view='report',
        )
        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_reports(
                brand_id='00000000-0000-4000-8000-000000000001',
                view='report',
            )
            print(response.body)
    
    asyncio.run(main())

    Requests by feature

    Reports and sharing

    See Python client setup for the environment variables, response properties and retry settings.