Status: Live
The Mediastack API provides a powerful and scalable solution for accessing live and historical news data from around the world. With a simple REST API interface, users can retrieve news articles in JSON format, filtered by various parameters such as date, country, language, sources, and keywords.
Key Features
- Access to real-time news articles from multiple sources.
- Filter news by date, country, language, and categories.
- Retrieve historical news data for up to 5 years back.
- Supports pagination for efficient data retrieval.
- Easy integration with existing applications via a simple API request structure.
Getting Started
To use the Mediastack API, you need to sign up for an account and obtain your API access key. This key must be included in all API requests to authenticate your access.
Example API Requests:
1. Retrieve Live News
GET https://api.apilayer.net/mediastack/v1/news?access_key=YOUR_ACCESS_KEY&countries=us&languages=enThis request retrieves live news articles from the United States in English.
2. Retrieve News Sources
GET https://api.apilayer.net/mediastack/v1/sources?access_key=YOUR_ACCESS_KEY&search=bbcThis request retrieves the news sources that match the search term "bbc".
3. Filter News by Keywords
GET https://api.apilayer.net/mediastack/v1/news?access_key=YOUR_ACCESS_KEY&keywords=covidThis request retrieves news articles that contain the keyword "covid".
Response Structure
The API responses are structured in a way that provides easy access to the data you need. Here’s an example of a typical response for a news request:
{
"pagination": {
"limit": 100,
"offset": 0,
"count": 100,
"total": 293
},
"data": [
{
"author": "TMZ Staff",
"title": "Carlos Beltran's The Guy For Mets",
"description": "The New York Mets are in need of a new manager ...",
"url": "https://www.tmz.com/2026/07/01/jose-reyes-weighs-in-on-mets-manager-vacancy/",
"source": "TMZ.com",
"image": "https://imagez.tmz.com/...",
"category": "general",
"language": "en",
"country": "us",
"published_at": "2026-07-01T05:47:24+00:00"
}
]
}