July 22, 2026 · GNews Team
Google News API: How to Get One and Make Your First Call (Python, JS, cURL)
Google News API: How to Get One and Make Your First Call
There is no official public Google News API: Google shut down its old News Search API years ago and has never shipped a public replacement. What you can use instead is GNews, an independent real-time news API that returns Google News-style search and headlines results through a straightforward REST endpoint. This guide gets you a free API key and a working call, in Python, JavaScript, and cURL, that returns real JSON in under a minute.
What you'll build
By the end of this tutorial you'll have a signed-up GNews account, a live API key, and a script (in the language of your choice) that queries the search endpoint for a keyword and prints back real article data: titles, URLs, sources, publish dates. You'll also see how top-headlines differs from search, and how to read the JSON response so you can wire it into your own app.
Is there an official Google News API?
No. Google ran a News Search API in the past, but it was deprecated, and Google has not published a direct successor. If you search "google news api" hoping to find a Google-maintained endpoint, you won't, because Google News itself is a product, not a public API. What exists today are third-party services that crawl and aggregate news the way Google News does, then expose that data over HTTP. That's the gap GNews fills.
What is GNews and how it differs from Google News
GNews is an independent news API: it is not affiliated with, endorsed by, or built by Google. Think of it as a purpose-built alternative for developers who want Google News-style coverage (real-time articles, keyword search, category-based headlines, source metadata) without scraping HTML or reverse-engineering an unofficial feed. You send a request with a query or category, and GNews returns structured JSON: title, description, full content, URL, image, publish timestamp, language, and source information. It's built for programmatic access from day one, which is the main thing a "Google News API" search is actually looking for.
Getting your API key (free plan)
- Go to https://gnews.io and create an account (no credit card required).
- Once logged in, your API key is shown on your dashboard. Copy it.
- The free plan gives you a limited number of requests per day, enough to build and test an integration before you need to scale up.
This covers the "google news api free" question directly: yes, there's a free tier, it's self-serve, and you can start making calls immediately after signup.
Making your first request
All three examples below reproduce the same call: search for articles matching "technology", in English, capped at 5 results.
Using cURL
curl "https://gnews.io/api/v4/search?q=technology&lang=en&country=us&max=5&apikey=YOUR_API_KEY"
Swap YOUR_API_KEY for the key from your dashboard and run it: you'll get back a JSON payload immediately, no auth headers or OAuth flow needed.
Using Python (google news api python)
This is the pattern to reach for when people ask "how do I use the Google News API in Python": it also works as a general template for calling any REST-based news API in Python.
import requests
API_KEY = "YOUR_API_KEY"
url = "https://gnews.io/api/v4/search"
params = {
"q": "technology",
"lang": "en",
"country": "us",
"max": 5,
"apikey": API_KEY,
}
response = requests.get(url, params=params, timeout=10)
response.raise_for_status()
data = response.json()
print(f"Total articles available: {data['totalArticles']}")
for article in data["articles"]:
print(f"- {article['title']} ({article['source']['name']})")
No SDK to install beyond requests: run pip install requests if you don't have it already.
Using JavaScript / Node
const API_KEY = "YOUR_API_KEY";
const params = new URLSearchParams({
q: "technology",
lang: "en",
country: "us",
max: "5",
apikey: API_KEY,
});
fetch(`https://gnews.io/api/v4/search?${params}`)
.then((res) => {
if (!res.ok) throw new Error(`GNews API error: ${res.status}`);
return res.json();
})
.then((data) => {
console.log(`Total articles available: ${data.totalArticles}`);
data.articles.forEach((a) => console.log(`- ${a.title} (${a.source.name})`));
})
.catch((err) => console.error(err));
This runs as-is in Node 18+ (native fetch) or in a browser console, with no dependencies.
Understanding the endpoints
GNews exposes two endpoints that cover almost every "google news search api" use case.
search: query-based lookup
search takes a q parameter and returns articles matching that keyword or phrase across all indexed sources. This is what you want when a user types a search term, or when you're monitoring a topic (a company name, a product, a person). The call above hits this endpoint.
top-headlines: category-based feed
top-headlines doesn't take a free-text query in the same way. Instead, you pass a category (like technology, business, sports, health) and get back the current top stories in that category, similar to browsing Google News' front page by section:
curl "https://gnews.io/api/v4/top-headlines?category=technology&lang=en&country=us&max=5&apikey=YOUR_API_KEY"
Use search when you need to find articles about something specific; use top-headlines when you want a curated "what's happening right now in category X" feed.
Key parameters to know
q: search keyword or phrase (required forsearch)category: topic filter fortop-headlines(e.g.technology,business)lang: response language, e.g.en,fr,decountry: source country filter, e.g.us,gbmax: number of articles to return per requestapikey: your GNews API key- Also available (not demoed here, but useful once you're past your first call):
sortby(relevance or publish date), andfrom/tofor date-range filtering.
Full parameter reference: docs.gnews.io.
Reading the JSON response
Here's a real, unmodified excerpt from the search call above (totalArticles was 177,683 at request time), and this shows the first two of the five returned articles:
{
"totalArticles": 177683,
"articles": [
{
"id": "98a85fe388bfec644359c9154ae0fb0b",
"title": "Watch: BMW's New Humanoid Robots Can Pull Carts, Sort Parts And Work Without Human Control",
"description": "BMW has teamed up with Figure AI to introduce advanced humanoid robots capable of autonomous walking, sorting components, and pulling heavy trolleys, revolutionising manufacturing processes. , Technology & Science, Times Now",
"content": "BMW has unveiled its collaboration with Figure AI, introducing humanoid robots capable of performing various tasks autonomously in manufacturing. (Image: X/@Figure_robot)\nGerman automaker BMW has showcased its latest collaboration with robotics startup Figure AI...",
"url": "https://www.timesnownews.com/technology-science/watch-bmws-new-humanoid-robots-can-pull-carts-sort-parts-and-work-without-human-control-article-154818323",
"image": "https://images.timesnownews.com/thumb/msid-154818309,thumbsize-44936,width-1280,height-720,resizemode-75/154818309.jpg",
"publishedAt": "2026-07-01T07:23:32Z",
"lang": "en",
"source": {
"id": "d708b971b2f5b1049778dcf0e6f9ef3e",
"name": "Times Now",
"url": "https://www.timesnownews.com",
"country": "in"
}
},
{
"id": "fddaec5f3e48198268fabec2228c7618",
"title": "Focus Prism Pvt. Ltd. Revolutionizes India's Catering Industry Through Technology",
"description": "Coimbatore (Tamil Nadu) [India], July 1: Coimbatore-based company combines consulting expertise, advanced technology, and catering operations to bring efficiency, cost optimization, and data-driven decision-making to the food service industry.",
"content": "PNN\nCoimbatore (Tamil Nadu) [India], July 1: Coimbatore-based company combines consulting expertise, advanced technology, and catering operations...",
"url": "https://www.tribuneindia.com/news/business/focus-prism-pvt-ltd-revolutionizes-indias-catering-industry-through-technology-driven-consulting-and-operations/",
"image": "https://www.tribuneindia.com/sortd-service/imaginary/v22-01/jpg/large/high?url=dGhldHJpYnVuZS1zb3J0ZC1wcm8tcHJvZC1zb3J0ZC9tZWRpYWMwYjg5NjYwLTc1MWQtMTFmMS1hZmFlLTJkNzNlMTMwYzExYi5qcGc=",
"publishedAt": "2026-07-01T07:23:20Z",
"lang": "en",
"source": {
"id": "c5725557f39c24c8b029ee39900a8406",
"name": "The Tribune",
"url": "https://www.tribuneindia.com",
"country": "in"
}
}
]
}
Every article carries the same shape: id, title, description, content, url, image, publishedAt, lang, and a source object with id, name, url, and country. totalArticles at the top level tells you how many results exist in total, independent of how many you requested with max, which is useful if you're paginating or just want to gauge how much coverage a topic has.
Rate limits and the free plan
The free plan is meant for development and light usage: enough requests per day to build, test, and demo an integration. As your usage grows, paid plans raise the daily request ceiling and unlock additional parameters. Check your current plan's exact limits on your GNews dashboard, since allowances are tied to your account tier rather than a single fixed number for everyone.
FAQ
Is there a free Google News API? Not from Google directly. GNews offers a free plan with no credit card required, which is the practical way to get free, structured news data today.
How do I get a Google News API key? Sign up at gnews.io, and your API key appears on your account dashboard immediately, with no approval wait.
How do I use the Google News API in Python?
See the Python section above: install requests, build a params dict with your query and apikey, call requests.get() against the search endpoint, and read response.json().
How do I use a news API in Python generally?
The pattern is the same across most REST-based news APIs: pass your API key as a query parameter or header, send a GET request with requests, and parse the JSON response for the fields you need. The GNews example above is a reusable template: swap the base URL and parameter names if you switch providers.
What's the difference between search and top-headlines?
search matches a free-text query (q) against the full article index and is best for finding articles about a specific topic. top-headlines returns the current top stories for a category (like technology or business) without a query, closer to browsing a section front page.
Does GNews return real-time news? Yes: GNews continuously indexes new articles from its source list, so results reflect recently published content rather than a static, infrequently updated snapshot.
Ready to build? Start building for free with GNews.