# Time Range & History

Every request covers a time window. By default it is short and cheap; you can reach back months when you need to, for extra credits.

## Default window

Without a `ts` parameter, requests cover the **last 3 days**.

## Going back with `ts`

`ts` is a Unix timestamp in **milliseconds** marking the start of your search window (10-digit second timestamps are converted automatically):

```bash
https://api.webz.io/api/news?token=YOUR_TOKEN&q=bitcoin&ts=1749121632000
```

## What the window covers

- `ts` filters by **crawl time**. With the default `crawled` sort and ascending order it marks the start of the window; with `order=desc` it marks the end, and you page backward from it.
- Results are also capped by **publish date**: a window starting within the last 31 days returns posts published in the last 31 days. The cap grows with the window - 90 days, 180 days, or a year for older starts.

## Beyond 31 days: news history

A search window starting more than 31 days back requires `allowNewsHistory=true`, and works only with the default sort (`sort=crawled`, ascending order). Otherwise the window silently falls back to the last 3 days.

```bash
https://api.webz.io/api/news?token=YOUR_TOKEN&q=bitcoin&ts=1735689600000&allowNewsHistory=true
```

Older windows cost more credits per request:

| Window start | Credits per request |
| --- | --- |
| Last 31 days | 1 |
| 31 days - 3 months back | 2 |
| 3 - 6 months back | 3 |
| More than 6 months back | 4 |

Your remaining balance is returned as `requests_left` in every response.

> [!NOTE]
> News history is news-only: news reaches back about one year, while blogs and forums content is searchable for roughly the last 31 days. On blogs and forums `allowNewsHistory` does not unlock older content, but a window starting more than 31 days back is still billed at the higher credit tier - keep `ts` within the last 31 days on those products. Older data - up to the last **5 years** - is available via the [News, Blogs, Forums & Reviews Archive](archive-what-is).

> [!NOTE]
> Segmentation endpoints always cover the last 31 days at most - `allowNewsHistory` does not apply there. See [Segmentation API](news-blogs-forums-segmentation).

