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

# Get usage analytics

> Retrieve usage statistics for the organization within a specified date range.
Optionally group the results by API key or by API key and day.



## OpenAPI

````yaml get /v2/admin/analytics
openapi: 3.0.3
info:
  title: DeepL API Documentation
  description: >-
    The DeepL API provides programmatic access to DeepL’s language AI
    technology.


    Note: this OpenAPI spec is embedded into our API documentation and has
    shortened descriptions.
  termsOfService: https://www.deepl.com/pro-license
  contact:
    name: DeepL - Contact us
    url: https://www.deepl.com/contact-us
  version: 3.9.0
servers:
  - url: https://api.deepl.com
    description: DeepL API Pro
  - url: https://api-free.deepl.com
    description: DeepL API Free
security: []
tags:
  - name: beta
    description: >-
      Experimental features that are under testing and not yet intended for
      production use.
  - name: TranslateText
    description: >-
      The text-translation API currently consists of a single endpoint,
      `translate`, which is described below.
  - name: TranslateDocuments
    description: >-
      The document translation API allows you to translate whole documents and
      supports the following file types and extensions:
        * `docx` - Microsoft Word Document
        * `pptx` - Microsoft PowerPoint Document
        * `xlsx` - Microsoft Excel Document
        * `pdf` - Portable Document Format
        * `htm / html` - HTML Document
        * `txt` - Plain Text Document
        * `xlf / xliff` - XLIFF Document, version 2.1
        * `srt` - SRT Document
        * `jpeg` / `jpg` / `png` - Image (currently in beta)
  - name: RephraseText
    description: >-
      The `rephrase` endpoint  is used to make corrections and adjustments to
      texts based on style or tone.
  - name: ManageMultilingualGlossaries
    description: >-
      The *glossary* functions allow you to create, inspect, edit and delete
      glossaries.

      Glossaries created with the glossary function can be used in translate
      requests by specifying the

      `glossary_id` parameter. A glossary contains (several) dictionaries.

      A dictionary is a mapping of source phrases to target phrases for a single
      language pair.

      If you encounter issues, please let us know at support@DeepL.com.


      Currently you can create glossaries with any of the languages DeepL
      supports (with the exception of Thai).


      The maximum size limit for a glossary is 10 MiB = 10485760 bytes and each
      source/target text,

      as well as the name of the glossary, is limited to 1024 UTF-8 bytes.

      A total of 1000 glossaries are allowed per account.


      When creating a dictionary with target language `EN`, `PT`, or `ZH`, it's
      not necessary to specify a variant

      (e.g. `EN-US`, `EN-GB`, `PT-PT`, `PT-BR`, or `ZH-HANS`).

      Dictionaries with target language `EN` can be used in translations with
      either English variant.

      Similarly `PT`, and `ZH` dictionaries can be used in translations with
      their corresponding variants.

      (When you provide the ID of a glossary to a translation, the appropriate
      dictionary is automatically applied. Currently glossaries can not yet be
      used with source language detection.)


      Glossaries created via the DeepL API are now unified with glossaries
      created via the DeepL website and DeepL apps.

      Please only use the v3 glossary API in conjunction with multilingual or
      edited glossaries from the website.
  - name: ManageGlossaries
    description: >-
      Please note that this is the spec for the (old) v2 glossary endpoint.

      We recommend users switch to the newer v3 glossary endpoints, which
      support editability and multilinguality.


      The *glossary* functions allow you to create, inspect, and delete
      glossaries.

      Glossaries created with the glossary function can be used in translate
      requests by specifying the

      `glossary_id` parameter.

      If you encounter issues, please let us know at support@DeepL.com.


      Currently you can create glossaries with any of the languages DeepL
      supports (with the exception of Thai).
  - name: MetaInformation
    description: Information about API usage and value ranges
  - name: TranslationMemories
    description: >-
      The translation memory endpoints allow you to interact with your account's
      translation memories, used to store

      and reuse previously created translations. Translation memories can be
      used in text translation requests by

      specifying the `translation_memory_id` parameter to denote a specific
      translation memory and the

      `translation_memory_threshold` which defines the minimum matching
      percentage required for a translation memory

      segment to be applied (recommended to be 75% or higher).
  - name: VoiceAPI
    description: >-
      The Voice API provides real-time voice transcription and translation
      services.

      Use a two-step flow: first request a streaming URL via REST, then
      establish a WebSocket connection for streaming audio and receiving
      transcriptions.
  - name: VoiceTranslateJob
    description: >-
      **Alpha.** Async voice translation jobs. This API may change without
      notice.
externalDocs:
  description: DeepL Pro - Plans and pricing
  url: https://www.deepl.com/pro#developer
paths:
  /v2/admin/analytics:
    get:
      tags:
        - AdminApi
      summary: Get usage statistics as an admin
      description: >-
        Retrieve usage statistics for the organization within a specified date
        range.

        Optionally group the results by API key or by API key and day.
      operationId: adminGetAnalytics
      parameters:
        - name: start_date
          in: query
          required: true
          description: Start date for the usage report (ISO 8601 date format).
          schema:
            type: string
            format: date
          example: '2025-09-29'
        - name: end_date
          in: query
          required: true
          description: End date for the usage report (ISO 8601 date format).
          schema:
            type: string
            format: date
          example: '2025-10-01'
        - name: group_by
          in: query
          required: false
          description: |-
            Optional parameter to group usage statistics. Possible values:
             * `key` - Group by API key
             * `key_and_day` - Group by API key and usage date
          schema:
            type: string
            enum:
              - key
              - key_and_day
          example: key_and_day
      responses:
        '200':
          description: The usage statistics for the specified date range.
          headers:
            X-Trace-ID:
              $ref: '#/components/headers/X-Trace-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AdminUsageReport'
              examples:
                withGrouping:
                  summary: Usage report grouped by key and day
                  value:
                    usage_report:
                      total_usage:
                        total_characters: 9619
                        text_translation_characters: 4892
                        document_translation_characters: 0
                        text_improvement_characters: 4727
                        speech_to_text_minutes: 107.46
                      group_by: key_and_day
                      start_date: '2025-09-29T00:00:00'
                      end_date: '2025-10-01T00:00:00'
                      key_and_day_usages:
                        - api_key: dc88****3a2c
                          api_key_label: Staging API Key
                          usage_date: '2025-09-29T00:00:00Z'
                          usage:
                            total_characters: 315
                            text_translation_characters: 159
                            document_translation_characters: 0
                            text_improvement_characters: 156
                            speech_to_text_minutes: 11.94
                withoutGrouping:
                  summary: Usage report without grouping
                  value:
                    usage_report:
                      total_usage:
                        total_characters: 9619
                        text_translation_characters: 4892
                        document_translation_characters: 0
                        text_improvement_characters: 4727
                        speech_to_text_minutes: 107.46
                      start_date: '2025-09-29T00:00:00'
                      end_date: '2025-10-01T00:00:00'
        '400':
          description: Bad request. Please check error message and your parameters.
          headers:
            X-Trace-ID:
              $ref: '#/components/headers/X-Trace-ID'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the issue.
              examples:
                dateRangeExceeded:
                  summary: Date range exceeds maximum allowed
                  value:
                    message: 'Bad request. Reason: Date range cannot exceed 366 days'
                invalidGroupBy:
                  summary: Invalid group_by parameter value
                  value:
                    message: >-
                      Value for 'group_by' not supported. Allowed: '', 'key',
                      'key_and_day'.
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - auth_header: []
components:
  headers:
    X-Trace-ID:
      description: >-
        A unique identifier for the request that can be included in bug reports
        to DeepL support.
      schema:
        type: string
      example: 501c3d93cc0c4f11ae2f60a226c2f0f0
  schemas:
    AdminUsageReport:
      type: object
      description: The response for admin usage statistics.
      properties:
        usage_report:
          $ref: '#/components/schemas/AdminUsageReportData'
    AdminUsageReportData:
      type: object
      description: Contains the detailed usage statistics for the specified date range.
      properties:
        total_usage:
          $ref: '#/components/schemas/UsageBreakdown'
        start_date:
          type: string
          format: date-time
          description: Start date of the usage report period.
          example: '2025-09-29T00:00:00'
        end_date:
          type: string
          format: date-time
          description: End date of the usage report period.
          example: '2025-10-01T00:00:00'
        group_by:
          type: string
          description: The grouping method used, if any.
          enum:
            - key
            - key_and_day
          example: key_and_day
        key_usages:
          type: array
          description: Usage statistics grouped by key. Present when group_by='key'.
          items:
            $ref: '#/components/schemas/KeyUsageItem'
        key_and_day_usages:
          type: array
          description: >-
            Usage statistics grouped by key and day. Present when
            group_by='key_and_day'.
          items:
            $ref: '#/components/schemas/KeyAndDayUsageItem'
    UsageBreakdown:
      type: object
      description: Breakdown of character usage by category.
      properties:
        total_characters:
          type: integer
          description: Total number of characters used.
          example: 9619
        text_translation_characters:
          type: integer
          description: Number of characters used for text translation.
          example: 4892
        document_translation_characters:
          type: integer
          description: Number of characters used for document translation.
          example: 0
        text_improvement_characters:
          type: integer
          description: Number of characters used for text improvement.
          example: 4727
        speech_to_text_minutes:
          type: number
          description: Duration of speech-to-text usage in minutes.
          example: 107.46
    KeyUsageItem:
      type: object
      description: Usage statistics for a specific API key and optionally a specific date.
      properties:
        api_key:
          type: string
          description: Masked API key identifier.
          example: db96****cb2c
        api_key_label:
          type: string
          description: Label associated with the API key.
          example: DeepL API Key Prod
        usage:
          $ref: '#/components/schemas/UsageBreakdown'
    KeyAndDayUsageItem:
      type: object
      description: Usage statistics for a specific API key and optionally a specific date.
      properties:
        api_key:
          type: string
          description: Masked API key identifier.
          example: db96****cb2c
        api_key_label:
          type: string
          description: Label associated with the API key.
          example: DeepL API Key Prod
        usage_date:
          type: string
          format: date-time
          description: The usage date. Only present when group_by is "key_and_day".
          example: '2025-09-29T00:00:00Z'
        usage:
          $ref: '#/components/schemas/UsageBreakdown'
  responses:
    Forbidden:
      description: >-
        Authorization failed. Please supply a valid `DeepL-Auth-Key` via the
        `Authorization` header.
    NotFound:
      description: The requested resource could not be found.
    InternalServerError:
      description: Internal error.
  securitySchemes:
    auth_header:
      type: apiKey
      description: >
        Authentication with `Authorization` header and  `DeepL-Auth-Key`
        authentication scheme. Example:  `DeepL-Auth-Key <api-key>`
      name: Authorization
      in: header
      x-default: 'DeepL-Auth-Key '

````