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

# GEO topic detail

> Single topic with 30-day snapshot history and trend.



## OpenAPI

````yaml https://api.surnex.io/openapi.json get /v1/projects/{project_id}/geo/topics/{topic_id}
openapi: 3.1.0
info:
  title: Surnex API
  description: |-
    Surnex SEO Platform API — api.surnex.io

    Provides the complete backend for the Surnex SEO dashboard including:
    - Multi-tenant organization management
    - Project tracking (domains)
    - Keyword rank tracking (Phase 1+)
    - Backlink analysis (Phase 3+)
    - Site auditing (Phase 4+)
    - Stripe billing integration
    - MCP endpoint for AI agents at /mcp
  version: 0.1.0
servers: []
security: []
paths:
  /v1/projects/{project_id}/geo/topics/{topic_id}:
    get:
      tags:
        - GEO / AI Visibility
      summary: GEO topic detail
      description: Single topic with 30-day snapshot history and trend.
      operationId: get_topic_detail_v1_projects__project_id__geo_topics__topic_id__get
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: topic_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Topic Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponse_GeoTopicDetailResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    APIResponse_GeoTopicDetailResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - $ref: '#/components/schemas/GeoTopicDetailResponse'
            - type: 'null'
      type: object
      title: APIResponse[GeoTopicDetailResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GeoTopicDetailResponse:
      properties:
        topic:
          $ref: '#/components/schemas/GeoTopicResponse'
        snapshots:
          items:
            $ref: '#/components/schemas/GeoSnapshotResponse'
          type: array
          title: Snapshots
          description: All snapshots for this topic over the last 30 days.
        trend:
          items:
            $ref: '#/components/schemas/GeoTrendPoint'
          type: array
          title: Trend
          description: Daily mention count and citation rate trend (last 30 days).
      type: object
      required:
        - topic
      title: GeoTopicDetailResponse
      description: Detailed view of a single GEO topic with its 30-day trend data.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    GeoTopicResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        keyword:
          type: string
          title: Keyword
        location_code:
          type: integer
          title: Location Code
        language_code:
          type: string
          title: Language Code
        is_active:
          type: boolean
          title: Is Active
        ai_search_volume:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ai Search Volume
          description: Estimated monthly AI search volume for this keyword.
        last_snapshot_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Snapshot At
          description: Timestamp of the most recent AI mention snapshot.
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - project_id
        - keyword
        - location_code
        - language_code
        - is_active
        - created_at
      title: GeoTopicResponse
      description: Serialised representation of a GeoTopic ORM record.
    GeoSnapshotResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        topic_id:
          type: string
          format: uuid
          title: Topic Id
        target_domain:
          type: string
          title: Target Domain
        mention_count:
          type: integer
          title: Mention Count
          description: Number of AI responses that mentioned the domain.
        ai_search_volume:
          anyOf:
            - type: integer
            - type: 'null'
          title: Ai Search Volume
          description: Estimated AI search volume at the time of this snapshot.
        citation_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Citation Rate
          description: >-
            Fraction of AI responses that cited the domain (0.0–1.0). NULL if
            the volume data was unavailable.
        snapshotted_at:
          type: string
          format: date
          title: Snapshotted At
          description: Calendar date of this snapshot (ISO 8601 date string).
        platform:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform
          description: AI platform that generated the responses (e.g. 'google').
        answers:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Answers
          description: AI-generated question/answer pairs from the LLM responses.
        monthly_searches:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Monthly Searches
          description: Monthly AI search volume trend data ({year, month, search_volume}).
        first_response_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: First Response At
          description: >-
            ISO 8601 datetime when the AI platform first responded to this
            query.
        last_response_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Response At
          description: ISO 8601 datetime when the AI platform last responded to this query.
        top_sources:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Top Sources
          description: Top domains cited alongside the target in AI responses.
        model_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Model Version
          description: LLM model version for this snapshot.
        answer_quality_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Answer Quality Score
          description: Quality score of the AI answers.
      type: object
      required:
        - id
        - topic_id
        - target_domain
        - mention_count
        - snapshotted_at
      title: GeoSnapshotResponse
      description: Serialised representation of a GeoMentionSnapshot ORM record.
    GeoTrendPoint:
      properties:
        date:
          type: string
          title: Date
          description: ISO 8601 date string for this data point.
        mention_count:
          type: integer
          title: Mention Count
          description: Total domain mentions recorded on this date.
        citation_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Citation Rate
          description: Citation rate for this date (0.0–1.0), or NULL if unavailable.
      type: object
      required:
        - date
        - mention_count
      title: GeoTrendPoint
      description: A single data point in a GEO / AI Visibility trend chart.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````