# Get daily stats

What each UTC day added in views, likes, comments and shares, for all your accounts or one, from `from` to `to`, at most 366 days. GET /stats/daily.

`GET https://api.tiktornado.com/api/v1/stats/daily`

Scope: `stats:read`.

What each UTC day added in views, likes, comments and shares, for all your accounts or one, from `from` to `to`, at most 366 days. A day with nothing new has no entry. Accounts whose subscription isn't active are left out of the totals for all accounts. The totals for all accounts can be up to 6 hours behind; one account's are not.

## Query parameters

- `from` string, required: The first day, `YYYY-MM-DD`, in UTC. A day, `YYYY-MM-DD`.
- `to` string, required: The last day, `YYYY-MM-DD`, in UTC. At most 365 days after `from`. A day, `YYYY-MM-DD`.
- `accountId` string: Only this account's days. Matches `^[A-Za-z0-9]{1,64}$`.

## Examples

```bash
curl 'https://api.tiktornado.com/api/v1/stats/daily?from=2026-11-01&to=2026-11-30&accountId=j971x2c4ajrq0w8sd5e8fxz3a57v2k8m' \
  -H "Authorization: Bearer $TIKTORNADO_API_KEY"
```

```js
const response = await fetch("https://api.tiktornado.com/api/v1/stats/daily?from=2026-11-01&to=2026-11-30&accountId=j971x2c4ajrq0w8sd5e8fxz3a57v2k8m", {
  headers: {
    Authorization: `Bearer ${process.env.TIKTORNADO_API_KEY}`,
  },
});
const data = await response.json();
```

```python
import os

import requests

response = requests.get(
    "https://api.tiktornado.com/api/v1/stats/daily",
    headers={
        "Authorization": f"Bearer {os.environ['TIKTORNADO_API_KEY']}",
    },
    params={
        "from": "2026-11-01",
        "to": "2026-11-30",
        "accountId": "j971x2c4ajrq0w8sd5e8fxz3a57v2k8m",
    },
)
data = response.json()
```

## Response 200

The days.

- `days` array of objects, required: At most 366 items.
  - `day` string, required: A day, `YYYY-MM-DD`.
  - `views` number, required
  - `likes` number, required
  - `comments` number, required
  - `shares` number, required

```json
{
  "days": [
    {
      "day": "2026-11-28",
      "views": 15210,
      "likes": 1340,
      "comments": 61,
      "shares": 44
    },
    {
      "day": "2026-11-29",
      "views": 8720,
      "likes": 702,
      "comments": 30,
      "shares": 19
    }
  ]
}
```

## Errors

| Status | Reason | Message |
| --- | --- | --- |
| 400 | `invalid_request` | Something here isn't valid. Check it and try again. |
| 400 | `invalid_date_range` | Pick a date range of up to 366 days. |
| 401 | `api_key_invalid` | This API key isn't valid. Check it, or create a new one in the app. |
| 403 | `access_locked` | Your subscription isn't active, so this can't be changed right now. Visit Billing to fix it. |
| 403 | `api_scope_missing` | This API key can't do this. Create a key with the access it needs in the app. |
| 404 | `not_found` | We couldn't find this. |
| 429 | `slow_down` | You're going a bit fast. Wait a moment and try again. |
| 500 | `unknown_error` | Something went wrong on our side. We're on it. |
| 503 | `service_unavailable` | Something went wrong on our side. We're on it. |