curl "https://api.shortkit.dev/v1/metrics/views/timeseries?timeframe[]=30:days" \
-H "Authorization: Bearer sk_live_your_secret_key"
import requests
resp = requests.get(
"https://api.shortkit.dev/v1/metrics/views/timeseries",
headers={"Authorization": "Bearer sk_live_your_secret_key"},
params={"timeframe[]": "30:days"},
)
timeseries = resp.json()["data"]
for point in timeseries:
print(f"{point['date']}: {point['value']}")
const resp = await fetch(
"https://api.shortkit.dev/v1/metrics/views/timeseries?timeframe[]=30:days",
{
headers: { Authorization: "Bearer sk_live_your_secret_key" },
}
);
const { data: timeseries } = await resp.json();
timeseries.forEach(({ date, value }) => console.log(`${date}: ${value}`));
{
"data": [
{ "date": "2026-02-01T00:00:00Z", "value": 1823 },
{ "date": "2026-02-02T00:00:00Z", "value": 2105 },
{ "date": "2026-02-03T00:00:00Z", "value": 1950 },
{ "date": "2026-02-04T00:00:00Z", "value": 2340 },
{ "date": "2026-02-05T00:00:00Z", "value": 2180 }
],
"timeframe": [1738368000, 1740960000],
"meta": {
"request_id": "req_m002"
}
}
Analytics & Events
Get Metric Timeseries
Returns time-bucketed metric values for charting.
GET
/
v1
/
metrics
/
{metric}
/
timeseries
curl "https://api.shortkit.dev/v1/metrics/views/timeseries?timeframe[]=30:days" \
-H "Authorization: Bearer sk_live_your_secret_key"
import requests
resp = requests.get(
"https://api.shortkit.dev/v1/metrics/views/timeseries",
headers={"Authorization": "Bearer sk_live_your_secret_key"},
params={"timeframe[]": "30:days"},
)
timeseries = resp.json()["data"]
for point in timeseries:
print(f"{point['date']}: {point['value']}")
const resp = await fetch(
"https://api.shortkit.dev/v1/metrics/views/timeseries?timeframe[]=30:days",
{
headers: { Authorization: "Bearer sk_live_your_secret_key" },
}
);
const { data: timeseries } = await resp.json();
timeseries.forEach(({ date, value }) => console.log(`${date}: ${value}`));
{
"data": [
{ "date": "2026-02-01T00:00:00Z", "value": 1823 },
{ "date": "2026-02-02T00:00:00Z", "value": 2105 },
{ "date": "2026-02-03T00:00:00Z", "value": 1950 },
{ "date": "2026-02-04T00:00:00Z", "value": 2340 },
{ "date": "2026-02-05T00:00:00Z", "value": 2180 }
],
"timeframe": [1738368000, 1740960000],
"meta": {
"request_id": "req_m002"
}
}
Returns metric values bucketed over time. Granularity is automatic: hourly for ranges of 24 hours or less, daily otherwise.
Daily total watch time over 7 days:
Path parameters
string
required
Metric to query. See Metrics Overview for the full list.
Query parameters
string
Aggregation function:
sum or avg. Only applies to aggregate metrics. Count metrics ignore this parameter.string
default:"7:days"
Time range. Relative (
7:days, 24:hours) or absolute (two Unix timestamps).curl "https://api.shortkit.dev/v1/metrics/views/timeseries?timeframe[]=30:days" \
-H "Authorization: Bearer sk_live_your_secret_key"
import requests
resp = requests.get(
"https://api.shortkit.dev/v1/metrics/views/timeseries",
headers={"Authorization": "Bearer sk_live_your_secret_key"},
params={"timeframe[]": "30:days"},
)
timeseries = resp.json()["data"]
for point in timeseries:
print(f"{point['date']}: {point['value']}")
const resp = await fetch(
"https://api.shortkit.dev/v1/metrics/views/timeseries?timeframe[]=30:days",
{
headers: { Authorization: "Bearer sk_live_your_secret_key" },
}
);
const { data: timeseries } = await resp.json();
timeseries.forEach(({ date, value }) => console.log(`${date}: ${value}`));
{
"data": [
{ "date": "2026-02-01T00:00:00Z", "value": 1823 },
{ "date": "2026-02-02T00:00:00Z", "value": 2105 },
{ "date": "2026-02-03T00:00:00Z", "value": 1950 },
{ "date": "2026-02-04T00:00:00Z", "value": 2340 },
{ "date": "2026-02-05T00:00:00Z", "value": 2180 }
],
"timeframe": [1738368000, 1740960000],
"meta": {
"request_id": "req_m002"
}
}
Examples
Hourly completions over 24 hours:curl "https://api.shortkit.dev/v1/metrics/completions/timeseries?timeframe[]=24:hours" \
-H "Authorization: Bearer sk_live_your_secret_key"
curl "https://api.shortkit.dev/v1/metrics/watch_time/timeseries?measurement=sum&timeframe[]=7:days" \
-H "Authorization: Bearer sk_live_your_secret_key"