---
title: "Get visitor statistics for a website"
method: GET
path: "/v1/hosting/websites/{website_id}/visitors"
tags: ["Website"]
---

# Get visitor statistics for a website

`GET /v1/hosting/websites/{website_id}/visitors`

## Request

- Base URL: `https://api.10web.io`
- URL: `https://api.10web.io/v1/hosting/websites/{website_id}/visitors`
- Auth: none declared. Required headers: `x-api-key`
- TypeScript: <https://skmtc.dev/10web/apis/10web-api-v1/docs/v1/hosting/websites/:website_id/visitors/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `website_id` integer, required

## Query parameters

- `period` 'day' | 'week' | 'month' | 'year'

## Headers

- `x-api-key` string, required

## Response `200`

Visitor statistics retrieved successfully

- object
  - `status` 'ok' | 'error'
  - `data` object[]
    - `count` integer: Number of visitors for that date
    - `date` string, date: Date in YYYY-MM-DD format
  - `start_date` string, date-time: Start date of the statistics period
  - `end_date` string, date-time: End date of the statistics period
  - `sum` integer: Total number of visitors in the period

## Other responses

- `403`: Unauthorized access
- `429`: Too many requests
- `500`: Something went wrong

---

[API](https://skmtc.dev/10web/apis/10web-api-v1.md) - [All operations](https://skmtc.dev/10web/apis/10web-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/10web/apis/10web-api-v1/revisions/01afc9651dfc?raw)
