API Directory › 📰 News › GNews
API KeyHTTPSCORS

GNews API

Search news articles and top headlines with a simple free tier.

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

What it does

GNews is a news search and headlines API. You can full-text search worldwide articles or pull top headlines by category (general, world, business, technology, sports…), filtered by language and country. Each article comes with title, description, content snippet, source, image and publish time.

Base URL

https://gnews.io/api/v4

Authentication

Free API key from gnews.io after signing up. Pass it as apikey. The free tier is intended for development and non-commercial use.

Code examples

curl
curl "https://gnews.io/api/v4/search?q=nigeria%20fintech&lang=en&max=5&apikey=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://gnews.io/api/v4/search",
    params={"q": "nigeria fintech", "lang": "en", "max": 5, "apikey": "YOUR_KEY"},
    timeout=10,
)
r.raise_for_status()
for a in r.json()["articles"]:
    print(a["publishedAt"], a["source"]["name"], "-", a["title"])
JavaScript
const p = new URLSearchParams({
  q: "nigeria fintech", lang: "en", max: "5", apikey: "YOUR_KEY",
});
const res = await fetch(`https://gnews.io/api/v4/search?${p}`);
const { articles } = await res.json();
articles.forEach(a => console.log(a.source.name, a.title));

Rate limits & quotas

The free plan is around 100 requests/day and returns up to 10 articles per request, with article content truncated. Paid plans raise the daily quota, article count and content length, and unlock commercial use. A 429 or 403 with a quota message means you’re out for the day — the counter resets at midnight UTC.

Key response fields

totalArticlesTotal matches for the query (not just this page)
articles[].title / description / contentHeadline, summary, truncated body on free tier
articles[].url / imageCanonical article link and lead image
articles[].publishedAtISO-8601 UTC timestamp
articles[].source.name / urlPublisher

Common errors

400Bad parameter — e.g. max above the plan limit, or malformed date.
401 / 403Missing or invalid apikey.
429Daily request quota exhausted. Resets 00:00 UTC.

When to use it (and alternatives)

GNews is a clean, cheap way to add a news feed or “in the press” widget. For higher volume and source-level filtering, NewsAPI.org and Mediastack are comparable. For US news specifically, the New York Times APIs and the Guardian Open Platform are free and high quality.

FAQ

Can I use GNews for a commercial product on the free plan?

No — the free tier is for development and non-commercial use. Commercial use needs a paid plan.

Why is the article content cut off?

The free plan truncates the content field. Follow url for the full article, or upgrade for longer content.

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