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

# Get content analytics

> Retrieve analytics for some specific content.



## OpenAPI

````yaml get /projects/{project_id}/content/{id}/analytics
openapi: 3.0.1
info:
  title: BeyondWords REST API
  description: |-
    This is the documentation for the BeyondWords REST API.
              You can use this API to use BeyondWords programmatically.
              You can get your API Key and Project ID for each project in the Project settings tab in the BeyondWords
              <a href="https://dash.beyondwords.io/dashboard">dashboard</a>.
  version: 1.0.0
servers:
  - url: https://api.beyondwords.io/v1
security: []
paths:
  /projects/{project_id}/content/{id}/analytics:
    parameters:
      - name: project_id
        in: path
        description: The numeric ID of your project
        required: true
        schema:
          type: string
      - name: id
        in: path
        description: 'The content item''s identifier, one of: UUID, source ID, legacy ID'
        required: true
        schema:
          type: string
    get:
      tags:
        - Analytics
      summary: Content analytics
      description: Retrieve analytics for some specific content.
      operationId: content#analytics
      parameters:
        - name: aggregation
          in: query
          schema:
            type: string
            enum:
              - all
              - hour
              - day
              - week
              - month
              - year
          required: false
          description: |2-

                      The way to aggregate the analytics. Possible values are all (aggregate all data together),
                      year (aggregate data on a yearly basis), month (aggregate data on a yearly basis),
                      week (aggregate data on a yearly basis), day (aggregate data on a yearly basis), or hour
                      (aggregate data on an hourly basis, limited to a time_range 7 days or less).
        - name: time_range[start]
          in: query
          required: false
          description: >-
            The start date of the aggregation period. The value of this property
            should be a string in
                      the format yyyy-mm-dd according to ISO 8601.
          schema:
            type: string
        - name: time_range[end]
          in: query
          required: false
          description: >-
            The end date of the aggregation period. The value of this property
            should be a string
                      in the format yyyy-mm-dd according to ISO 8601. If this is set to today, the current day is still
                      in progress and therefore only partial analytics data is returned until the day ends.
          schema:
            type: string
        - name: metrics[]
          in: query
          schema:
            type: array
            items:
              type: string
          required: false
          description: The metrics that you want to fetch data for
        - name: media_variants[]
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - article
                - summary
          required: false
          description: The media variants to fetch data for
        - name: media_formats[]
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - audio
                - video
          required: false
          description: The media formats to fetch data for
        - name: access_tiers[]
          in: query
          schema:
            type: array
            items:
              type: string
          required: false
          description: The access tiers to fetch data for
      responses:
        '200':
          description: OK
          content:
            application/json:
              examples:
                example:
                  $ref: '#/components/examples/analyticsPerRecordExample'
              schema:
                $ref: '#/components/schemas/analyticsPerRecordModel'
          headers:
            X-BeyondWords-Aggregation:
              description: Analytics aggregation
              schema:
                type: string
              required: false
            X-BeyondWords-Time-Range-Start:
              description: Analytics start time
              schema:
                type: string
              required: false
            X-BeyondWords-Time-Range-End:
              description: Analytics end time
              schema:
                type: string
              required: false
      security:
        - apiKey: []
components:
  examples:
    analyticsPerRecordExample:
      summary: Sample analytics response
      value:
        - start: 2017-02-01T10:05:03Z,
          player_impressions:
            total: 67875276
            desktop: 14265647
            tablet: 998538
            mobile_web: 52611091
            ios: 0
            andriod: 0
          listens:
            total: 313957
            desktop: 92501
            tablet: 6751
            mobile_web: 214705
            ios: 0
            android: 0
          listen_rate:
            total: 0.46
            desktop: 0.65
            tablet: 0.68
            mobile_web: 0.41
            ios: 0
            android: 0
          unique_listeners:
            total: 86919
            desktop: 18255
            tablet: 1308
            mobile_web: 67953
            ios: 0
            android: 0
          avg_listen_time:
            total: 199
            desktop: 216
            tablet: 183
            mobile_web: 190
            ios: 0
            android: 0
          avg_listen_duration:
            total: 52.05
            desktop: 52.89
            tablet: 50.88
            mobile_web: 51.6
            ios: 0
            android: 0
          listen_time:
            total: 251364691
            desktop: 98599149
            tablet: 5830722
            mobile_web: 146934820
            ios: 0
            android: 0
          listener_retention:
            total:
              - 1257519
              - 1085792
              - 937625
              - 804105
              - 679397
              - 562031
              - 451122
              - 345526
              - 245664
              - 148510
            desktop:
              - 454770
              - 400038
              - 348792
              - 300627
              - 254450
              - 210087
              - 167446
              - 126271
              - 86868
              - 48272
            tablet:
              - 31818
              - 27498
              - 23544
              - 20005
              - 16728
              - 13704
              - 10874
              - 8223
              - 5752
              - 3367
            mobile_web:
              - 770931
              - 658256
              - 565289
              - 483473
              - 408219
              - 338240
              - 272802
              - 211032
              - 153044
              - 96871
            ios:
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
            android:
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
              - 0
  schemas:
    analyticsPerRecordModel:
      nullable: false
      type: array
      items:
        type: object
        properties:
          start:
            type: string
            format: date-time
            description: The start date of the aggregation period (ISO 8601).
          player_impressions:
            type: object
            properties:
              total:
                type: integer
                description: Total player loads in the period
              desktop:
                type: integer
                description: Player loads on desktop devices
              tablet:
                type: integer
                description: Player loads on tablets
              mobile_web:
                type: integer
                description: Player loads on mobile web
              ios:
                type: integer
                description: Player loads on iOS devices
              android:
                type: integer
                description: Player loads on Android devices
          listens:
            type: object
            properties:
              total:
                type: integer
                description: Total plays in the period
              desktop:
                type: integer
                description: Plays on desktop devices
              tablet:
                type: integer
                description: Plays on tablets
              mobile_web:
                type: integer
                description: Plays on mobile web
              ios:
                type: integer
                description: Plays on iOS devices
              android:
                type: integer
                description: Plays on Android devices
          listen_rate:
            type: object
            properties:
              total:
                type: number
                description: Proportion of impressions that resulted in a play (0.0–1.0)
              desktop:
                type: number
                description: Desktop listen rate (0.0–1.0)
              tablet:
                type: number
                description: Tablet listen rate (0.0–1.0)
              mobile_web:
                type: number
                description: Mobile web listen rate (0.0–1.0)
              ios:
                type: number
                description: iOS listen rate (0.0–1.0)
              android:
                type: number
                description: Android listen rate (0.0–1.0)
          unique_listeners:
            type: object
            properties:
              total:
                type: integer
                description: >-
                  Approximate unique browser profiles per domain counted once
                  per period (HyperLogLog). This is not a unique person count,
                  and users who opt out of analytics storage are excluded
                  entirely.
              desktop:
                type: integer
                description: >-
                  Approximate unique browser profiles per domain on desktop
                  devices (HyperLogLog). This is not a unique person count, and
                  users who opt out of analytics storage are excluded entirely.
              tablet:
                type: integer
                description: >-
                  Approximate unique browser profiles per domain on tablet
                  devices (HyperLogLog). This is not a unique person count, and
                  users who opt out of analytics storage are excluded entirely.
              mobile_web:
                type: integer
                description: >-
                  Approximate unique browser profiles per domain on mobile web
                  (HyperLogLog). This is not a unique person count, and users
                  who opt out of analytics storage are excluded entirely.
              ios:
                type: integer
                description: >-
                  Approximate unique browser profiles per domain on iOS devices
                  (HyperLogLog). This is not a unique person count, and users
                  who opt out of analytics storage are excluded entirely.
              android:
                type: integer
                description: >-
                  Approximate unique browser profiles per domain on Android
                  devices (HyperLogLog). This is not a unique person count, and
                  users who opt out of analytics storage are excluded entirely.
          avg_listen_time:
            type: object
            properties:
              total:
                type: integer
                description: >-
                  Average play time per session in seconds (audio or video).
                  This metric may be understated when play progress is stored as
                  every 10% milestone event per session instead of only a final
                  event.
              desktop:
                type: integer
                description: >-
                  Average play time on desktop in seconds. This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              tablet:
                type: integer
                description: >-
                  Average play time on tablets in seconds. This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              mobile_web:
                type: integer
                description: >-
                  Average play time on mobile web in seconds. This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              ios:
                type: integer
                description: >-
                  Average play time on iOS in seconds. This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              android:
                type: integer
                description: >-
                  Average play time on Android in seconds. This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
          avg_listen_duration:
            type: object
            properties:
              total:
                type: number
                description: >-
                  Average percentage of the item consumed (0-100). This metric
                  may be understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              desktop:
                type: number
                description: >-
                  Desktop consumption percentage (0-100). This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              tablet:
                type: number
                description: >-
                  Tablet consumption percentage (0-100). This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              mobile_web:
                type: number
                description: >-
                  Mobile web consumption percentage (0-100). This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              ios:
                type: number
                description: >-
                  iOS consumption percentage (0-100). This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
              android:
                type: number
                description: >-
                  Android consumption percentage (0-100). This metric may be
                  understated when play progress is stored as every 10%
                  milestone event per session instead of only a final event.
          listen_time:
            type: object
            properties:
              total:
                type: integer
                description: Total play time in milliseconds (audio or video)
              desktop:
                type: integer
                description: Total play time on desktop (ms)
              tablet:
                type: integer
                description: Total play time on tablets (ms)
              mobile_web:
                type: integer
                description: Total play time on mobile web (ms)
              ios:
                type: integer
                description: Total play time on iOS (ms)
              android:
                type: integer
                description: Total play time on Android (ms)
          listener_retention:
            type: object
            properties:
              total:
                type: array
                items:
                  type: integer
                description: Retention curve as an array of percentages (0–100)
              desktop:
                type: array
                items:
                  type: integer
              tablet:
                type: array
                items:
                  type: integer
              mobile_web:
                type: array
                items:
                  type: integer
              ios:
                type: array
                items:
                  type: integer
              android:
                type: array
                items:
                  type: integer
  securitySchemes:
    apiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````