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

# Get citations

> Returns citations data for the specified brand in one of three modes:
- **citations** (default): AI Search citations with aggregates (top domains/competitors)
- **search-queries**: Search queries that return citations, with prompts and citation lists
- **knowledge**: Raw knowledge base citations with rich metadata

Supports filtering by date range, domain, and search query text. Results are paginated with cursor-based pagination.




## OpenAPI

````yaml openapi.yaml get /get-citations
openapi: 3.0.0
info:
  title: Trakkr API
  description: Monitor your brand visibility and presence across AI models and prompts
  version: 1.0.0
  contact:
    name: Trakkr Support
    email: mack@trakkr.ai
    url: https://learn.trakkr.ai
  license:
    name: Proprietary
    url: https://trakkr.ai/
servers:
  - url: https://api.trakkr.ai
    description: Production server
security:
  - bearerAuth: []
paths:
  /get-citations:
    get:
      summary: Get citations
      description: >
        Returns citations data for the specified brand in one of three modes:

        - **citations** (default): AI Search citations with aggregates (top
        domains/competitors)

        - **search-queries**: Search queries that return citations, with prompts
        and citation lists

        - **knowledge**: Raw knowledge base citations with rich metadata


        Supports filtering by date range, domain, and search query text. Results
        are paginated with cursor-based pagination.
      operationId: getCitations
      parameters:
        - name: brand
          in: query
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fx]{32}$
            minLength: 32
            maxLength: 32
          description: The brand ID (32-character hexadecimal string)
          example: 0000000000000x000000000000000000
        - name: mode
          in: query
          required: false
          schema:
            type: string
            enum:
              - citations
              - search-queries
              - knowledge
            default: citations
          description: |
            Citation mode to use:
            - `citations` - AI Search citations with aggregates
            - `search-queries` - Search queries with associated citations
            - `knowledge` - Knowledge base citations
          example: citations
        - name: start_date
          in: query
          required: false
          schema:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
          description: >-
            Filter by last seen date (YYYY-MM-DD). Only applies to citations and
            search-queries modes.
          example: '2025-01-01'
        - name: end_date
          in: query
          required: false
          schema:
            type: string
            format: date
            pattern: ^\d{4}-\d{2}-\d{2}$
          description: >-
            Filter by last seen date (YYYY-MM-DD). Only applies to citations and
            search-queries modes.
          example: '2025-01-31'
        - name: domain
          in: query
          required: false
          schema:
            type: string
          description: Filter citations by domain (substring match)
          example: runnersworld.com
        - name: query
          in: query
          required: false
          schema:
            type: string
          description: >-
            Filter search queries by query text (substring match). Only applies
            to search-queries mode.
          example: best running shoes
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 100
          description: Number of items per page (1-500)
          example: 100
        - name: cursor
          in: query
          required: false
          schema:
            type: string
          description: Pagination cursor from previous response
          example: MTA=
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CitationsModeResponse'
                  - $ref: '#/components/schemas/SearchQueriesModeResponse'
                  - $ref: '#/components/schemas/KnowledgeModeResponse'
              examples:
                citations_mode:
                  $ref: '#/components/examples/CitationsModeExample'
                search_queries_mode:
                  $ref: '#/components/examples/SearchQueriesModeExample'
                knowledge_mode:
                  $ref: '#/components/examples/KnowledgeModeExample'
        '400':
          description: Bad Request - Missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: INVALID_PARAMETER
                message: >-
                  Invalid mode 'invalid'. Must be one of: citations,
                  search-queries, knowledge
                timestamp: '2025-11-13T12:30:00Z'
                request_id: req_abc123
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Not Found - No data found for brand
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: NOT_FOUND
                message: No data found for brand 1234567890
                timestamp: '2025-11-13T12:30:00Z'
                request_id: req_abc123
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    CitationsModeResponse:
      type: object
      required:
        - brand_id
        - mode
        - updated_at
        - citations
        - pagination
      properties:
        brand_id:
          type: string
          description: The brand ID
          example: 1749113348709x432280934699237400
        mode:
          type: string
          enum:
            - citations
          description: Response mode
          example: citations
        updated_at:
          type: string
          format: date-time
          description: When the snapshot was last updated
          example: '2025-11-03T01:42:25.502006+00:00'
        summary:
          type: object
          nullable: true
          description: Top aggregates (only included when no filters applied)
          properties:
            total_citations:
              type: integer
              description: Total number of citations in snapshot
              example: 346
            top_domains:
              type: array
              description: Top domains by citation count
              items:
                type: object
                properties:
                  domain:
                    type: string
                    example: runnersworld.com
                  count:
                    type: integer
                    example: 161
                  citation_share:
                    type: number
                    format: float
                    description: Percentage of total citations
                    example: 13.55
            top_competitors:
              type: array
              description: Top competitors referenced in citations
              items:
                type: object
                properties:
                  competitor:
                    type: string
                    example: Hoka One One
                  count:
                    type: integer
                    example: 437
                  citation_share:
                    type: number
                    format: float
                    description: Percentage of total competitor references
                    example: 10.93
        citations:
          type: array
          description: Array of citation items
          items:
            $ref: '#/components/schemas/CitationItem'
        pagination:
          $ref: '#/components/schemas/PaginationMetadata'
    SearchQueriesModeResponse:
      type: object
      required:
        - brand_id
        - mode
        - updated_at
        - search_queries
        - pagination
      properties:
        brand_id:
          type: string
          description: The brand ID
          example: 1749113348709x432280934699237400
        mode:
          type: string
          enum:
            - search-queries
          description: Response mode
          example: search-queries
        updated_at:
          type: string
          format: date-time
          description: When the snapshot was last updated
          example: '2025-11-03T01:42:25.502006+00:00'
        search_queries:
          type: array
          description: Array of search query items
          items:
            $ref: '#/components/schemas/SearchQueryItem'
        pagination:
          $ref: '#/components/schemas/PaginationMetadata'
    KnowledgeModeResponse:
      type: object
      required:
        - brand_id
        - mode
        - citations
        - pagination
      properties:
        brand_id:
          type: string
          description: The brand ID
          example: 1749113348709x432280934699237400
        mode:
          type: string
          enum:
            - knowledge
          description: Response mode
          example: knowledge
        citations:
          type: array
          description: Array of knowledge base citation objects (raw Bubble schema)
          items:
            $ref: '#/components/schemas/KnowledgeCitation'
        pagination:
          $ref: '#/components/schemas/PaginationMetadata'
    Error:
      type: object
      required:
        - error
        - timestamp
      properties:
        error:
          type: string
          description: Error code
          example: INVALID_PARAMETER
        message:
          type: string
          description: Human-readable error message
          example: The 'brand' parameter is required
        errors:
          type: array
          description: Array of error messages (alternative to details)
          items:
            type: string
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                description: Field that caused the error
              message:
                type: string
                description: Specific error message for this field
          description: Detailed error information
        timestamp:
          type: string
          format: date-time
          description: When the error occurred
          example: '2025-01-15T12:30:00Z'
        request_id:
          type: string
          description: Unique request identifier for debugging
          example: req_1234567890
    CitationItem:
      type: object
      required:
        - url
        - domain
        - times_cited
        - first_seen
        - last_seen
        - prompts
        - search_queries
      properties:
        url:
          type: string
          description: Citation URL
          example: https://www.runnersworld.com/best-running-shoes/
        domain:
          type: string
          description: Domain of the citation
          example: runnersworld.com
        times_cited:
          type: integer
          description: Number of times this citation appeared
          example: 22
        first_seen:
          type: string
          format: date-time
          description: First time this citation was seen
          example: '2025-10-03T11:53:27.751253+00:00'
        last_seen:
          type: string
          format: date-time
          description: Last time this citation was seen
          example: '2025-10-28T01:40:50.681897+00:00'
        competitors_referenced:
          type: array
          description: Competitors mentioned in this citation
          items:
            type: string
          example:
            - Adidas
            - Hoka One One
        prompts:
          type: array
          description: Original prompts that led to this citation
          items:
            type: string
          example:
            - best running shoes for marathon
        search_queries:
          type: array
          description: Search queries that returned this citation
          items:
            type: object
            properties:
              query:
                type: string
                example: best marathon shoes 2025
              count:
                type: integer
                description: Number of times this query returned this citation
                example: 5
        sentiment:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          description: Sentiment score (0-100, higher is more positive)
          example: 75
        domain_rating:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          description: Domain authority rating
          example: 85
        page_authority:
          type: integer
          nullable: true
          minimum: 0
          maximum: 100
          description: Page authority rating
          example: 78
        topics:
          type: array
          nullable: true
          description: Key topics extracted from citation
          items:
            type: string
          example:
            - running
            - marathon training
            - footwear
        h1:
          type: string
          nullable: true
          description: Page H1 or title
          example: Best Running Shoes 2025
        mentions_brand:
          type: boolean
          nullable: true
          description: Whether the citation explicitly mentions the brand
          example: true
    PaginationMetadata:
      type: object
      required:
        - limit
        - has_more
        - next_cursor
      properties:
        limit:
          type: integer
          description: Items per page
          example: 100
        has_more:
          type: boolean
          description: Whether more results exist
          example: true
        next_cursor:
          type: string
          nullable: true
          description: Cursor for next page (null if no more results)
          example: MTA=
    SearchQueryItem:
      type: object
      required:
        - query
        - searches
        - prompts
        - citations
        - last_seen
      properties:
        query:
          type: string
          description: The search query text
          example: best marathon shoes for beginners 2025
        searches:
          type: integer
          description: Total number of times this query was searched
          example: 8
        prompts:
          type: array
          description: Original prompts associated with this query
          items:
            type: string
          example:
            - best marathon shoes for beginners
        citations:
          type: array
          description: Top citations returned by this query
          items:
            type: object
            properties:
              url:
                type: string
                example: https://www.irunfar.com/best-marathon-shoes
              domain:
                type: string
                example: irunfar.com
              times_cited:
                type: integer
                description: How many times this URL appeared across all queries
                example: 23
        last_seen:
          type: string
          format: date-time
          description: Last time this query was seen
          example: '2025-10-28T01:40:50.681897+00:00'
    KnowledgeCitation:
      type: object
      description: Knowledge base citation with rich metadata (Bubble schema)
      properties:
        _id:
          type: string
          description: Bubble record ID
          example: 1751366661128x982280299254958800
        URL:
          type: string
          example: https://www.reviews.io/company-reviews/store/nike
        Domain:
          type: string
          example: reviews.io
        Page Title:
          type: string
          example: Nike Reviews - Read 534 Genuine Customer Reviews
        Input Prompt Text:
          type: string
          example: What has been your Nike customer service experience?
        Input Prompt Type:
          type: string
          example: Brand Specific
        Input Prompt Intent:
          type: string
          example: Informational
        Brand:
          type: string
          description: Brand ID reference
          example: 1749113348709x432280934699237400
        Search Model:
          type: string
          example: ChatGPT Search
        Brand Visibility Score:
          type: integer
          minimum: 0
          maximum: 100
          example: 85
        Sentiment:
          type: integer
          minimum: 0
          maximum: 100
          example: 45
        Domain Rating:
          type: integer
          nullable: true
          example: 77
        Page Authority:
          type: integer
          nullable: true
          example: 51
        Backlinks:
          type: integer
          nullable: true
          example: 284
        Key Topics:
          type: array
          items:
            type: string
          example:
            - customer service
            - returns and refunds
            - product quality
        AI Response Snippet:
          type: string
          example: Nike's customer service experiences present a mixed picture...
        Source Type:
          type: string
          example: Review Site
        Language:
          type: string
          example: English
        Date:
          type: string
          format: date-time
          example: '2025-07-01T00:00:00.000Z'
        Created Date:
          type: string
          format: date-time
          example: '2025-07-01T10:44:21.128Z'
        Modified Date:
          type: string
          format: date-time
          example: '2025-07-01T10:44:21.129Z'
        Favicon:
          type: string
          example: https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&...
  examples:
    CitationsModeExample:
      summary: Citations mode response example
      value:
        brand_id: 1749113348709x432280934699237400
        mode: citations
        updated_at: '2025-11-03T01:42:25.502006+00:00'
        summary:
          total_citations: 346
          top_domains:
            - domain: runnersworld.com
              count: 161
              citation_share: 13.55
            - domain: tomsguide.com
              count: 86
              citation_share: 7.24
          top_competitors:
            - competitor: Hoka One One
              count: 437
              citation_share: 10.93
            - competitor: ASICS
              count: 426
              citation_share: 10.66
        citations:
          - url: https://www.runnersworld.com/best-running-shoes/
            domain: runnersworld.com
            times_cited: 22
            first_seen: '2025-10-03T11:53:27.751253+00:00'
            last_seen: '2025-10-28T01:40:50.681897+00:00'
            competitors_referenced:
              - Adidas
              - Hoka One One
            prompts:
              - best running shoes for marathon
            search_queries:
              - query: best marathon shoes 2025
                count: 5
            sentiment: 75
            domain_rating: 85
            page_authority: 78
            topics:
              - running
              - marathon training
            h1: Best Running Shoes 2025
            mentions_brand: true
        pagination:
          limit: 100
          has_more: true
          next_cursor: MTA=
    SearchQueriesModeExample:
      summary: Search queries mode response example
      value:
        brand_id: 1749113348709x432280934699237400
        mode: search-queries
        updated_at: '2025-11-03T01:42:25.502006+00:00'
        search_queries:
          - query: best marathon shoes for beginners 2025
            searches: 8
            prompts:
              - best marathon shoes for beginners
            citations:
              - url: https://www.irunfar.com/best-marathon-shoes
                domain: irunfar.com
                times_cited: 23
              - url: https://www.coachweb.com/running-shoes/best-marathon
                domain: coachweb.com
                times_cited: 7
            last_seen: '2025-10-28T01:40:50.681897+00:00'
          - query: Nike Vaporfly review carbon plate
            searches: 6
            prompts:
              - best carbon-plated racing shoes
            citations:
              - url: https://www.wired.com/story/nike-vaporfly
                domain: wired.com
                times_cited: 12
            last_seen: '2025-10-27T01:34:49.273428+00:00'
        pagination:
          limit: 100
          has_more: false
          next_cursor: null
    KnowledgeModeExample:
      summary: Knowledge mode response example
      value:
        brand_id: 1749113348709x432280934699237400
        mode: knowledge
        citations:
          - _id: 1751366661128x982280299254958800
            URL: https://www.reviews.io/company-reviews/store/nike
            Domain: reviews.io
            Page Title: Nike Reviews - Read 534 Genuine Customer Reviews
            Input Prompt Text: What has been your Nike customer service experience?
            Input Prompt Type: Brand Specific
            Input Prompt Intent: Informational
            Brand: 1749113348709x432280934699237400
            Search Model: ChatGPT Search
            Brand Visibility Score: 85
            Sentiment: 45
            Domain Rating: 77
            Page Authority: 51
            Backlinks: 284
            Key Topics:
              - customer service
              - returns and refunds
              - product quality
            AI Response Snippet: Nike's customer service experiences present a mixed picture...
            Source Type: Review Site
            Language: English
            Date: '2025-07-01T00:00:00.000Z'
            Created Date: '2025-07-01T10:44:21.128Z'
            Modified Date: '2025-07-01T10:44:21.129Z'
            Favicon: https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&...
        pagination:
          limit: 100
          has_more: true
          next_cursor: MTA=
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: UNAUTHORIZED
            message: Missing API key
            errors:
              - >-
                API key must be provided in the Authorization header as 'Bearer
                <api_key>'
            timestamp: '2025-01-15T12:30:00Z'
            request_id: req_1234567890
    Forbidden:
      description: Forbidden - Access denied to this resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: FORBIDDEN
            message: Invalid API key
            errors:
              - No accounts found for this API key
            timestamp: '2025-01-15T12:30:00Z'
            request_id: req_1234567890
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: INTERNAL_ERROR
            message: An unexpected error occurred
            errors:
              - 'An unexpected error occurred: Database connection failed'
            timestamp: '2025-01-15T12:30:00Z'
            request_id: req_1234567890
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        API key authentication. Include your API key in the Authorization
        header:

        `Authorization: Bearer YOUR_API_KEY`

````