Back to APIs
GNews
GNews aggregates articles from 60,000+ news sources in 70+ languages with keyword search, full-text access, and historical data.
Base URL
https://gnews.io/api/v4headlinesfull-textmultilingualsearchglobal
Endpoints
GET
/top-headlinesGet the latest top headlines.
const response = await fetch("https://gnews.io/api/v4/top-headlines?topic=technology&lang=en&max=5&apikey=YOUR_API_KEY", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);Response Preview
{
"totalArticles": 42000,
"articles": [{
"title": "New AI Model Breaks Benchmark Records",
"description": "Researchers have unveiled a new AI model...",
"url": "https://techcrunch.com/...",
"source": { "name": "TechCrunch" },
"publishedAt": "2024-05-01T09:00:00Z"
}]
}