---
title: "Get Time Stats."
method: GET
path: "/website/{hostname}/time"
tags: ["stats"]
---

# Get Time Stats.

`GET /website/{hostname}/time`

Get a list of pages and their time stats.

## Path parameters

- `hostname` string, hostname, required

## Query parameters

- `summary` boolean
- `start` string, date
- `end` string, date
- `interval` 'hour' | 'day' | 'week' | 'month' | 'year'
- `path` FilterString
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `contains` string — Contains.
  - `not_contains` string — Does not contain.
  - `starts_with` string — Starts with.
  - `not_starts_with` string — Does not start with.
  - `ends_with` string — Ends with.
  - `not_ends_with` string — Does not end with.
  - `in` string — In.
  - `not_in` string — Not in.
- `referrer_host` FilterString
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `contains` string — Contains.
  - `not_contains` string — Does not contain.
  - `starts_with` string — Starts with.
  - `not_starts_with` string — Does not start with.
  - `ends_with` string — Ends with.
  - `not_ends_with` string — Does not end with.
  - `in` string — In.
  - `not_in` string — Not in.
- `referrer_path` FilterString
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `contains` string — Contains.
  - `not_contains` string — Does not contain.
  - `starts_with` string — Starts with.
  - `not_starts_with` string — Does not start with.
  - `ends_with` string — Ends with.
  - `not_ends_with` string — Does not end with.
  - `in` string — In.
  - `not_in` string — Not in.
- `utm_source` FilterString
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `contains` string — Contains.
  - `not_contains` string — Does not contain.
  - `starts_with` string — Starts with.
  - `not_starts_with` string — Does not start with.
  - `ends_with` string — Ends with.
  - `not_ends_with` string — Does not end with.
  - `in` string — In.
  - `not_in` string — Not in.
- `utm_medium` FilterString
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `contains` string — Contains.
  - `not_contains` string — Does not contain.
  - `starts_with` string — Starts with.
  - `not_starts_with` string — Does not start with.
  - `ends_with` string — Ends with.
  - `not_ends_with` string — Does not end with.
  - `in` string — In.
  - `not_in` string — Not in.
- `utm_campaign` FilterString
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `contains` string — Contains.
  - `not_contains` string — Does not contain.
  - `starts_with` string — Starts with.
  - `not_starts_with` string — Does not start with.
  - `ends_with` string — Ends with.
  - `not_ends_with` string — Does not end with.
  - `in` string — In.
  - `not_in` string — Not in.
- `browser` FilterFixed
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `in` string — In.
  - `not_in` string — Not in.
- `browser_version` FilterString
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `contains` string — Contains.
  - `not_contains` string — Does not contain.
  - `starts_with` string — Starts with.
  - `not_starts_with` string — Does not start with.
  - `ends_with` string — Ends with.
  - `not_ends_with` string — Does not end with.
  - `in` string — In.
  - `not_in` string — Not in.
- `os` FilterFixed
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `in` string — In.
  - `not_in` string — Not in.
- `device` FilterFixed
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `in` string — In.
  - `not_in` string — Not in.
- `country` FilterFixed
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `in` string — In.
  - `not_in` string — Not in.
- `language` FilterFixed
  - `eq` string — Equal to.
  - `neq` string — Not equal to.
  - `in` string — In.
  - `not_in` string — Not in.
- `limit` integer

## Cookies

- `_me_sess` string, required

## Response `200`

OK

- object[]
  - `path` string, required — Pathname of the page.
  - `title` string — Title of the page.
  - `duration` integer, required — Median time spent on page in milliseconds.
  - `duration_upper_quartile` integer — Total time spent on page in milliseconds for the upper quartile (75%).
  - `duration_lower_quartile` integer — Total time spent on page in milliseconds for the lower quartile (25%).
  - `duration_percentage` number, float, required — Percentage of time contributing to the total time spent on the website.
  - `uniques` integer — Number of unique users.
  - `bounces` integer — Number of bounces.

## Other responses

- `400` — 400 Bad Request.
- `401` — 401 Unauthorised.
- `404` — 404 Not Found.
- `500` — 500 Unexpected Internal Server Error.

## Changes

- **2024-01-22** `dae198e1ff1d` — 1 warning, 10 info
  - deleted the `query` request parameter `referrer`
  - added the new optional `query` request parameter `browser_version`
  - added the new optional `query` request parameter `country`
  - added the new optional `query` request parameter `device`
  - …7 more
- **2024-01-21** `313050fcf691` — 2 breaking, 3 info
  - for the `query` request parameter `path`, the type changed from `string` to `object`
  - for the `query` request parameter `referrer`, the type changed from `string` to `object`
  - added the new optional `query` request parameter `browser`
  - for the `query` request parameter `path`, the minLength was decreased from `1` to `0`
  - …1 more
- **2024-01-14** `7c58b24203d3` — 2 breaking, 1 info
  - for the `query` request parameter `end`, the format changed from no format to `date`
  - for the `query` request parameter `start`, the format changed from no format to `date`
  - added the new optional `query` request parameter `interval`
- **2023-11-28** `ad1b7807e234` — 1 info
  - added the new optional `query` request parameter `referrer`
- **2023-11-26** `7b5f5d8f1964` — 1 info
  - added the new optional `query` request parameter `path`

[Full history](https://skmtc.dev/medama-io/apis/medama-analytics-api/changes/website/:hostname/time/get.md)

---

[API](https://skmtc.dev/medama-io/apis/medama-analytics-api.md) · [All operations](https://skmtc.dev/medama-io/apis/medama-analytics-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medama-io/apis/medama-analytics-api/revisions/dae198e1ff1d?raw)
