A guide for integrating the Google News API an news api from CognifyAPI to search articles by query, topic, or geographic region with structured JSON results.
- API Documentation: Google News API Docs
- More Info: Google News API
- Official Website: CognifyAPI.com
- CognifyAPI Studio: Get an API key
- Search news articles with a query.
- Retrieve articles for a topic.
- Find top news for a geographic region.
- Receive structured JSON with article title, URL, timestamp, and source.
| Endpoint | Description | Example parameters | Response example |
|---|---|---|---|
/google-news-search |
Search news articles by query. | q=elon musk&geo=US&count=2 |
JSON sample |
/google-news-search-topic |
Retrieve articles for a topic. | topic=WORLD&geo=US&count=2 |
JSON sample |
/google-news-search-geo |
Retrieve top news for a region. | geo=US&count=2 |
JSON sample |
Each linked file is an endpoint-specific JSON example for the request shown in its row.
Base URL: https://api.cognifyapi.com
Send your API key in the x-cognifyapi-key header. Install Axios with npm install axios, set COGNIFY_API_KEY, then run index.js.
x-cognifyapi-key: YOUR_COGNIFY_API_KEY
{
"status": "success",
"query": "elon musk",
"results": 2,
"newsResults": [
{
"title": "Musk says Jensen Huang is irreplaceable, regrets midterm spending - CNBC",
"url": "https://www.cnbc.com/2026/11/19/elon-musk-jensen-huang-midterms.html",
"timeStamp": "Thu, 19 Nov 2026 02:37:00 GMT",
"source": {
"name": "CNBC",
"url": "https://www.cnbc.com"
}
}
]
}