AnswerLine Start free

Docs / API reference /

Track Google News results

POST https://api.answerline.dev/v1/monitor/google/news

Get structured articles from Google News: title, link, source and date for each.

From $0.50 per 1,000 Failed requests are free Async task type GOOGLE_NEWS Google News fields and prices

Body

query string required

Query to run on Google News

country string

Country for localized news, as an ISO 3166-1 alpha-2 code. Google News publishes an edition in 71 countries, listed at https://answerline.dev/docs/coverage#countries; a request for another country is refused with a 400.

gl string

Google's own name for the result-geography parameter, usable in place of country. Takes ISO 3166-1 alpha-2 codes, as country does, in upper or lower case (us or US), and the country has to be one this endpoint supports (list them with GET /v1/countries; Google News has no model value there, and its edition countries are listed at https://answerline.dev/docs/coverage#countries). Send either country or gl; if both are sent with differing values, the request fails with 400.

state string

US state code (e.g. "CA", "DC" included). Sent without a country, the request asks for the US; sent with any country other than "US", it is refused with a 400, uncharged. ChatGPT and Gemini answer as a person in that state sees it; every other engine accepts it and answers for the whole US, at the price of a request without it. provenance.requestedState reports the state asked. See https://answerline.dev/docs/coverage#states

hl string

Interface language, in the format of Google's hl parameter (for example en, de, pt-BR). Case-insensitive free text; Google defines which codes exist. Takes precedence over the language Answerline infers from the country, which lets interface language and result geography differ.

device "desktop" | "mobile" | "ios" | "android"

Device to run the search on. Not served for Google News yet: its results are read without a device, and a request that sets one is refused with a 400.

pages integer

How many pages of news results to request (1-10). The feed returns one list of articles, so more pages add no articles; they are charged as requested.

include object

Flags that add extra data to the response (optional)

3 properties
include.html boolean

A copy of the Google News feed the results were read from as it was when the answer was captured, stored on our file host and linked in html, to check the answer against. No extra cost.

include.rawWire boolean

Return the engine's own response as received in result.rawWire: the answer stream, the rendered results pages or the RSS feed, without Gemini's detected location or ChatGPT's session tokens; null where it was not captured. Free. See https://answerline.dev/docs/output-formats#raw-wire

include.screenshot boolean

Return a full-page PNG screenshot of the engine's page as it showed the finished answer, in result.screenshot: a link, or one link per results page on Google Search. On ChatGPT, Gemini, AI Mode, Google Search, Perplexity and Grok; other engines refuse it with a 400. Absent when the answer was read without a rendered page or its page was not available. Free. See https://answerline.dev/docs/output-formats#screenshots

answerDepth "any" | "full" | "quick"

Accepted so existing requests stay valid; it does not change the answer or the price. Every engine writes one depth: Perplexity answers every request with its Quick Search answer, and provenance.answerDepth says quick. See https://answerline.dev/docs/engine-features/#answer-depth

Returns

result.newsResults object[]

Articles returned by Google News

result.html string[]

Present when include.html is true: the link to the stored copy of the Google News feed.

Responses

200
Google News monitoring result (success)
400
Bad Request - one or more parameters are not valid
401
Unauthorized - API key absent or not valid
403
Forbidden - INSUFFICIENT_CREDITS: the balance does not cover this request
404
Not Found - No such route, or the engine is paused
409
Conflict - the resource is in a conflicting state
429
Too Many Requests - the call could not start now (CONCURRENT_LIMIT_EXCEEDED), or the service dropped the request because it was overloaded (SERVICE_OVERLOADED); that case returns Retry-After without any limit headers. RATE_LIMIT_EXCEEDED, with Retry-After, is sent only when one address presented too many unknown keys
499
Client Closed Request - the client cancelled the request
500
Internal Server Error
502
Bad Gateway - the engine failed

Error codes and retries