# Get response times over time
URL: https://musicapi.com/docs/reference/usage-response-times.md

`GET https://api.musicapi.com/public/analytics/response-times`

Section: Billing and usage.
Product: MusicAPI Core and MusicAPI Managed Transfers.
Auth: Basic, DocsSession (any one of them). Use Basic with your Client ID and Client Secret from your server only.

The average, median, 95th and 99th percentile response times of your requests in each period. Requires Client Secret authentication. Not billed.

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `startDate` | string | yes | The first day of the range (UTC), for example `2026-10-01`. The day counts. |
| `endDate` | string | yes | The last day of the range (UTC). The day counts, so `startDate` = `endDate` is one day. The range may hold at most 366 days, or 31 days for an `hourly` series. |
| `granularity` | hourly \\| daily \\| weekly \\| monthly | no | The length of one `period`. A week starts on Sunday. Default: `daily`. |
| `integrationType` | spotify \\| appleMusic \\| youtube \\| tidal \\| resso \\| boomplay \\| amazonMusic \\| deezer \\| pandora \\| soundCloud \\| youtubeMusic \\| napster \\| qobuz \\| qqMusic \\| yandexMusic \\| vkMusic \\| anghami \\| zvuk \\| gaana \\| jiosaavn \\| audiomack | no | Count only the requests for this music service. Leave it out for every service. |

## Response 200

One row for each period with requests, oldest first.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] | yes |  |
| `data[].period` | string | yes | The start of the period in UTC, `YYYY-MM-DD hh:mm:ss`. |
| `data[].avg_ms` | number | yes | The average response time in milliseconds. |
| `data[].p50_ms` | number | yes | The median response time in milliseconds. |
| `data[].p95_ms` | number | yes | The 95th percentile in milliseconds. |
| `data[].p99_ms` | number | yes | The 99th percentile in milliseconds. |

```json
{
  "data": [
    {
      "period": "2026-10-01 00:00:00",
      "avg_ms": 0,
      "p50_ms": 0,
      "p95_ms": 0,
      "p99_ms": 0
    }
  ]
}
```

## Errors

- 400: A date is missing or not valid, `endDate` is before `startDate`, or the range is too long.
- 401: The request has no credentials.
- 403: The request does not use Client Secret authentication.
- 429: Your account sent more calls this minute than its rate limit allows.

## Example

```bash
curl https://api.musicapi.com/public/analytics/response-times \
  -u "$MUSICAPI_CLIENT_ID:$MUSICAPI_CLIENT_SECRET"
```
