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

# Traffic & Engagement API

> Visit estimates, engagement metrics, and traffic-source breakdown.



## OpenAPI

````yaml openapi.json GET /v1/website/traffic/domains/{domain}
openapi: 3.0.0
info:
  title: ScoutLayer API
  version: 1.0.0
  description: Competitor data. One API.
servers:
  - url: https://api.scoutlayer.io
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/website/traffic/domains/{domain}:
    get:
      tags:
        - website
        - traffic
        - domains
      summary: Get traffic/engagement estimates for a domain
      description: Visit estimates, engagement metrics, and traffic-source breakdown.
      parameters:
        - schema:
            type: string
            minLength: 1
            example: wikipedia.org
          required: true
          name: domain
          in: path
      responses:
        '200':
          description: Get traffic/engagement estimates for a domain
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainOverview'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Insufficient credits
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: This endpoint is declared but not yet implemented — never charged
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: The orchestrator failed or was unreachable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    DomainOverview:
      type: object
      properties:
        domain:
          type: string
        title:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        categoryPath:
          type: array
          items:
            type: string
          description: >-
            Category hierarchy, most general first, e.g.
            ["computers_electronics_and_technology",
            "programming_and_developer_software"]
        dataAsOf:
          type: string
          description: >-
            The date this traffic snapshot covers (upstream's own reporting
            period, not when we fetched it)
        period:
          type: string
          description: e.g. "2026-06"
        checkedAt:
          type: string
        engagement:
          type: object
          properties:
            visits:
              type: integer
              nullable: true
            bounceRate:
              type: number
              nullable: true
              minimum: 0
              maximum: 1
            pagesPerVisit:
              type: number
              nullable: true
            avgVisitDurationSec:
              type: number
              nullable: true
          required:
            - visits
            - bounceRate
            - pagesPerVisit
            - avgVisitDurationSec
        monthlyVisits:
          type: array
          items:
            type: object
            properties:
              month:
                type: string
                example: 2026-04
              visits:
                type: integer
            required:
              - month
              - visits
        sources:
          type: object
          properties:
            direct:
              type: number
              nullable: true
            searchOrganic:
              type: number
              nullable: true
            searchPaid:
              type: number
              nullable: true
            socialOrganic:
              type: number
              nullable: true
            socialPaid:
              type: number
              nullable: true
            referrals:
              type: number
              nullable: true
            mail:
              type: number
              nullable: true
            displayAds:
              type: number
              nullable: true
            affiliate:
              type: number
              nullable: true
            genAi:
              type: number
              nullable: true
              description: Share of traffic referred by AI chatbots/assistants
          required:
            - direct
            - searchOrganic
            - searchPaid
            - socialOrganic
            - socialPaid
            - referrals
            - mail
            - displayAds
            - affiliate
            - genAi
        topCountries:
          type: array
          items:
            type: object
            properties:
              countryCode:
                type: string
              share:
                type: number
            required:
              - countryCode
              - share
        globalRank:
          type: integer
          nullable: true
        countryRank:
          type: object
          nullable: true
          properties:
            countryCode:
              type: string
            rank:
              type: integer
          required:
            - countryCode
            - rank
        categoryRank:
          type: object
          nullable: true
          properties:
            category:
              type: string
            rank:
              type: integer
          required:
            - category
            - rank
        globalCategoryRank:
          type: object
          nullable: true
          properties:
            category:
              type: string
            rank:
              type: integer
          required:
            - category
            - rank
        topKeywords:
          type: array
          items:
            type: object
            properties:
              keyword:
                type: string
              searchVolume:
                type: integer
                nullable: true
              cpc:
                type: number
                nullable: true
              trafficScore:
                type: number
                nullable: true
            required:
              - keyword
              - searchVolume
              - cpc
              - trafficScore
        similarSites:
          type: array
          items:
            type: object
            properties:
              domain:
                type: string
              affinity:
                type: number
                nullable: true
            required:
              - domain
              - affinity
          description: >-
            Shape inferred, not yet verified against a live response where this
            is non-empty — see docs/vendor-endpoint-plan.md §10 item 11
        aiTraffic:
          type: object
          properties:
            visits:
              type: number
              nullable: true
            share:
              type: number
              nullable: true
            byChatbot:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  share:
                    type: number
                required:
                  - name
                  - share
            history:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  month:
                    type: string
                  share:
                    type: number
                required:
                  - name
                  - month
                  - share
            topPrompts:
              type: array
              nullable: true
              items:
                type: string
              description: >-
                null when this data isn't available for the domain (e.g. too
                little traffic) — never an error string
          required:
            - visits
            - share
            - byChatbot
            - history
            - topPrompts
        quality:
          type: object
          properties:
            isLowTraffic:
              type: boolean
              description: True when traffic is too low for upstream to estimate reliably
            isAnalyticsVerified:
              type: boolean
              description: >-
                True when the site has verified analytics (e.g. Google
                Analytics) wired up, making estimates more accurate
          required:
            - isLowTraffic
            - isAnalyticsVerified
      required:
        - domain
        - title
        - description
        - categoryPath
        - dataAsOf
        - period
        - checkedAt
        - engagement
        - monthlyVisits
        - sources
        - topCountries
        - globalRank
        - countryRank
        - categoryRank
        - globalCategoryRank
        - topKeywords
        - similarSites
        - aiTraffic
        - quality
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
          required:
            - code
            - message
      required:
        - error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key passed as the X-API-Key request header. Recommended for
        server-to-server calls.
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key (or OAuth token) passed as a Bearer token in the Authorization
        header.

````