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

# Get AI traffic attribution

> Google Analytics sessions from AI referrers, matched to the prompts whose answers cited your pages. An estimate: coverage always travels with it, and money is in integer cents.



## OpenAPI

````yaml /api-reference/openapi.json get /projects/{projectId}/attribution
openapi: 3.1.0
info:
  title: Citino API
  version: v1
  description: >-
    Read how AI engines answer your market's questions, and keep your prompts,
    competitors, segments and engines in step from code. Every number carries
    its band and sample size.
servers:
  - url: https://api.citino.ai/v1
security:
  - bearerAuth: []
tags:
  - name: Brand and competitors
  - name: Definitions
  - name: Engines
  - name: Projects
  - name: Alerts
  - name: Attribution
  - name: Claims
  - name: Crawlability
  - name: Crawler activity
  - name: Metrics
  - name: Experiments
  - name: Prompts
  - name: Objections
  - name: Monthly reports
  - name: Reports
  - name: Runs
  - name: Searches
  - name: Sources
  - name: Work items
  - name: Settings
paths:
  /projects/{projectId}/attribution:
    get:
      tags:
        - Attribution
      summary: Get AI traffic attribution
      description: >-
        Google Analytics sessions from AI referrers, matched to the prompts
        whose answers cited your pages. An estimate: coverage always travels
        with it, and money is in integer cents.
      operationId: getProjectsByProjectIdAttribution
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
        - name: window
          in: query
          required: false
          description: >-
            A named window ending today in the project's market, or custom with
            from and to. Default 30d.
          schema:
            description: >-
              A named window ending today in the project's market, or custom
              with from and to. Default 30d.
            type: string
            enum:
              - 7d
              - 30d
              - 90d
              - 180d
              - 365d
              - custom
        - name: from
          in: query
          required: false
          description: First day, inclusive. Required with window=custom.
          schema:
            description: First day, inclusive. Required with window=custom.
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: to
          in: query
          required: false
          description: Last day, inclusive. Required with window=custom.
          schema:
            description: Last day, inclusive. Required with window=custom.
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  project_id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                    description: The project asked about.
                  state:
                    type: string
                    enum:
                      - connected
                      - syncing
                      - low_coverage
                      - not_connected
                      - auth_expired
                  window:
                    type: string
                    description: The window in words, e.g. last 30 days.
                  from:
                    type: string
                    pattern: ^\d{4}-\d{2}-\d{2}$
                  to:
                    type: string
                    pattern: ^\d{4}-\d{2}-\d{2}$
                  property:
                    type:
                      - string
                      - 'null'
                  ai_sessions:
                    type: number
                  sessions_from_sampled_engines:
                    type: number
                  matched:
                    type: number
                  unmatched:
                    type: number
                  conversions:
                    type: number
                  conversion_label:
                    type: string
                  value_cents:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  coverage:
                    type: object
                    properties:
                      value:
                        type:
                          - number
                          - 'null'
                      unit:
                        type: string
                        enum:
                          - percent
                          - points
                          - count
                          - score
                          - rank
                          - ratio
                      band:
                        type:
                          - number
                          - 'null'
                      'n':
                        type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      delta:
                        type:
                          - number
                          - 'null'
                      within_noise:
                        type: boolean
                      low_sample:
                        type: boolean
                      state:
                        type: string
                        enum:
                          - measured
                          - no_data
                          - never_named
                      note:
                        type: string
                    required:
                      - value
                      - unit
                      - band
                      - 'n'
                      - delta
                      - within_noise
                      - low_sample
                      - state
                    additionalProperties: false
                    description: >-
                      Matched sessions over every AI session. No band: both are
                      counts.
                  coverage_note:
                    type:
                      - string
                      - 'null'
                  by_referrer:
                    type: array
                    items:
                      type: object
                      properties:
                        referrer:
                          type: string
                        sessions:
                          type: number
                        conversions:
                          type: number
                        value_cents:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        cvr:
                          type:
                            - number
                            - 'null'
                        engine_sampled:
                          type: boolean
                      required:
                        - referrer
                        - sessions
                        - conversions
                        - value_cents
                        - cvr
                        - engine_sampled
                      additionalProperties: false
                  by_page:
                    type: array
                    items:
                      type: object
                      properties:
                        path:
                          type: string
                          description: >-
                            Printable ASCII, other characters percent-encoded,
                            at most 200.
                        sessions:
                          type: number
                        conversions:
                          type: number
                        value_cents:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                        matched_sessions:
                          type: number
                        aggregated:
                          type: boolean
                          description: >-
                            Google Analytics collapsed the page, so it cannot be
                            matched.
                      required:
                        - path
                        - sessions
                        - conversions
                        - value_cents
                        - matched_sessions
                        - aggregated
                      additionalProperties: false
                  by_prompt:
                    type: array
                    items:
                      type: object
                      properties:
                        prompt_id:
                          type: string
                        prompt_text:
                          type: string
                        scope:
                          type: string
                        floor_sessions:
                          type: number
                        sessions:
                          type: number
                        ceiling_sessions:
                          type: number
                          description: Never add these up.
                        conversions:
                          description: >-
                            Null below the conversion floor, where the share
                            would be a guess.
                          type:
                            - number
                            - 'null'
                        conversions_suppressed:
                          type: boolean
                        value_cents:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - prompt_id
                        - prompt_text
                        - scope
                        - floor_sessions
                        - sessions
                        - ceiling_sessions
                        - conversions
                        - conversions_suppressed
                        - value_cents
                      additionalProperties: false
                  custom_prompts:
                    type: array
                    items:
                      type: object
                      properties:
                        prompt_id:
                          type: string
                        prompt_text:
                          type: string
                        scope:
                          type: string
                        floor_sessions:
                          type: number
                        sessions:
                          type: number
                        ceiling_sessions:
                          type: number
                          description: Never add these up.
                        conversions:
                          description: >-
                            Null below the conversion floor, where the share
                            would be a guess.
                          type:
                            - number
                            - 'null'
                        conversions_suppressed:
                          type: boolean
                        value_cents:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                      required:
                        - prompt_id
                        - prompt_text
                        - scope
                        - floor_sessions
                        - sessions
                        - ceiling_sessions
                        - conversions
                        - conversions_suppressed
                        - value_cents
                      additionalProperties: false
                    description: >-
                      Your branded and comparison prompts, kept out of the
                      headline.
                  unmatched_classes:
                    type: array
                    items:
                      type: object
                      properties:
                        kind:
                          type: string
                        host:
                          type:
                            - string
                            - 'null'
                        sessions:
                          type: number
                      required:
                        - kind
                        - host
                        - sessions
                      additionalProperties: false
                  method:
                    type: string
                  engines_sampled:
                    type: array
                    items:
                      type: string
                required:
                  - project_id
                  - state
                  - window
                  - from
                  - to
                  - property
                  - ai_sessions
                  - sessions_from_sampled_engines
                  - matched
                  - unmatched
                  - conversions
                  - conversion_label
                  - value_cents
                  - coverage
                  - coverage_note
                  - by_referrer
                  - by_page
                  - by_prompt
                  - custom_prompts
                  - unmatched_classes
                  - method
                  - engines_sampled
                additionalProperties: false
              example:
                project_id: 00000000-0000-4000-8000-000000000001
                state: not_connected
                window: last 30 days
                from: '2026-10-09'
                to: '2026-11-07'
                property: null
                ai_sessions: 0
                sessions_from_sampled_engines: 0
                matched: 0
                unmatched: 0
                conversions: 0
                conversion_label: demo requests
                value_cents: 0
                coverage:
                  value: null
                  unit: percent
                  band: null
                  'n': 0
                  delta: null
                  within_noise: false
                  low_sample: false
                  state: no_data
                  note: needs one full day of sessions
                coverage_note: null
                by_referrer: []
                by_page: []
                by_prompt: []
                custom_prompts: []
                unmatched_classes: []
                method: >-
                  Sessions are matched to prompts by co-occurrence: on that
                  engine, within 28 days, these prompts' answers cited the page
                  the visitor landed on. It is a heuristic, not deterministic
                  attribution — GA4 does not say which question was asked.
                engines_sampled: []
        '400':
          description: The request is invalid; `error.field` names the parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 'No live API key in an `Authorization: Bearer` header.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: The key lacks the scope named in the message, or cannot write.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such resource in this key's projects.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Over the key's or the workspace's rate limit; see `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Busy or timed out; retry after `Retry-After`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: bash
          label: curl
          source: |-
            curl "https://api.citino.ai/v1/projects/{projectId}/attribution" \
              -H "Authorization: Bearer $CITINO_API_KEY"
        - lang: python
          label: Python
          source: |-
            import os
            import requests

            res = requests.get(
                "https://api.citino.ai/v1/projects/{projectId}/attribution",
                headers={"Authorization": f"Bearer {os.environ['CITINO_API_KEY']}"},
            )
            print(res.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const res = await
            fetch("https://api.citino.ai/v1/projects/{projectId}/attribution", {
              headers: {
                Authorization: `Bearer ${process.env.CITINO_API_KEY}`,
              },
            });

            console.log(await res.json());
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: >-
                validation, unauthorized, forbidden, not_found, conflict,
                plan_limit, rate_limited, busy, query_timeout
            message:
              type: string
            field:
              type: string
            detail:
              type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key from Workspace settings → API keys, sent as `Authorization:
        Bearer <key>`.

````

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