World News API

World News API

The World News API gives you access to thousands of news sources in over 50 languages from over 150 countries. News are semantically tagged allowing for semantic news search like never before.
Free Plan $0.00 Monthly Subscribe
1,500 Requests / Monthly
Free for Lifetime
No Credit Card Required
MOST POPULAR
Starter Plan $39.00 Monthly Subscribe
15,000 Requests / Monthly
Standard Support
World Wide Coverage
Semantic Tagging
Sentiment Analysis
Pro Plan $379.00 Monthly Subscribe
150,000 Requests / Monthly
Standard Support
World Wide Coverage
Semantic Tagging
Sentiment Analysis
Enterprise Plan $1,779.00 Monthly Subscribe
1,500,000 Requests / Monthly
Standard Support
World Wide Coverage
Semantic Tagging
Sentiment Analysis
Custom Plan Volume Monthly Contact Us
Any requests volume you need
World Wide Coverage
Semantic Tagging
Sentiment Analysis

The World News API gives you access to thousands of news sources in over 50 languages from over 150 countries. News are semantically tagged allowing for semantic news search like never before.

Search International News Sources

The News API searches through thousands of news outlets world wide allowing you to get multiple views on the same issue. News is indexed in real time so you will get breaking news in the API as well as historic data.

Search by Location everywhere on Earth

News texts often mention locations such as cities, neighborhoods, or points of interest. We tag these locations which allows you to search for news that mention any location within a certain area.

Semantic search and text filtering combined

Semantic search allows you to find entities without caring about the exact spelling or synonyms used. For example, finding news about the USA you can search for Location:USA and all news mentioning the USA will be returned, no matter if they talk about the "US", the "United States" or the "United States of America".

You can also search for pure text matches, phrases, or exclude words from your search.

Filter by Source Country and Language

We index news in over 50 languages from over 150 countries. With simple country and language filters you can limit your search to the exact country and language. For example, you could search for Spanish news that originate in the USA or French news from Canada.

Combining country filter with other parameters allows you to dig really deep into the news coverage, e.g. you could compare news about a polarizing topic from different countries.

Search news for within time frames

Relevance of news is often short lived but new coverage is always in the context of what happened before. The API allows you to filter news by publish time to analyze content over time, for example, to detect shifts in opinions or amounts of news coverage of a certain topic over time.

Search by Positive and Negative News Coverage

News items (currently limited to English and German) are analyzed with AI trained sentiment classifiers assigning each news an overall value between -1 (negative) and +1 (positive).

World News API Reference

This API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Just Getting Started?

Check out our development quickstart guide.

Authentication

World News API uses API keys to authenticate requests. You can view and manage your API keys in the Accounts page.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All requests made to the API must hold a custom HTTP header named "apikey". Implementation differs with each programming language. Below are some samples.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

Endpoints

Extract a news article from a website to a well structure JSON object.

Parameters

analyze (required)

Whether to analyze the news.

Location: Query, Data Type: string

url (required)

Source url.

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Retrieve the latitude and longitude of a location name. Given this information you can fill the location-filter parameter in the news search endpoint.

Parameters

location (required)

The address or name of the location.

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Search and filter news.

Parameters

authors (optional)

A comma-separated list of author names. Only news from any of the given authors will be returned.

Location: Query, Data Type: string

earliest-publish-date (optional)

The news must have been published after this date.

Location: Query, Data Type: string

entities (optional)

Filter news by entities, e.g. ORG:Tesla.

Location: Query, Data Type: string

language (optional)

The ISO 6391 language code of the news, e.g. "en" for English.

Location: Query, Data Type: string

latest-publish-date (optional)

The news must have been published before this date.

Location: Query, Data Type: string

location-filter (optional)

Filter news by radius around a certain location. Format is "latitude,longitude,radius in kilometers", e.g. 51.050407, 13.737262, 100

Location: Query, Data Type: string

max-sentiment (optional)

The maximal sentiment of the news in range [-1,1].

Location: Query, Data Type: string

min-sentiment (optional)

The minimal sentiment of the news in range [-1,1].

Location: Query, Data Type: string

news-sources (optional)

A comma-separated list of news sources from which the news should originate, e.g. https://www.bbc.co.uk

Location: Query, Data Type: string

number (optional)

The number of news to return in range [1,100]

Location: Query, Data Type: string

offset (optional)

The number of news to skip in range [0,1000]

Location: Query, Data Type: string

sort (optional)

The sorting criteria. (publish-time or sentiment)

Location: Query, Data Type: string

sort-direction (optional)

Whether to sort asc or desc.

Location: Query, Data Type: string

source-countries (optional)

A comma-separated list of ISO 3166 country codes from which the news should originate, e.g. uk,us.

Location: Query, Data Type: string

text (optional)

The text to match in the news content.

Location: Query, Data Type: string

** A word enclosed with curly brackets "{ }" in the code means that it is a parameter and it should be replaced with your own values when executing. (also overwriting the curly brackets).
Returns

Below is a sample response from the endpoint


If you wish to play around interactively with real values and run code, see...

Rate Limiting

Each subscription has its own rate limit. When you become a member, you start by choosing a rate limit that suits your usage needs. Do not worry; You can upgrade or downgrade your plan at any time. For this reason, instead of starting with a larger plan that you do not need, we can offer you to upgrade your plan after you start with "free" or "gold plan" options and start using the API.

When you reach a rate limit (both daily and monthly), the service will stop responding and returning the HTTP 429 response status code (Too many requests) for each request with the following JSON string body text.

{
"message":"You have exceeded your daily\/monthly API rate limit. Please review and upgrade your subscription plan at https:\/\/apilayer.com\/subscriptions to continue."
}

A reminder email will be sent to you when your API usage reaches both 80% and 90%, so that you can take immediate actions such as upgrading your plan in order to prevent your application using the API from being interrupted.

You can also programmatically check your rate limit yourself. As a result of each request made to the APILayer, the following 4 fields provide you with all the necessary information within the HTTP Headers.

x-ratelimit-limit-month: Request limit per month
x-ratelimit-remaining-month: Request limit remaining this month
x-ratelimit-limit-day: Request limit per day
x-ratelimit-remaining-day: Request limit remaining today

You can contact our support unit if you need any assistance with your application regarding to handle the returned result by looking at the header information.

Error Codes

APILayer uses standard HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate a clientside error, which means that failed given the information provided (e.g., a missing parameter, unauthorized access etc.). Codes in the 5xx range indicate an error with APILayer's servers (normally this should'nt happen at all).

If the response code is not 200, it means the operation failed somehow and you may need to take an action accordingly. You can check the response (which will be in JSON format) for a field called 'message' that briefly explains the error reported.

Status Code Explanation
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
404 - Not Found The requested resource doesn't exist.
429 - Too many requests API request limit exceeded. See section Rate Limiting for more info.
5xx - Server Error We have failed to process your request. (You can contact us anytime)

You can always contact for support and ask for more assistance. We'll be glad to assist you with building your product.

Reviews

5.00
  • Review rating
  • Review rating
  • Review rating
  • Review rating
  • Review rating
API rating
APILayer
3 months ago

APILayer

  • Review rating
  • Review rating
  • Review rating
  • Review rating
  • Review rating

The World News API gives you access to thousands of news sources in over 50 languages from over 150 countries. News are semantically tagged allowing for semantic news search like never before.