We use cookies to ensure you get the best experience on our website. Some of these cookies are provided by third parties. You are free to decide which categories you would like to permit and can withdraw this consent at any time (via cookie preferences link on the footer).
By accepting the necessary cookies, you agree to our privacy policy and terms of service, both located in the footer of the website.
Learn more on our terms of service and privacy policy.
Research a period, not just a topic. Historical News Search covers news back to 2023 and bounds every search by the dates you choose. It is built for forecasting backtests, AI evaluations, and historical analysis, where the window matters as much as the query.
Every parameter and the full response schema are in the API reference.
Use it when the question is about a defined period, or when you need to reconstruct what was reported at a specific moment.
Use something else when:
| You need | Use |
|---|---|
| What is happening now, within the last 48 hours | Live News Search |
| A researched, cited answer about the past | DeepNews with cutoff_datetime |
| Background that does not change, such as who someone is | Wikipedia |
| Endpoint | GET /v1/news/search, the same as Live News Search |
| Python SDK | ask.news.search_news() |
| MCP tool | search_news with start_datetime and end_datetime |
| CLI | asknews news search with --start-datetime and --end-datetime |
| Scope | news |
| Cost | 5 credits, or 1 when the window starts within the last 48 hours (pricing) |
| Window limit | 160 days per request |
Pass start_timestamp and end_timestamp in Unix seconds. The window is all you need: there is no separate mode or flag for historical news.
Always pass both timestamps:
start_timestamp with no end runs up to the present, which is usually wider than you meant and fails once it spans more than 160 days.end_timestamp with no start looks 160 days back from it, which is rarely the window you meant.Build timestamps from timezone-aware datetimes so the window is the one you meant. hours_back above 48 also reaches back and is convenient for a quick look, but a window relative to now gives a different answer each time you run it.
Use time_filter="pub_date" when you mean "published in this window". The default, crawl_date, filters on when AskNews ingested the article.
If future information leaks into a backtest, the model looks better than it is. Cap end_timestamp at the moment you are simulating, and nothing published afterwards can enter the context. method="nl" works well when the query is a full question.
try_cache reuses the response to an identical query at a lower cost, which makes repeated backtest runs and parameter sweeps much cheaper. Check response.hit_cache to see whether it hit.
Filters work the same for any date, so guarantee the entities or strings that must appear. See how a search works.
A request can span at most 160 days. For a longer period, walk through time in fixed windows and paginate inside each one. Smaller windows are more reliable and let you checkpoint your progress.
Each page is a separate request, so it costs 5 credits. Set a cap on pages or articles before you run a broad query. The rules for offset are in pagination.
historical parameterhistorical is deprecated and has no effect, so leave it out. The window alone sets what is searched.
| Response | Cause | Fix |
|---|---|---|
400 "Your timerange is greater than 160 days" | The window, or hours_back above 3840, is too long | Split the period into smaller windows |
400 "stop_timestamp should be after start_timestamp" | The timestamps are swapped | Swap them |
400 "You cannot set an offset greater than 3000" | Numeric pagination went too deep | Use smaller windows |
400 "Offset cannot be used with method='both'" | Pagination with the hybrid method | Paginate with kw or nl |