Skip to content

Search News API: search and filter news articles

Search News is the news search API of World News API: one GET request searches 170,000+ new articles a day from 210+ countries and returns the full text as JSON. Filter by text, date, location, category, language, sentiment, source and more. Each returned article includes the title, the full text of the article, a summary, image URL, video URL, the publish date, the authors, the category, the language, the source country and the sentiment: a news API that returns full article text, not only headlines and links.

You can set as many filtering parameters as you like, but you have to set at least one, for example text or language.

GET
https://api.worldnewsapi.com/search-news
Cost
1 point, plus 0.01 points per returned result
Results
Up to 100 per request
Auth
api-key or x-api-key
Free plan
Yes, with 1 month of history

If you sort by publish-time you must set either text or both earliest-publish-date and latest-publish-date. Otherwise the time range is automatically limited to the last 31 days.

Parameters

18 query parameters. Only api-key is required (or the x-api-key header), plus at least one filter.

Parameters

Name Example Description
text
s o q
teslaThe text to match in the news content (at least 3, at most 100 characters).

By default all query terms are required (implicit AND): a space and the keyword AND behave identically, e.g. tesla ford ≡ tesla AND ford — both terms must appear.

Use an uppercase OR to match any of several terms, e.g. tesla OR ford. Note that OR binds only to its immediately adjacent terms — more tightly than the implicit AND. So tesla model OR ford is read as tesla AND (model OR ford), NOT as (tesla AND model) OR ford.

Group terms with parentheses to combine AND and OR explicitly — this is the reliable way to express compound conditions, e.g. tesla (model OR mustang) matches articles containing "tesla" and either "model" or "mustang".

Exclude a term by prefixing it with a minus sign, e.g. tesla -ford. The word NOT is not an operator (it is matched as a literal term) — use - to exclude.

For an exact match, put the phrase in quotes, e.g. "elon musk".

Wildcards (e.g. tesla*) are not supported.
text-match-indexes
s o q
title,contentIf a "text" is given to search for, you can specify where this text is searched for. Possible values are title, content, or both separated by a comma. By default, both title and content are searched.
source-country
s o q
usThe ISO 3166 country code from which the news should originate.
language
s o q
enThe ISO 6391 language code of the news.
min-sentiment
n o q
-0.8The minimal sentiment of the news in range [-1,1].
max-sentiment
n o q
0.8The maximal sentiment of the news in range [-1,1].
earliest-publish-date
s o q
2022-04-22 16:12:35The news must have been published after this date.
latest-publish-date
s o q
2022-04-22 16:12:35The news must have been published before this date.
news-sources
s o q
https://www.bbc.co.uk A comma-separated list of up to 10 news sources (e.g. bbc.com,cnbc.com) from which to return results. Requests with more than 10 sources are rejected with HTTP 400.
authors
s o q
John DoeA comma-separated list of author names. Only news from any of the given authors will be returned.
categories
s o q
politics,sportsA comma-separated list of categories. Only news from any of the given categories will be returned. Possible categories are politics, sports, business, technology, entertainment, health, science, lifestyle, travel, culture, education, environment, other. Please note that the filter might leave out news, especially in non-English languages. If too few results are returned, use the text parameter instead.
entities
s o q
ORG:Tesla,PER:Elon MuskFilter news by entities (see semantic types).
location-filter
s o q
51.050407, 13.737262, 20Filter news by radius around a certain location. Format is "latitude,longitude,radius in kilometers". Radius must be between 1 and 100 kilometers.
sort
s o q
publish-timeThe sorting criteria (publish-time).
sort-direction
s o q
ASCWhether to sort ascending or descending (ASC or DESC).
offset
n o q
0The number of news to skip in range [0,100000]
number
n o q
10The number of news to return in range [1,100]
api-key
s r q
abcd1234Your API key.

Search syntax and filters

How text combines terms, and what the most used filters look like.

Text operators

  • tesla fordBoth terms must appear. A space works like AND.
  • tesla OR fordEither term. OR binds only its neighbours: tesla model OR ford means tesla AND (model OR ford).
  • tesla (model OR mustang)Group terms with parentheses: the reliable way to combine AND and OR.
  • tesla -fordExclude a term with a minus sign. NOT is not an operator; it is matched as a word.
  • "elon musk"Exact phrase in quotes.
  • tesla*Wildcards are not supported.

Limit the search to headlines or the article text with text-match-indexes (title, content or both).

source-country

An ISO 3166 country code, for example us.

min-sentiment and max-sentiment

From -1 (negative) to +1 (positive), for English and German articles.

min -0.8 max 0.8 -10+1

location-filter

latitude,longitude,radius in kilometers (1 to 100). Get the coordinates of a place from Get Geo Coordinates.

20 km Dresden

categories

Any of these, comma-separated. In other languages than English, text finds more.

  • politics
  • sports
  • business
  • technology
  • entertainment
  • health
  • science
  • lifestyle
  • travel
  • culture
  • education
  • environment
  • other

entities

People, organizations and places by semantic type. Synonyms are normalized, so LOC:USA and LOC:United States of America find the same news.

  • ORG:Tesla
  • PER:Elon Musk
  • LOC:Ireland

Response headers

Every response tells you what the request cost and how many points are left today.

Headers

Response Headers:

  • Content-Type: application/json
  • X-API-Quota-Request: The number of points used by the request
  • X-API-Quota-Used: The number of points used in total today
  • X-API-Quota-Left: The number of points left today (depends on your plan)

The daily count resets at midnight UTC.

Example request

English news about an earthquake, published since April 1, 2024. Sign in and the examples use your own key.

GET https://api.worldnewsapi.com/search-news?text=earth+quake&language=en&earliest-publish-date=2024-04-01
curl -X GET 'https://api.worldnewsapi.com/search-news?text=earth+quake&language=en&earliest-publish-date=2024-04-01' \
  -H 'x-api-key: myapikey'
Prefer a client library? The SDKs wrap this call in 21 languages as searchNews, named in each language's style (search_news in Python and Ruby).

Example response

200 OKapplication/json
{
  "offset": 0,
  "number": 10,
  "available": 83,
  "news": [
    {
        "id": 206030983,
        "title": "Nearly 30 aftershocks recorded around NJ quake epicenter since Friday",
        "text": "New Jersey continues to shake after Friday’s 4.8-magnitude earthquake and likely will continue to do so for some time. Dozens of aftershocks were recorded in the Garden State since the rare quake hit, including one tremor of 3.8 after the initial event. But residents of NYC shouldn’t expect anything beyond possibly a light shake in the coming days. Rumbles were measured in 29 nine areas around Whitehouse Station, NJ, which was the epicenter of the quake, including near Tewksbury and Bedminster, according to the United States Geological Survey. The smaller temblors hit as far as 13 miles away from the epicenter. One clocked in at 1.9 just after 1 a.m. Saturday morning just north of Whitehouse Station — about 45 miles west of NYC — and another at 2.5 just before 7 a.m. near Gladstone, northeast of the epicenter. Over the next week, there is a 74% chance of additional 3-plus magnitude aftershocks, but the USGS does not foresee more than five occurring. There is just a 14% chance of a quake clocking in at a magnitude of 4 or higher, and likely only one will come this week. Over the course of the next month, however, the chance of a 3-plus magnitude quake rises to 84%, while a the chance of a 4 or greater is 18%. It’s almost certain — 98% — that more 3-plus magnitude shakers will come in the next year, the USGS said. The nearly 30 rumbles that followed the first quake aren’t a shock to geologists, though. “We do expect aftershocks like this to occur in the days, weeks and months after the main shock, so this is fully within the realm of what is expected,” USGS research geologist Alex Hatem told The Post. The chance of NYC feeling another rattle, however, is low. A light shake could be possible in the coming days, Hatem said, but nothing like the quake that rocked the Statue of Liberty and City Hall Friday or the aftershock that rippled through later that evening. The quake grounded flights and halted traffic around the Big Apple. “Should this sequence continue as it is, which we expect it to, there won’t be anything greater than what already happened,” Hatem said. Though researchers expect earthquakes to happen “anytime, anywhere,” it is a rare occurrence for New Jersey, which doesn’t lie on an active plate boundary, Hatem said. The incident did occur, however, near the Ramapo Fault, which is an ancient crack in the Earth’s crust. Faults lie on the edges of plates and can sometimes be the site of quakes. New Jersey Gov. Phil Murphy posted on X Saturday that the state’s emergency operations center was deactivated that morning. “We have had no reports of major damage to structures, roadways, or infrastructure as a result of yesterday’s earthquake,” Murphy said. Residents in several homes in Newark were able to return to their homes Friday night after being evacuated over concerns about possible structural damage. Gov. Hochul and Mayor Adams said there were no initial reports of injuries or damage in New York, though it later emerged that the walls of a school gym in Brooklyn suffered several cracks. Engineers with the city Department of Buildings ordered the gymnasium at J.H.S. 218 in East New York shut down until repairs are made. The earthquake was the biggest for the tri-state area since 1884. The USGS recently released a study that showed that about 75% of the US that could experience a damaging earthquake in the next 100 years. Friday’s rattle should be a “gentle reminder” to those on the East Coast, however, to be prepared and familiar with “drop, cover and hold on” actions to stay safe in the event of another quake. New York City officials were blasted for emergency alerts that didn’t go out until 25 minutes after the earthquake struck. Some NYC public school alerts didn’t go out until an hour and a half after the shock — and were resent Saturday morning, telling parents that dismissal would proceed as usual.",
        "summary": "Twenty nine areas around Whitehouse Station, NJ, which was the epicenter of the quake, have since reported rumbles.",
        "url": "https://nypost.com/2024/04/06/us-news/nearly-30-aftershocks-recorded-around-nj-quake-epicenter/",
        "image": "https://nypost.com/wp-content/uploads/sites/2/2024/04/79582612.jpg?quality=75&strip=all&w=1200",
        "video": "https://cdn.jwplayer.com/videos/70lDQJpg-RyIcpnTz.mp4",
        "publish_date": "2024-04-06 22:44:18",
        "authors": [
            "Deirdre Bardolf"
        ],
        "category": "environment",
        "language": "en",
        "source_country": "us",
        "sentiment": -0.545
    }
  ]
}

If available is 100000, there are at least 100,000 results and possibly many more. Make your query more specific in that case.

Response fields

FieldTypeDescription
offsetintegerThe number of results skipped, as requested.
numberintegerThe number of results requested.
availableintegerHow many articles match in total (100000 means at least that many).
newsarrayThe matching articles, each with the fields below.
idintegerThe article id; fetch it again with Retrieve News.
titlestring, nullableThe headline.
textstring, nullableThe full text of the article.
summarystring, nullableA short summary.
urlstring, nullableThe article on the publisher's site.
imagestring, nullableImage URL.
videostring, nullableVideo URL.
publish_datestring, nullableWhen it was published, as YYYY-MM-DD hh:mm:ss.
authorsarray of stringsThe authors.
categorystring, nullableOne of the 13 categories listed under categories.
languagestring, nullableISO 639-1 language code.
source_countrystring, nullableISO 3166 code of the country the source is based in.
sentimentnumberTone from -1 (negative) to +1 (positive), for English and German articles.

Points

Quotas

Calling this endpoint costs
1 point
, plus
0.01 points
per returned result.

  • number=101.1
  • number=501.5
  • number=1002.0
1 point per request0.01 per result
On the free plan's 50 points a day about 45 searches of 10 results, or 25 searches of 100 results. Plans and points

Rate limits and errors

Requests per plan

Free
1 per second, 1 at a time
Starter (console offer)
2 per second, 1 at a time
Reporter
2 per second, 5 at a time
Journalist
10 per second, 10 at a time
Editor
20 per second, 20 at a time

Error codes

400More than 10 sources in news-sources.

402Daily points used up on the free plan. They reset at midnight UTC.

429Too many requests per second, or too many at the same time.

Rate limiting and quotas in detail

Frequently asked questions

What parameters can I use to search news?

You can filter by text keywords, language, country, source, category, publish date range, and more. You can also use semantic search to find news about specific entities like people, organizations, or locations. At least one parameter must be set per request.

Can I filter news by language or country?

Yes. Use the language parameter with an ISO 2-letter code (e.g., en for English) and the source-country parameter with a country code (e.g., us for the United States). World News API supports 86+ languages and 210+ countries.

How does semantic search work in the News API?

The entities parameter lets you search for news about specific people, organizations, or locations using semantic tagging. For example, you can search for all news mentioning Barack Obama as a person entity, regardless of how the name appears in the article text.

What is the maximum number of results per request?

Up to 100 results per request, set with the number parameter. Use the offset parameter to paginate through larger result sets. If the available field returns 100000, there are at least that many results and you should narrow your query.

Questions? Need help? Ask away