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

# Get AI-correlated Direct lift

> Returns GA4-true project Direct totals, measured-page actual and baseline daily equivalents, and resolver-owned page-window classifications for a fixed 7, 28, or 90 day request. AI-correlated lift is correlated evidence, never attributed traffic, and is never summed with measured referrals. Page details are capped while totals are uncapped. Direct-lift evaluation supports measured-page populations up to 5,000 pages; larger populations return 422 lift_population_too_large rather than partial aggregates.



## OpenAPI

````yaml /openapi.json get /projects/{projectId}/traffic/direct-lift
openapi: 3.1.0
info:
  title: DevTune API
  version: 2.0.0
  description: >-
    API for programmatic access to your AI visibility data, webhook
    subscriptions, and automation workflows. Use this API to integrate DevTune
    data into CI/CD pipelines, BI tools, AI agents, and operational systems.
servers:
  - url: https://devtune.ai/api/v2
    description: Production
security:
  - bearerAuth: []
paths:
  /projects/{projectId}/traffic/direct-lift:
    get:
      summary: Get AI-correlated Direct lift
      description: >-
        Returns GA4-true project Direct totals, measured-page actual and
        baseline daily equivalents, and resolver-owned page-window
        classifications for a fixed 7, 28, or 90 day request. AI-correlated lift
        is correlated evidence, never attributed traffic, and is never summed
        with measured referrals. Page details are capped while totals are
        uncapped. Direct-lift evaluation supports measured-page populations up
        to 5,000 pages; larger populations return 422 lift_population_too_large
        rather than partial aggregates.
      operationId: getDirectLift
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: windowDays
          in: query
          schema:
            type: integer
            default: 28
            enum:
              - 7
              - 28
              - 90
          description: >-
            Fixed rolling window in days. Supported values are 7, 28, and 90.
            Defaults to 28.
        - name: pageLimit
          in: query
          description: >-
            Maximum pages returned with their classification windows. Aggregate
            totals are not capped within the 5,000-page direct-lift evaluation
            population limit.
          schema:
            type: integer
            minimum: 1
            maximum: 25
            default: 10
      responses:
        '200':
          description: AI-correlated Direct lift
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DirectLiftData'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - data
                  - meta
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/LiftPopulationTooLargeError'
        '429':
          $ref: '#/components/responses/RateLimitExceededError'
components:
  schemas:
    DirectLiftData:
      type: object
      additionalProperties: false
      description: >-
        GA4 Direct traffic and AI-correlated lift evidence. Correlation is not
        attribution, and inferred lift is never added to measured referral
        totals.
      properties:
        window:
          type: object
          additionalProperties: false
          properties:
            days:
              type: integer
              enum:
                - 7
                - 28
                - 90
            dateFrom:
              type: string
              format: date
            dateTo:
              type: string
              format: date
            evaluationWindowDays:
              type: integer
              enum:
                - 7
              description: >-
                Every classification compares one trailing seven-day evaluation
                window with its baseline and prior window.
          required:
            - days
            - dateFrom
            - dateTo
            - evaluationWindowDays
        series:
          type: array
          maxItems: 90
          items:
            type: object
            additionalProperties: false
            properties:
              date:
                type: string
                format: date
              fullDirectSessions:
                type:
                  - integer
                  - 'null'
                minimum: 0
                description: GA4's unfiltered project Direct-session total for the day.
              measuredActualDaily:
                type:
                  - number
                  - 'null'
                minimum: 0
                description: >-
                  Daily equivalent of the measured-page seven-day actual, not an
                  inferred traffic total.
              measuredBaselineDaily:
                type:
                  - number
                  - 'null'
                minimum: 0
                description: >-
                  Daily equivalent of the same measured-page population
                  baseline.
              pagesMeasured:
                type: integer
                minimum: 0
            required:
              - date
              - fullDirectSessions
              - measuredActualDaily
              - measuredBaselineDaily
              - pagesMeasured
        totals:
          type: object
          additionalProperties: false
          properties:
            classificationCounts:
              type: object
              additionalProperties: false
              properties:
                ai_correlated_lift:
                  type: integer
                  minimum: 0
                unexplained_lift:
                  type: integer
                  minimum: 0
                explained:
                  type: integer
                  minimum: 0
                baseline:
                  type: integer
                  minimum: 0
                unmeasured:
                  type: integer
                  minimum: 0
              required:
                - ai_correlated_lift
                - unexplained_lift
                - explained
                - baseline
                - unmeasured
            pagePopulationSize:
              type: integer
              minimum: 0
            pageWindows:
              type: integer
              minimum: 0
            pagesMeasured:
              type: integer
              minimum: 0
          required:
            - classificationCounts
            - pagePopulationSize
            - pageWindows
            - pagesMeasured
        pages:
          type: array
          maxItems: 25
          description: >-
            Bounded page list. Aggregate classification counts and population
            sizes remain uncapped.
          items:
            type: object
            additionalProperties: false
            properties:
              domainCanonical:
                type: string
                maxLength: 512
              pagePath:
                type: string
                maxLength: 2048
              windows:
                type: array
                maxItems: 90
                items:
                  type: object
                  additionalProperties: false
                  properties:
                    evaluationDay:
                      type: string
                      format: date
                    result:
                      type: object
                      additionalProperties: false
                      properties:
                        classification:
                          type: string
                          enum:
                            - ai_correlated_lift
                            - unexplained_lift
                            - explained
                            - baseline
                            - unmeasured
                        aiEvidence:
                          type: string
                          enum:
                            - citations
                            - answer_fetches
                            - absent
                            - nonqualifying
                            - unmeasured
                          description: >-
                            absent means covered families measured zero
                            activity; nonqualifying means covered activity was
                            observed but did not qualify.
                        channelExplanation:
                          type:
                            - string
                            - 'null'
                          enum:
                            - gsc_organic
                            - paid
                            - non_ai_referral
                            - null
                        materialLift:
                          type:
                            - boolean
                            - 'null'
                        unmeasuredReasons:
                          type: array
                          items:
                            type: string
                            enum:
                              - ga4_connection
                              - ga4_coverage
                              - gsc_connection
                              - gsc_coverage
                              - ai_evidence_coverage
                      required:
                        - classification
                        - aiEvidence
                        - channelExplanation
                        - materialLift
                        - unmeasuredReasons
                    aiEvidenceAssessment:
                      type: object
                      additionalProperties: false
                      properties:
                        citations:
                          type: string
                          enum:
                            - qualifying
                            - below_threshold
                            - declined
                            - unmeasured
                        answerFetches:
                          type: string
                          enum:
                            - qualifying
                            - below_threshold
                            - declined
                            - unmeasured
                      required:
                        - citations
                        - answerFetches
                    facts:
                      type: object
                      additionalProperties: false
                      description: >-
                        Full measured leg values and coverage markers supplied
                        to the shared D2 resolver.
                      properties:
                        evaluationWindow:
                          $ref: '#/components/schemas/DirectLiftEvaluationWindowFacts'
                        aiEvidence:
                          $ref: '#/components/schemas/DirectLiftAiEvidenceFacts'
                        channels:
                          $ref: '#/components/schemas/DirectLiftChannelFacts'
                        ga4Connection:
                          $ref: '#/components/schemas/DirectLiftConnectionFacts'
                        gscCoverage:
                          $ref: '#/components/schemas/DirectLiftGscCoverageFacts'
                      required:
                        - evaluationWindow
                        - aiEvidence
                        - channels
                        - ga4Connection
                        - gscCoverage
                  required:
                    - evaluationDay
                    - result
                    - aiEvidenceAssessment
                    - facts
            required:
              - domainCanonical
              - pagePath
              - windows
      required:
        - window
        - series
        - totals
        - pages
    Meta:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        projectId:
          type: string
          format: uuid
    DirectLiftEvaluationWindowFacts:
      type: object
      additionalProperties: false
      properties:
        actualDirectSessions:
          type:
            - number
            - 'null'
          minimum: 0
        baselineDirectSessions:
          type:
            - number
            - 'null'
          minimum: 0
        signedDirectLift:
          type:
            - number
            - 'null'
        priorDirectSessions:
          type:
            - number
            - 'null'
          minimum: 0
        currentWindowCoveredDays:
          type: integer
          minimum: 0
          maximum: 7
        priorWindowCoveredDays:
          type: integer
          minimum: 0
          maximum: 7
        evaluableBaselineBucketCount:
          type: integer
          minimum: 0
          maximum: 4
        currentWindowEvaluable:
          type: boolean
        priorWindowEvaluable:
          type: boolean
        hasMeasurableBaseline:
          type: boolean
      required:
        - actualDirectSessions
        - baselineDirectSessions
        - signedDirectLift
        - priorDirectSessions
        - currentWindowCoveredDays
        - priorWindowCoveredDays
        - evaluableBaselineBucketCount
        - currentWindowEvaluable
        - priorWindowEvaluable
        - hasMeasurableBaseline
    DirectLiftAiEvidenceFacts:
      type: object
      additionalProperties: false
      properties:
        citations:
          $ref: '#/components/schemas/DirectLiftEvidenceFamilyFacts'
        answerFetches:
          $ref: '#/components/schemas/DirectLiftEvidenceFamilyFacts'
      required:
        - citations
        - answerFetches
    DirectLiftChannelFacts:
      type: object
      additionalProperties: false
      properties:
        gscOrganic:
          $ref: '#/components/schemas/DirectLiftCountFacts'
        paid:
          $ref: '#/components/schemas/DirectLiftCountFacts'
        nonAiReferral:
          $ref: '#/components/schemas/DirectLiftCountFacts'
      required:
        - gscOrganic
        - paid
        - nonAiReferral
    DirectLiftConnectionFacts:
      type: object
      additionalProperties: false
      properties:
        status:
          type:
            - string
            - 'null'
        lastSyncedAt:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - status
        - lastSyncedAt
    DirectLiftGscCoverageFacts:
      type: object
      additionalProperties: false
      properties:
        status:
          type:
            - string
            - 'null'
        lastSyncedAt:
          type:
            - string
            - 'null'
          format: date-time
        currentWindowCovered:
          type: boolean
        priorWindowCovered:
          type: boolean
      required:
        - status
        - lastSyncedAt
        - currentWindowCovered
        - priorWindowCovered
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        status:
          type: integer
      required:
        - error
        - message
        - status
    DirectLiftEvidenceFamilyFacts:
      type: object
      additionalProperties: false
      properties:
        currentWindowCount:
          type: integer
          minimum: 0
        priorWindowCount:
          type: integer
          minimum: 0
        currentWindowCovered:
          type: boolean
        priorWindowCovered:
          type: boolean
      required:
        - currentWindowCount
        - priorWindowCount
        - currentWindowCovered
        - priorWindowCovered
    DirectLiftCountFacts:
      type: object
      additionalProperties: false
      properties:
        currentWindowCount:
          type: integer
          minimum: 0
        priorWindowCount:
          type: integer
          minimum: 0
      required:
        - currentWindowCount
        - priorWindowCount
  responses:
    BadRequestError:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFoundError:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    LiftPopulationTooLargeError:
      description: >-
        Direct-lift evaluation cannot process a measured-page population above
        5,000 pages
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Error'
              - type: object
                properties:
                  error:
                    const: lift_population_too_large
                  message:
                    const: >-
                      Direct-lift evaluation supports a maximum measured-page
                      population of 5,000 pages
                  status:
                    const: 422
    RateLimitExceededError:
      description: Rate limit exceeded
      headers:
        X-RateLimit-Limit:
          $ref: '#/components/headers/X-RateLimit-Limit'
        X-RateLimit-Remaining:
          $ref: '#/components/headers/X-RateLimit-Remaining'
        X-RateLimit-Reset:
          $ref: '#/components/headers/X-RateLimit-Reset'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  headers:
    X-RateLimit-Limit:
      description: Maximum requests per window
      schema:
        type: integer
    X-RateLimit-Remaining:
      description: Requests remaining in current window
      schema:
        type: integer
    X-RateLimit-Reset:
      description: Unix timestamp when the window resets
      schema:
        type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key with dtk_live_ prefix. Obtain it from API Keys in the account
        sidebar. New keys start with all supported scopes selected for the
        chosen project, and you can narrow them to specific read/write scopes as
        needed.

````