> ## Documentation Index
> Fetch the complete documentation index at: https://docs.athenahq.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Site Health analytics

> Live Google Analytics 4, Google Search Console and AI-citation figures for a website over the last 28 complete days, each beside the 28 days before (period gives both ranges; change_pct is null when the earlier period was zero). ga4: AI-referred sessions, their engagement rate and key events, organic and total sessions, AI share of sessions in percent, daily AI sessions, and the top 10 AI sources, AI landing pages and organic landing pages. gsc: clicks, impressions, CTR in percent and average position, a daily series, and the top 10 queries and pages. cited_pages: the website's pages AI answers cited most, with the Google figures for the same page. connected false means no Google property is linked for that provider; available false means it is linked but the read failed. Read live from Google, so a connection made a moment ago shows at once. Requires Site Health on the website's plan; otherwise the call fails with 403.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/seo/analytics
openapi: 3.1.0
info:
  title: AthenaHQ API
  description: >-
    AthenaHQ API provides programmatic access to manage your websites and
    prompts for AI-powered content optimization.
  version: 1.0.0
  contact:
    email: support@athenahq.ai
servers:
  - url: https://api.athenahq.ai
    description: Production server
security:
  - apiKey: []
tags:
  - name: Basics
    description: Core API operations for managing websites and prompts
  - name: Metrics
    description: Metrics and analytics endpoints for tracking AI visibility
  - name: Billing
    description: Billing and credits endpoints for managing usage
  - name: Team Management
    description: Endpoints for managing team members and invitations
  - name: Groups
    description: Endpoints for managing groups of websites
  - name: Content
    description: >-
      Endpoints for accessing Content Hub data — tabs, tracked URLs, and per-URL
      prompt breakdowns.
  - name: Pitch Workspace
    description: >-
      Endpoints for accessing pitch workspace reports — org-scoped pitch runs
      with competitors, prompts, attributes, and aggregate metrics.
  - name: Knowledge Base
    description: >-
      Endpoints for reading the brand Knowledge Base — approved brand facts and
      the pillars that organize them.
paths:
  /api/v1/seo/analytics:
    get:
      tags:
        - Site Health
      summary: Get Site Health analytics
      description: >-
        Live Google Analytics 4, Google Search Console and AI-citation figures
        for a website over the last 28 complete days, each beside the 28 days
        before (period gives both ranges; change_pct is null when the earlier
        period was zero). ga4: AI-referred sessions, their engagement rate and
        key events, organic and total sessions, AI share of sessions in percent,
        daily AI sessions, and the top 10 AI sources, AI landing pages and
        organic landing pages. gsc: clicks, impressions, CTR in percent and
        average position, a daily series, and the top 10 queries and pages.
        cited_pages: the website's pages AI answers cited most, with the Google
        figures for the same page. connected false means no Google property is
        linked for that provider; available false means it is linked but the
        read failed. Read live from Google, so a connection made a moment ago
        shows at once. Requires Site Health on the website's plan; otherwise the
        call fails with 403.
      operationId: seoAnalytics.site
      parameters:
        - name: website_id
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  period:
                    type: object
                    properties:
                      start_date:
                        type: string
                      end_date:
                        type: string
                      previous_start_date:
                        type: string
                      previous_end_date:
                        type: string
                    required:
                      - start_date
                      - end_date
                      - previous_start_date
                      - previous_end_date
                  ga4:
                    type: object
                    properties:
                      connected:
                        type: boolean
                      available:
                        type: boolean
                      property_name:
                        anyOf:
                          - type: string
                          - type: 'null'
                      ai_sessions:
                        type: object
                        properties:
                          current:
                            type: number
                          previous:
                            type: number
                          change_pct:
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - current
                          - previous
                          - change_pct
                      ai_engagement_rate:
                        anyOf:
                          - type: number
                          - type: 'null'
                      ai_key_events:
                        type: object
                        properties:
                          current:
                            type: number
                          previous:
                            type: number
                          change_pct:
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - current
                          - previous
                          - change_pct
                      organic_sessions:
                        type: object
                        properties:
                          current:
                            type: number
                          previous:
                            type: number
                          change_pct:
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - current
                          - previous
                          - change_pct
                      total_sessions:
                        type: object
                        properties:
                          current:
                            type: number
                          previous:
                            type: number
                          change_pct:
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - current
                          - previous
                          - change_pct
                      ai_share_pct:
                        anyOf:
                          - type: number
                          - type: 'null'
                      ai_daily:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            value:
                              type: number
                          required:
                            - date
                            - value
                      sources:
                        type: array
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                            sessions:
                              type: number
                            previous:
                              type: number
                          required:
                            - name
                            - sessions
                            - previous
                      ai_landing_pages:
                        type: array
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                            sessions:
                              type: number
                            previous:
                              type: number
                          required:
                            - url
                            - sessions
                            - previous
                      organic_landing_pages:
                        type: array
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                            sessions:
                              type: number
                            key_events:
                              type: number
                          required:
                            - url
                            - sessions
                            - key_events
                    required:
                      - connected
                      - available
                      - property_name
                      - ai_sessions
                      - ai_engagement_rate
                      - ai_key_events
                      - organic_sessions
                      - total_sessions
                      - ai_share_pct
                      - ai_daily
                      - sources
                      - ai_landing_pages
                      - organic_landing_pages
                  gsc:
                    type: object
                    properties:
                      connected:
                        type: boolean
                      available:
                        type: boolean
                      site_url:
                        anyOf:
                          - type: string
                          - type: 'null'
                      clicks:
                        type: object
                        properties:
                          current:
                            type: number
                          previous:
                            type: number
                          change_pct:
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - current
                          - previous
                          - change_pct
                      impressions:
                        type: object
                        properties:
                          current:
                            type: number
                          previous:
                            type: number
                          change_pct:
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - current
                          - previous
                          - change_pct
                      ctr:
                        type: object
                        properties:
                          current:
                            type: number
                          previous:
                            type: number
                          change_pct:
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - current
                          - previous
                          - change_pct
                      position:
                        type: object
                        properties:
                          current:
                            type: number
                          previous:
                            type: number
                          change_pct:
                            anyOf:
                              - type: number
                              - type: 'null'
                        required:
                          - current
                          - previous
                          - change_pct
                      daily:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            clicks:
                              type: number
                            impressions:
                              type: number
                          required:
                            - date
                            - clicks
                            - impressions
                      queries:
                        type: array
                        items:
                          type: object
                          properties:
                            clicks:
                              type: number
                            impressions:
                              type: number
                            ctr:
                              type: number
                            position:
                              type: number
                            previous_clicks:
                              type: number
                            query:
                              type: string
                          required:
                            - clicks
                            - impressions
                            - ctr
                            - position
                            - previous_clicks
                            - query
                      pages:
                        type: array
                        items:
                          type: object
                          properties:
                            clicks:
                              type: number
                            impressions:
                              type: number
                            ctr:
                              type: number
                            position:
                              type: number
                            previous_clicks:
                              type: number
                            url:
                              type: string
                          required:
                            - clicks
                            - impressions
                            - ctr
                            - position
                            - previous_clicks
                            - url
                    required:
                      - connected
                      - available
                      - site_url
                      - clicks
                      - impressions
                      - ctr
                      - position
                      - daily
                      - queries
                      - pages
                  cited_pages:
                    type: object
                    properties:
                      available:
                        type: boolean
                      pages:
                        type: array
                        items:
                          type: object
                          properties:
                            url:
                              type: string
                            citations:
                              type: number
                            prompts:
                              type: number
                            ai_sessions:
                              anyOf:
                                - type: number
                                - type: 'null'
                            clicks:
                              anyOf:
                                - type: number
                                - type: 'null'
                            impressions:
                              anyOf:
                                - type: number
                                - type: 'null'
                            position:
                              anyOf:
                                - type: number
                                - type: 'null'
                          required:
                            - url
                            - citations
                            - prompts
                            - ai_sessions
                            - clicks
                            - impressions
                            - position
                    required:
                      - available
                      - pages
                required:
                  - period
                  - ga4
                  - gsc
                  - cited_pages
        '400':
          description: 'Bad Request: validation failed'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          description: Unauthenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '429':
          description: 'Rate limited: honor Retry-After before retrying'
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
          headers:
            Retry-After:
              description: Seconds to wait before retrying
              schema:
                type: integer
                minimum: 1
        '500':
          description: Internal Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can create one
        [here](https://app.athenahq.ai/organization?tab=api).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.