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.
Find what is being reported right now and hand it to your model or your code. Live News Search covers the last 48 hours, so it is the fastest way to ground an answer in current events.
Every parameter and the full response schema are in the API reference.
Use it when you can describe what you are looking for and the answer depends on the last two days: an LLM needs current context, an agent needs to check the latest on a topic, or a script is polling for new coverage.
Use something else when:
| You need | Use |
|---|---|
| Anything older than 48 hours, or a window with fixed dates | Historical News Search |
| A researched, cited answer to a question that takes more than one search | DeepNews |
| A report or notification on a schedule, without running a poller | Alerts |
| Coverage from many outlets, clustered into storylines and followed as they develop | Storylines |
| Pages outside the news index, or posts on X | Web Search |
| Endpoint | GET /v1/news/search |
| Python SDK | ask.news.search_news() |
| MCP tool | search_news |
| CLI | asknews news search |
| Scope | news |
| Cost | 1 credit per request (pricing) |
Bound the search with hours_back, which defaults to 24. Keeping it at 48 or below keeps the cost at 1 credit.
as_string is ready to paste into a prompt. Ask for return_type="dicts" when your code needs fields such as the URL, publication date, or entities. See return types.
Every article has two dates, and time_filter picks the one your window applies to.
time_filter | Filters on | Use it for |
|---|---|---|
pub_date | When the publisher published the article | "It happened in the last 6 hours": monitoring, briefings, answers about recent events |
crawl_date | When AskNews ingested the article | "Anything new since I last checked": polling |
The default depends on how you call AskNews: the API and SDKs default to crawl_date, while the MCP search_news tool and asknews news search default to pub_date. Set it explicitly.
Results are ranked by relevance unless you pass sort_by="pub_date". It sorts the articles a search returned by date, so you still get the best matches, arranged newest first. To favor recent coverage, shorten hours_back as well. page_rank drops low-authority sites, where lower is more prominent and 100000 or lower targets top sources, and diversify_sources stops one outlet from dominating.
query is optional. Without one you get a page of articles from the window that pass your filters, arranged newest first within that page. It is not necessarily the newest articles in the window, so use a short window. To page through the results, add one of the filters that pagination requires.
query ranks articles but does not exclude them. When a company, person, or term must appear, guarantee it and use query to describe what you care about. This keeps "Apple" the company apart from the fruit.
The full set of filters starts at how a search works.
Track when you last checked and pass that as start_timestamp, with time_filter="crawl_date" so you also pick up articles a publisher back-dated. Deduplicate on article_id. Stay inside your plan's rate limit, which is one request every 2 seconds on Pay as you go and Pro.
For anything beyond a script, an alert does this for you.
Examples below use the Python SDK. Over HTTP and in PHP the parameter names are the same, in the TypeScript SDK they are camelCase (n_articles becomes nArticles), and in the CLI they are kebab-case options (--hours-back) described in the command reference. The API reference lists every parameter and response field.
A search is a filter followed by a ranking:
entity_guarantee, string_guarantee, domain_url, categories, languages, countries, page_rank, sentiment, and so on.query ranks the eligible articles. It can be a phrase, a question, or a paragraph, with no special syntax. It excludes nothing beyond similarity_score_threshold.Most poor results come from putting everything in query with no filters. When you know what must appear, guarantee it, and use query to describe what you care about.
Omit query to skip ranking and get a page of articles that pass your filters. It is arranged newest first within the page, but it is not necessarily the newest articles in the window.
method | Matches on | Use it when |
|---|---|---|
kw (default) | Keywords, with term expansion | The query is names, tickers, and terms. Works at any length |
nl | Meaning | The query is a sentence or paragraph, such as a forecasting question |
both | Both, re-ranked | You want the most accurate first page and can spare some latency. Cannot be paginated |
kw does not guarantee a term appears. For that, use string_guarantee.
| Parameter | What it does |
|---|---|
hours_back | Look back from now, in hours. Defaults to 24, with a maximum of 3840 (160 days) |
start_timestamp, end_timestamp | An exact window in Unix seconds. Takes precedence over hours_back. At most 160 days apart |
time_filter | The date the window applies to: crawl_date (when AskNews ingested the article) or pub_date (when it was published) |
sort_by | relevance (default) or pub_date, which sorts the returned page by date and does not change which articles are returned. Available over HTTP and in the Python SDK |
strategy | latest news searches the last 48 hours, news knowledge the last 150 days at 5 credits. Both set method=kw and replace the window. Defaults to default, which leaves both to you |
A search whose window starts within the last 48 hours costs 1 credit. One that starts further back, or uses strategy="news knowledge", costs 5 credits, and coverage goes back to 2023. The window alone sets what is searched. The historical parameter is deprecated and has no effect, so leave it out. See Historical News Search for the details.
Guarantees are hard filters: an article that does not satisfy them is never returned.
| Parameter | Effect |
|---|---|
entity_guarantee | The article must contain these extracted entities, written as Type:Name |
reverse_entity_guarantee | The article must not contain these entities |
string_guarantee | The article must contain these exact strings |
reverse_string_guarantee | The article must not contain these strings |
entity_guarantee_op, string_guarantee_op | AND or OR, for how the list combines |
Common entity types are Person, Organization, Location, Event, Product, Money, Law, and Technology. Write them with no space after the colon. Entities are extracted from every article by our open-source model.
Set string_guarantee_op explicitly. It defaults to AND over HTTP, in the CLI, and on the MCP tool, but to OR in the Python SDK. entity_guarantee_op defaults to OR everywhere.
| Parameter | What it does |
|---|---|
domain_url, bad_domain_url | Only include, or exclude, these domains. domain_url needs Analyst or Enterprise |
page_rank | The worst domain rank allowed. Lower is more prominent, and 100000 or lower targets top sources |
countries, countries_blacklist | Publisher country as ISO codes. This is where the publisher is, not where the reported events happened. For that, use entity_guarantee with Location: |
continents | The continents the content most relates to |
languages | Original article language as ISO 639-1 codes. Results are returned in English |
authors | Article authors |
diversify_sources | Cast a wider net and match its source distribution, for more varied perspectives. Adds latency |
A domain_url filter narrows the search a lot, so you will usually want a longer window as well.
| Parameter | What it does |
|---|---|
categories | Article categories such as Business, Politics, Technology, Finance. The API reference has the full list |
sentiment | negative, neutral, or positive |
provocative | How provocative the language is |
reporting_voice | The writing style, such as Objective or Subjective |
similarity_score_threshold | How close a match must be to query, from 0 to 1. Defaults to 0.5 |
News Search covers articles and podcast transcripts together. podcasts controls this: include (default), only, or none. Podcast episodes come back as normal items in the same list, and every filter applies to them.
Reach for podcasts when the question is what people are saying, rather than what happened.
Find articles about events in an area, using coordinates extracted from their content. Both options combine with every other filter. Add return_geo=True to include the coordinates in the response.
Radius. Pass geo_lat, geo_lon, and geo_radius in meters together.
Polygon. Pass geo_polygon as a JSON string with an exterior list of lon/lat points, where the first and last point match. Add interiors to exclude areas inside it.
return_type | You get | Use it when |
|---|---|---|
string | as_string, a prompt-optimized block of documents | You are feeding an LLM. Lowest latency |
dicts | as_dicts, a list of structured articles | Your code needs fields, or you format the context yourself |
both | Both | You want the prompt text and a way to map citations back to URLs |
The default is string in the Python SDK and dicts over HTTP, so set it explicitly.
Each document carries its citation key, source, date, and enrichments:
<doc>[1]:
Title: Rate Cuts Are Already Here For One G-7 Economy
Summary: The Bank of Canada has cut its main interest rate by a quarter percentage point...
Source: MarketsFlier
Published: June 06 2024 11:17
Organization: federal court, G-7, Fed, Bank of Canada, US government
Location: New Orleans
Classification: Finance
Sentiment: 0
Reporting voice: Objective
</doc>To match the tags your prompt already uses, set doc_start_delimiter and doc_end_delimiter.
Ask for both, tell the model to cite the bracketed keys, and map each key back to its URL with as_string_key.
Each response carries offset. Pass it back with otherwise identical parameters to get the next page, and stop when it is empty.
offset changes.article_id when merging pages.method="both" cannot be paginated.query, domain_url, entity_guarantee, authors, or a geographic filter.| Limit | Applies to |
|---|---|
n_articles up to 10 per request, and a 400 above that | Pay as you go, Pro, Spelunker |
n_articles up to 30 per request, and a higher value is reduced to 30 without an error | Analyst, Enterprise |
domain_url filter | Analyst, Enterprise |
return_graphs, return_geo | Spelunker, Analyst, Enterprise, and wallet access |
n_articles defaults to 10. Rate limits and costs are on the pricing page.
try_cache accepts 1h, 6h, 12h, 24h, 3d, or 7d, and reuses a cached response to an identical query at a lower cost. It is useful for backtests and parameter sweeps. response.hit_cache tells you whether it hit.
If you want a description turned into filters instead of writing them yourself, Auto Filter returns parameters you can pass straight to a search. If you need an agent to choose its searches as it goes, use DeepNews or the MCP server.
return_graphs=True adds an entity_relation_graph to each article. Only request it when your prompt or code uses it, because it adds tokens.
| Symptom | Cause | Fix |
|---|---|---|
| Off-topic articles | Everything is in query, with no filters | Guarantee the entity or string that must appear |
Fewer articles than n_articles | Analyst and Enterprise pages stop at 30, see plan limits | Paginate with offset |
400 with a large n_articles | Pay as you go, Pro and Spelunker accept up to 10, see plan limits | Request 10 and paginate with offset |
| A request costs 5 credits | The window starts more than 48 hours back, or strategy="news knowledge" | Keep hours_back at 48 or below, and leave strategy at its default |
403 on every request | The key does not carry the news scope | Create a key with the scope; scopes are fixed when a key is created |