---
title: "Track Google News results"
method: POST
path: "/v1/monitor/google/news"
---

# Track Google News results

`POST /v1/monitor/google/news`

## Request

- Base URL: `https://api.answerline.dev`
- URL: `https://api.answerline.dev/v1/monitor/google/news`
- Auth: HTTP bearer

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

## Request body

- union
  - object
    - `query` string, required: Query to run on Google News
    - `country` string, required: 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`). Send either `country` or `gl`; if both are sent with differing values, the request fails with `400`.
    - `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 retrieve (1-10)
    - `include` object: Flags that add extra data to the response (optional)
      - `html` boolean: Not available for Google News: results are read from the news feed, with no page to snapshot, so `true` is refused with a validation error.
      - `rawWire` boolean: Return the engine's upstream answer as received in result.rawWire: the answer stream, or the provider's answer record, without the provider's billing data and account traces. Free. See https://answerline.dev/docs/output-formats#raw-wire
  - object
    - `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, required: 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`). Send either `country` or `gl`; if both are sent with differing values, the request fails with `400`.
    - `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 retrieve (1-10)
    - `include` object: Flags that add extra data to the response (optional)
      - `html` boolean: Not available for Google News: results are read from the news feed, with no page to snapshot, so `true` is refused with a validation error.
      - `rawWire` boolean: Return the engine's upstream answer as received in result.rawWire: the answer stream, or the provider's answer record, without the provider's billing data and account traces. Free. See https://answerline.dev/docs/output-formats#raw-wire

## Response `200`

Google News monitoring result (success)

- GoogleNewsMonitorResponse
  - `success` boolean, required
  - `result` object, required: Data from the Google News results
    - `newsResults` object[]: Articles returned by Google News
      - `position` number: Rank among news results (1-indexed)
      - `title` string: News article headline
      - `link` string: Link to the news article
      - `snippet` string: Short text summarizing the article
      - `source` string: Name of the news outlet or publisher
      - `date` string: Publication date
      - `page` number: Results page this item was found on (1-indexed)
      - `thumbnail` string: URL of the thumbnail image, when one exists
      - `redirectLink` string: The `/goto` redirect Google used for this link, given in the absolute form that `POST /v1/monitor/google/goto` takes. Only set when Google delivered the link through a redirect; the neighbouring link field contains the destination Answerline reached by following it.
    - `html` string[]: Raw HTML of the Google News pages (when requested)

## Other responses

- `400`: Bad Request - one or more parameters are not valid
- `401`: Unauthorized - API key absent or not valid
- `403`: Forbidden - not enough balance, or access was refused
- `404`: Not Found - No such route
- `409`: Conflict - the resource is in a conflicting state
- `429`: Too Many Requests - the request went over a rate limit or concurrency limit, or the service dropped the request because it was overloaded (`SERVICE_OVERLOADED`); that case returns `Retry-After` without any limit headers
- `499`: Client Closed Request - the client cancelled the request
- `500`: Internal Server Error
- `502`: Bad Gateway - an upstream service failed

---

[API](https://skmtc.dev/answerline/apis/answerline-api.md) · [All operations](https://skmtc.dev/answerline/apis/answerline-api/llms.txt) · [OpenAPI document](https://skmtc.dev/answerline/apis/answerline-api/revisions/a9dc35794662?raw)
