---
title: "Analytics API"
description: "API for accessing and managing MapTiler Cloud analytics data."
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Analytics API

## Analytics API reference

Configure your environment settings below to update code samples:

-   **Client Libraries** – select your preferred programming language of the code examples.

  Scalar API Reference

-   [
    
    Introduction
    
    ](#description/introduction)
-   [
    
    analytics
    
    ](#tag/analytics)
    
    Close Group - analytics
    
    -   [
        
        Get usage analytics timeline
        
        HTTP Method:  GET](#tag/analytics/GET/analytics/api_usage/timeline)
    -   [
        
        Get top usage analytics
        
        HTTP Method:  GET](#tag/analytics/GET/analytics/api_usage/top)

[Powered by Scalar](https://www.scalar.com)

v1.0

OpenAPI 3.0.2

# MapTiler Service API

[Support](mailto:support@maptiler.com)

[](https://docs.maptiler.com/support/requests/)

[Terms of Service](https://www.maptiler.com/terms/)

Server

Server:https://service.maptiler.com/v1

MapTiler Service API

Client Libraries

Shell

Ruby

Node.js

PHP

Python

MoreSelect from all clients

Shell Curl

## analytics

​Copy link

analytics Operations

-   get/analytics/api\_usage/timeline
-   get/analytics/api\_usage/top

### Get usage analytics timeline

​Copy link

Auth Required

Query Parameters

-   periodCopy link to period
    
    Type: string enum
    
    required
    
    -   billing periods are based on account subscription
    -   for classifiers api\_keys and service\_credentials are **supported only daily periods**: current\_billing\_period, last\_billing\_period, past\_30\_days, past\_90\_days
    
    values
    
    -   current\_billing\_period
        
    -   last\_billing\_period
        
    -   past\_30\_days
        
    -   past\_90\_days
        
    -   past\_12\_billing\_periods
        
    -   past\_12\_months
        
    -   all
        
    
-   classifierCopy link to classifier
    
    Type: string enum
    
    required
    
    classifies datasets
    
    values
    
    -   services
        
    -   api\_keys
        
    -   service\_credentials
        
    
-   groupCopy link to group
    
    Type: string enum
    
    group ID filter, **mandatory for CSV format**
    
    values
    
    -   request
        
    -   session
        
    -   export
        
    
-   formatCopy link to format
    
    Type: string enum
    
    Default
    
    json
    
    response media type
    
    values
    
    -   json
        
    -   csv
        
    

Responses

-   200
    
    Usage analytics timeline response, further description is within each media type schema.
    
    Selected Content Type: application/json
    
-   400
    
    -   `period_not_found`: Selected time period does not exist (for example last\_billing\_period of new account)
    -   `account_over_limit`: Account currently has too many entities (api\_keys or service\_credentials) to be queried.
    -   `response_too_large`: There were too much data in the result (could be historical).
    

Request Example for get/analytics/api\_usage/timeline

Shell Curl

```curl
curl 'https://service.maptiler.com/v1/analytics/api_usage/timeline?period=current_billing_period&classifier=services'
```

Copy

Copy

Status: 200Status: 400

Show Schema 

```json
{
  "since": "2026-08-31",
  "until": "2026-08-31",
  "datasets": [
    {
      "group_id": "request",
      "item_id": "string",
      "data": [
        {
          "date": "2026-08-31",
          "value": 1
        }
      ],
      "estimated_data": {
        "date": "2026-08-31",
        "value": 1
      }
    }
  ],
  "legend": [
    {
      "item_id": "string",
      "label": "string",
      "description": null
    }
  ]
}
```

JSONCopy

JSONCopy

Usage analytics timeline response, further description is within each media type schema.

### Get top usage analytics

​Copy link

Auth Required

Query Parameters

-   periodCopy link to period
    
    Type: string enum
    
    required
    
    -   billing periods are based on account subscription
    -   for classifiers api\_keys and service\_credentials are **supported only daily periods**: current\_billing\_period, last\_billing\_period, past\_30\_days, past\_90\_days
    
    values
    
    -   current\_billing\_period
        
    -   last\_billing\_period
        
    -   past\_30\_days
        
    -   past\_90\_days
        
    -   past\_12\_billing\_periods
        
    -   past\_12\_months
        
    -   all
        
    
-   classifierCopy link to classifier
    
    Type: string enum
    
    required
    
    classifies datasets
    
    values
    
    -   services
        
    -   api\_keys
        
    -   service\_credentials
        
    
-   groupCopy link to group
    
    Type: string enum
    
    group ID filter, **mandatory for CSV format**
    
    values
    
    -   request
        
    -   session
        
    -   export
        
    
-   formatCopy link to format
    
    Type: string enum
    
    Default
    
    json
    
    response media type
    
    values
    
    -   json
        
    -   csv
        
    
-   limitCopy link to limit
    
    Type: integer
    
    Default
    
    10
    
    number of top items within response group
    

Responses

-   200
    
    Usage analytics top response, further description is within each media type schema.
    
    Selected Content Type: application/json
    
-   400
    
    -   `period_not_found`: Selected time period does not exist (for example last\_billing\_period of new account)
    

Request Example for get/analytics/api\_usage/top

Shell Curl

```curl
curl 'https://service.maptiler.com/v1/analytics/api_usage/top?period=current_billing_period&classifier=services'
```

Copy

Copy

Status: 200Status: 400

Show Schema 

```json
{
  "since": "2026-08-31",
  "until": "2026-08-31",
  "datasets": [
    {
      "group_id": "request",
      "data": [
        {
          "item_id": "string",
          "value": 1
        }
      ]
    }
  ],
  "legend": [
    {
      "item_id": "string",
      "label": "string",
      "description": null
    }
  ]
}
```

JSONCopy

JSONCopy

Usage analytics top response, further description is within each media type schema.
