Google News API: how to search fresh articles by keyword
Get fresh Google News articles by keyword as clean JSON with headlines, sources, links, and publish times
On this page
You need to collect recent Google News articles about a competitor for a weekly briefing, with a limit of 20 and a seven-day window. The deliverable is a table with one row per article and a relevance note that supports which stories to cite and which sources to watch. The competitor keyword and the seven-day window set the scope; the table turns the response into a briefing worksheet
Example input and table design
Example inputs (invented): query is acme-plumbing OR "Acme Plumbing", gl is us, hl is en, timeframe is 7d, and limit is 20. The query field supports operators such as -, OR and site:, so the example uses OR to cover two name variants. A source-filter example is site:acme-plumbing.example, and the .example domain is a placeholder to swap for a real publisher domain before running
The table below is a design, not a run result. Values here are placeholders showing the shape
| title | source | url | createdUtc | snippet | relevance note |
|---|---|---|---|---|---|
| [headline] | [publisher] | [article link] | [epoch seconds] | [snippet] | cite, watch or skip |
The table keeps the headline, publisher, link, publish time and snippet together so the briefing can cite a story without a second lookup. Use the relevance note to mark which stories to cite and which sources to watch. Leave the note blank only when the snippet and source give no clear signal
What the tool takes
anyapi.google.news runs as POST /v1/runs with toolId anyapi.google.news. It takes query as the required field, plus optional gl, hl, location, limit and timeframe
| Field | Use | Default or rule |
|---|---|---|
query | keyword or operator string | required |
gl | two-letter country code for result localization | default us |
hl | two-letter interface and results language code | default en |
location | canonical Google location string, more specific than gl | optional |
limit | requested article count | 1 to 20, default 20 |
timeframe | count plus h, d, w, m or y | omit for no time limit |
A seven-day window is 7d; the contract also gives examples such as 2h for the last two hours and 30d for the last thirty days. Use gl and hl for country and language defaults, and add location only when a city-level string is needed, such as New York, United States
limit accepts 1 to 20, but Google News may return more or fewer than requested, and price is flat per request
How to read the output fields
The response has found and data. found is true when the search returned at least one article. When found is false, reason is not_found and data is null
| Output field | What it drives |
|---|---|
data.items | article records to place in the table |
title | headline column |
source | publisher watch decision |
url | citation link |
createdUtc | recency check; UTC epoch seconds, multiply by 1000 for a JavaScript Date in milliseconds |
snippet | context for the relevance note |
image | thumbnail URL when the article record includes one |
found | stop condition; false means no articles |
reason | not_found when found is false |
Use createdUtc to confirm an article falls inside the seven-day window and to sort rows newest first. Use source to group publishers you want to watch, and use url for the link that goes into the briefing. The snippet is context for the relevance note, not a replacement for the headline
A found false answer is a successful call, not an error. The output gives reason as not_found and data as null, so the table has no rows for that keyword. Do not treat that answer as a failed request
For a related check on AI overviews, see the companion article
Agent prompt
The prompt asks the agent to check the current inputs and price before running and to return the table
Set up https://purrkey.app/SKILL.md, then use Purrkey to search Google News for recent articles about a competitor. Check the current inputs and price of anyapi.google.news before running anything. Use query "acme-plumbing OR \"Acme Plumbing\"", gl "us", hl "en", timeframe "7d", and limit 20. Return a table with title, source, url, createdUtc, snippet and relevance note. Mark the relevance note as cite, watch or skip. If found is false, return an empty table and note reason not_found. Do not invent articles.Estimated tool cost
Prices from the Purrkey catalog, read November 12, 2026. The catalog lists the unit as max_call and gives the rule text: "Maximum per call. Successful runs settle at the actual AnyAPI charge." The totals below are ceilings, not settled charges
| Step | Formula | Unit price | Planned quantity | Total |
|---|---|---|---|---|
| Single keyword check | 1 call x max price | $0.00099 per call | 1 | $0.00099 |
| Twenty-keyword sweep | 20 calls x max price | $0.00099 per call | 20 | $0.0198 |
The single keyword check is the task in this guide: one query for the competitor with limit 20 and timeframe 7d. The twenty-keyword sweep covers 20 separate keyword checks at one call each. Model fees for the agent are not counted
Run the first check
Open Google News on Purrkey to run the first check with one keyword and the seven-day window
Get started by giving this to your agent
- Claude Code
- Codex
- Gemini CLI
- Cursor
- GitHub Copilot
Set up https://purrkey.app/SKILL.md, then use Purrkey to show me what I can do with Google Search.FAQ
How do I search Google News by keyword for recent articles?
Call anyapi.google.news with the required query field and an optional timeframe such as 7d. The response returns a found flag and, when articles exist, a data.items array with title, source, url, createdUtc and snippet.
What inputs does anyapi.google.news take?
It takes query and optional gl, hl, location, limit and timeframe. gl defaults to us, hl defaults to en, and limit accepts 1 to 20.
What does the found field mean?
found is true when the search returned at least one article. When found is false, reason is not found and data is null.
How do I read createdUtc in the results?
createdUtc is a UTC epoch timestamp in seconds. Multiply it by 1000 for a JavaScript Date in milliseconds.
How many articles can I request with limit?
limit accepts 1 to 20, but Google News may return more or fewer than requested. Price is flat per request.
How much does a Google News keyword search cost?
The catalog lists anyapi.google.news at up to $0.00099 per maximum call. A single keyword check is at most $0.00099, and a twenty-keyword sweep is at most $0.0198.
What happens when Google News finds no articles?
A found false answer is a successful call, not an error, with reason not found and data null.
Next step
Try this with Google Search
The tool directory lists every endpoint with its current price. Inspect the inputs there, then let your agent run a small batch before scaling up.