API Directory › 📰 News › Mediastack
API KeyHTTPSCORS

Mediastack API

Live and historical news data from thousands of sources.

Category
Auth
API Key
HTTPS
Yes
CORS
Yes
Open Mediastack docs ↗

What it does

mediastack provides live and historical news articles from 7,500+ sources in 50+ countries and 13 languages, filterable by keyword, source, category, country, language and date, with simple limit/offset pagination.

Base URL

https://api.mediastack.com/v1

Authentication

Sign up for a free API key and pass it as ?access_key=YOUR_KEY. The free plan is historically HTTP only — check your plan for HTTPS support.

Code examples

curl
curl -s "http://api.mediastack.com/v1/news?access_key=$MS_KEY&keywords=technology&languages=en&limit=5"
Python
import requests

r = requests.get("http://api.mediastack.com/v1/news", params={
    "access_key": KEY, "categories": "business",
    "countries": "gb", "sort": "published_desc", "limit": 5}, timeout=10)
for a in r.json()["data"]:
    print(a["published_at"][:10], a["source"], "-", a["title"])

Rate limits & quotas

Free plan: about 100 requests/month, HTTP only, live news only (no historical), max limit 100 per request. Responses include a pagination object (limit, offset, count, total). Errors return a JSON error with a code.

Key response fields

data[].title / description / urlArticle headline, snippet, link
data[].source / authorPublisher and byline
data[].published_atISO 8601 timestamp
data[].category / country / languageClassification
pagination.totalTotal matching articles

Common errors

401 invalid_access_keyKey missing or wrong.
403 https_access_restrictedHTTPS on a free plan — use HTTP or upgrade.
429 rate_limit_reachedMonthly quota or per-second rate exceeded.
422 validation_errorBad parameter value (e.g. unknown category).

When to use it (and alternatives)

Only viable if 100 requests/month covers you (a low-frequency cron). For an actually usable free tier, Currents (~600/day) or newsdata.io (~200/day) are far better starting points.

FAQ

Is the free plan really 100 calls a month?

Yes — mediastack’s free tier is small and HTTP-only, best treated as an evaluation tier. Budget for a paid plan or a different provider for anything regular.

Can I get historical articles?

Not on free — pass a date range only on paid plans. The free plan serves live news.

How do I page through results?

Use limit (max 100) and offset. pagination.total tells you how many pages exist — but each page is another request against your tiny monthly quota.

New to APIs?

Short guides for working with this API — and any other.

🛠️ Handy LarzOS tools

Free tools to help you work with this API.

JSON Formatter

Related News APIs

← Back

More News APIs · All 196 APIs