> ## 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.

# Start persisted domain overview analysis

> Enqueue a background job to fetch the full domain overview (backlink summary, ranked keywords, top pages, competitors) and persist results to Postgres. Poll the returned lookup ID for status. Defaults to the project's configured domain.



## OpenAPI

````yaml https://api.surnex.io/openapi.json post /v1/projects/{project_id}/domains/analyze
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}/domains/analyze:
    post:
      tags:
        - Domain Overview
      summary: Start persisted domain overview analysis
      description: >-
        Enqueue a background job to fetch the full domain overview (backlink
        summary, ranked keywords, top pages, competitors) and persist results to
        Postgres. Poll the returned lookup ID for status. Defaults to the
        project's configured domain.
      operationId: start_domain_analyze_v1_projects__project_id__domains_analyze_post
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartDomainLookupRequest'
              default:
                lookup_type: overview
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponse_DomainLookupResponse_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    StartDomainLookupRequest:
      properties:
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
          description: >-
            Domain to analyze. Defaults to the project's configured domain. Must
            match the project domain if set.
        lookup_type:
          type: string
          title: Lookup Type
          description: '''overview'' or ''tech_stack'''
          default: overview
      type: object
      title: StartDomainLookupRequest
      description: Request body for starting a persisted domain lookup.
    APIResponse_DomainLookupResponse_:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - $ref: '#/components/schemas/DomainLookupResponse'
            - type: 'null'
      type: object
      title: APIResponse[DomainLookupResponse]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DomainLookupResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        project_id:
          type: string
          format: uuid
          title: Project Id
        domain:
          type: string
          title: Domain
        lookup_type:
          type: string
          title: Lookup Type
        status:
          type: string
          title: Status
        overview_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Overview Data
        top_keywords_data:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Top Keywords Data
        top_pages_data:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Top Pages Data
        competitors_data:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Competitors Data
        tech_stack_data:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Tech Stack Data
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        created_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Created By
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - project_id
        - domain
        - lookup_type
        - status
        - created_at
        - updated_at
      title: DomainLookupResponse
      description: Full domain lookup record including all JSONB data columns.
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````