canonical: https://jentic.com/apis/gnews.io/gnews

# GNews API

GNews exposes a worldwide news feed through two REST endpoints: top headlines ranked the way Google News ranks them, and a full-text search across the same article corpus with rich filtering. Both endpoints support filtering by language, country, publication date range, and topic, and return article metadata including title, description, content snippet, source, and a publication URL. Authentication is a single API key passed as a query parameter, which keeps GNews well suited to scripts and AI agents that need a low-friction news source.

## For AI agents

Search worldwide news articles or fetch top headlines from GNews with filters for language, country, date range, and topic.

## Scope

Does not return full article bodies, social posts, or proprietary newswire feeds - use for top-headline ranking and keyword search across publicly indexed news articles only.

## Capabilities

- Fetch top headlines worldwide or filtered by country and language for a daily briefing
- Search the full GNews article corpus by keyword with quote and boolean syntax
- Filter results by topic (business, technology, sports, etc.) for vertical-specific feeds
- Constrain a search to a date range using the from and to parameters for back-fills
- Limit results to a single language or country code to localise news ingestion
- Read the article URL, source, and publication time for citation-grade summaries

## Use cases

### Daily Press Brief Generator

Comms teams can build a daily press brief by calling GET /top-headlines with their country and language plus a topic of choice, then formatting the title, description, and source into a digest email. Filtering by date range narrows the result to the last 24 hours so the brief stays fresh. End-to-end integration is a matter of an hour or two.

Example prompt: GET /top-headlines with country=gb, lang=en, topic=technology, max=10 and format the response into an HTML newsletter section.

### Brand Mention Monitor

Marketing teams that want to track when their brand or competitors are mentioned in the press can poll GET /search with a quoted brand name and a 24-hour from window. Combining the search keyword with country and language filters narrows the volume, and storing seen URLs avoids duplicate alerts. Setup is typically half a day including a simple deduplication store.

Example prompt: GET /search with q="Acme Corp", from=now-24h, lang=en, then post each new URL to a Slack channel after deduplication.

### AI Research Assistant Citations

An AI research assistant routed through Jentic can ground its answers in real news articles by querying /search before responding, then citing source URLs and dates. Because GNews is exactly two endpoints, the agent only needs one Jentic search to wire it in, and the API key handling is handled by your Jentic One instance.

Example prompt: Search Jentic for 'search news articles', load the schema for GET /search, and execute with the user's query plus lang=en, then return the top 5 articles with source and URL.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/top-headlines` | Get top headlines, optionally filtered by topic, country, language and date |
| GET | `/search` | Search articles by keyword with the same set of filters |

## Key resources

- **Headlines** — Top headlines ranked similarly to Google News, with country, language, topic, and date filters.
- **Search** — Full-text search over the GNews article corpus with the same filters plus a query string.

## Why Jentic

- **Setup:** Wiring GNews by hand means learning its query-parameter apikey auth and remembering which of the top-headlines and search endpoints takes which parameters. Through Jentic you install once, import the GNews API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** GNews takes its filters as query parameters rather than resource ids in the path, and both endpoints are read-only, so scope the agent to the operations it needs, such as searching articles or fetching top headlines. You choose that operation set, so it reads news data without any write ability.
- **Credential handling:** Your GNews key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'search news articles' or 'get top headlines', and Jentic returns the matching GNews endpoint with its query parameter schema so the agent does not need to remember which endpoint takes q versus topic.

## Related APIs

- **NewsAPI** — Established news aggregator with broader source coverage and a similar two-endpoint shape.
- **TheNewsAPI** — Newer news aggregator with similar query+top headlines endpoints.
- **Currents API** — News and blog aggregator with multilingual coverage.
- **Mediastack API** — Live and historical news aggregator that complements GNews for back-fills.

## FAQ

### What authentication does the GNews API use?

GNews uses a query-string API key. Pass apikey={YOUR_KEY} on every request to /top-headlines and /search. Through Jentic the key is held in the vault and injected at execution time, so the raw key never appears in the agent's context.

### Can I filter GNews articles by date and country?

Yes. Both /top-headlines and /search accept country (ISO country code), lang (ISO language code), from and to (date range), plus topic on /top-headlines and q on /search. Combining filters returns a tightly scoped result list.

### What are the rate limits for the GNews API?

GNews enforces per-plan request quotas (free, basic, business). Specific per-second limits depend on the plan you hold; treat HTTP 429 responses as a back-off signal and cache headline pulls when possible to avoid burning quota.

### How do I search news articles through Jentic?

Search Jentic for 'search news articles', load the schema for GET /search, and execute with q=your keyword, lang=en, from=ISO timestamp. Run pip install jentic first to install the SDK.

### Does GNews return the full article body?

GNews returns the title, description, content snippet, source, and URL for each article rather than full article bodies, since publishers retain full text. Follow the URL when the agent needs the full piece.

### Is the GNews API free?

GNews offers a free developer tier with limited quota and paid plans for higher volume and more filters. Sign up at gnews.io to receive an API key and see the plan attached to your account.

### Can I limit what my agent is allowed to do with the GNews API?

Yes. Because you run Jentic One self-hosted, your own rules decide which GNews operations and credentials the agent may use. You can scope it to just one operation, such as searching articles with GET /search or fetching top headlines with GET /top-headlines, and grant only those. Both endpoints are read-only and take their filters as query parameters rather than path resource ids, so a scoped agent reads news data without any write ability.
