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

# Historical backlink profile trend

> Retrieve the historical backlink metrics for a project's domain. Returns weekly snapshots showing how backlinks, referring domains, and domain rank have changed over time. Reads from Postgres — no DataForSEO call.



## OpenAPI

````yaml https://api.surnex.io/openapi.json get /v1/projects/{project_id}/backlinks/history
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}/backlinks/history:
    get:
      tags:
        - Backlink Analysis
      summary: Historical backlink profile trend
      description: >-
        Retrieve the historical backlink metrics for a project's domain. Returns
        weekly snapshots showing how backlinks, referring domains, and domain
        rank have changed over time. Reads from Postgres — no DataForSEO call.
      operationId: get_backlink_history_v1_projects__project_id__backlinks_history_get
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
            title: Start Date
          description: Start of date range (YYYY-MM-DD). Defaults to 90 days ago.
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: End of date range (YYYY-MM-DD). Defaults to today.
            title: End Date
          description: End of date range (YYYY-MM-DD). Defaults to today.
        - name: domain
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Specific domain to query (defaults to the project's own domain).
              Pass a competitor domain to view competitor history.
            title: Domain
          description: >-
            Specific domain to query (defaults to the project's own domain).
            Pass a competitor domain to view competitor history.
        - 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_list_BacklinkHistoryPoint__'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    APIResponse_list_BacklinkHistoryPoint__:
      properties:
        success:
          type: boolean
          title: Success
          default: true
        data:
          anyOf:
            - items:
                $ref: '#/components/schemas/BacklinkHistoryPoint'
              type: array
            - type: 'null'
          title: Data
      type: object
      title: APIResponse[list[BacklinkHistoryPoint]]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BacklinkHistoryPoint:
      properties:
        tracked_at:
          type: string
          format: date-time
          title: Tracked At
          description: UTC timestamp when this snapshot was recorded.
        backlinks_total:
          type: integer
          title: Backlinks Total
          description: Total inbound backlinks at this point in time.
          default: 0
        referring_domains:
          type: integer
          title: Referring Domains
          description: Unique referring domains at this point in time.
          default: 0
        dofollow:
          type: integer
          title: Dofollow
          description: Total dofollow backlinks at this point in time.
          default: 0
        nofollow:
          type: integer
          title: Nofollow
          description: Total nofollow backlinks at this point in time.
          default: 0
        new_referring_domains:
          type: integer
          title: New Referring Domains
          description: Referring domains gained since the prior snapshot.
          default: 0
        lost_referring_domains:
          type: integer
          title: Lost Referring Domains
          description: Referring domains lost since the prior snapshot.
          default: 0
        domain_rank:
          anyOf:
            - type: integer
            - type: 'null'
          title: Domain Rank
          description: DataForSEO domain rank at this snapshot.
      type: object
      required:
        - tracked_at
      title: BacklinkHistoryPoint
      description: A single time-series data point in the backlink history chart.
    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

````