---
title: "Get Stats for an API Call for a Specific Time Period"
method: GET
path: "/calls/{id}/stats/"
---

# Get Stats for an API Call for a Specific Time Period

`GET /calls/{id}/stats/`

## Request

- Base URL: `https://client.apimetrics.io/api/2`
- URL: `https://client.apimetrics.io/api/2/calls/{id}/stats/`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/apicontext/apis/api-settings/docs/calls/:id/stats/get.ts> (a function with typed inputs; its response is checked against the schema)

Use this API to get the latency stats for an hour, day, week or month.

## Path parameters

- `id` string, required

## Query parameters

- `kind` string, required
- `time` string, date, required
- `type` string, required
- `location_id` string

## Response `200`

200

- object
  - `meta` object
    - `kind` string
    - `call_id` string
    - `type` string
    - `time` string
    - `location_id` string
    - `name` string
  - `stat` object
    - `avg_latency` number
    - `max_latency` integer
    - `time` string
    - `count` integer

## Other responses

- `400`: 400

---

[API](https://skmtc.dev/apicontext/apis/api-settings.md) - [All operations](https://skmtc.dev/apicontext/apis/api-settings/llms.txt) - [OpenAPI document](https://skmtc.dev/apicontext/apis/api-settings/revisions/2e9a62324e82?raw)
