> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google News results API

> Get the articles Google's News tab lists for a search, up to ten pages, with publisher, date and link.

`GOOGLE_NEWS` returns the articles Google lists in its News tab for a search. It reads up to ten pages of about 10 articles and keeps Google's order across pages, so you can follow which publishers Google shows for a topic, a brand or a competitor, and how that changes over time.

| | |
| - | - |
| `taskType` | `GOOGLE_NEWS` |
| Input | `query` (required); `pages`, `country`, `device`, `hl` |
| Credits | 1 per News page read. A page holds about 10 articles. |
| Country | Defaults to `US`. Any ISO 3166-1 alpha-2 code. |

## Request

This request asks for the first two News pages for electric vehicle tariffs in the US:

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "GOOGLE_NEWS", "payload": { "query": "electric vehicle tariffs", "country": "US", "pages": 2 } }'
```

The task runs asynchronously. Read the result as described in [Async tasks](https://docs.querying.ai/concepts/async-tasks.md).

## Parameters

| Field | Required | Description |
| - | - | - |
| `query` | Yes | The search, 1-100,000 characters. `prompt` is accepted when `query` is absent. |
| `pages` | No | How many News pages to read, an integer from 1 to 10. Defaults to `1`. |
| `country` | No | The Google market to search. Defaults to `US`. The page language follows the country unless `hl` sets it. |
| `device` | No | `desktop` by default. `mobile` or `android` reads the page Chrome renders on an Android phone. `ios` returns `422`. |
| `hl` | No | Google's `hl`, the interface language of the News page. It defaults to the language of `country`. Article dates and labels print in it. `pt-br` is read as `pt-BR`. |

## Response

For example, the request above:

```json theme={"theme":"css-variables"}
{
  "newsResults": [
    {
      "position": 1,
      "title": "...",
      "link": "https://...",
      "snippet": "...",
      "source": "...",
      "date": "3 hours ago",
      "page": 1,
      "thumbnail": "..."
    },
    { "position": 11, "page": 2, "...": "..." }
  ],
  "pages": 2
}
```

| Field | Description |
| - | - |
| `newsResults` | Always present, in Google's order. Each article has `position`, `title`, `link`, `page`, and `snippet`, `source`, `date` and `thumbnail` when Google shows them. |
| `newsResults[].position` | The article's rank in the whole list, from 1. It continues across pages. |
| `newsResults[].page` | The News page the article came from, 1 to 10. |
| `newsResults[].link` | The article's address. Empty when Google's redirect was not read in time; the redirect is then in `redirectLink`. |
| `newsResults[].redirectLink` | Google's redirect for the article, when Google served the link as one. Resolve an empty `link` with [`POST /v1/google/goto`](https://docs.querying.ai/api-reference/google-goto). |
| `newsResults[].date` | The age or date as Google prints it, in the page's language. |
| `pages` | How many News pages were read. The task is charged for these. |

When Google's list ends before `pages`, `newsResults` holds every article Google listed and `pages` counts the pages read. Treat every field except `position`, `title`, `link` and `page` as optional.

## Credits

Each News page read costs 1 credit. When it starts, the task holds the credits for the pages you asked for: 1 for the default, 10 for `pages: 10`. On completion it is charged for the pages it read, so a list Google ends after three pages costs 3. A failed task costs 0. See [Credits and limits](https://docs.querying.ai/concepts/credits-and-limits.md).

## Limits and errors

* An empty `newsResults` in a completed task means Google listed no article for the search. It is confirmed on a second browser before it is returned, and costs 1 credit.
* An `hl` that is not a language code such as `en`, `de` or `pt-BR` returns `422 VALIDATION_ERROR`.
* `pages` outside 1-10 or a `device` other than `desktop`, `mobile` or `android` returns `422 VALIDATION_ERROR`.
* `state` and `uule` return `422 LOCATION_UNSUPPORTED`. Set the market with `country`.
* `include.rawResponse` has no effect, and `include.html` and `include.analysis` return `422`. See [Markdown and raw responses](https://docs.querying.ai/engines/response-options.md).
* Other request errors are listed in [Errors](https://docs.querying.ai/concepts/errors.md).

## Related

* [Google Search](https://docs.querying.ai/engines/google-serp.md) for one results page with its organic results
* [Resolve a Google redirect](https://docs.querying.ai/api-reference/google-goto.md)
* [Credits and limits](https://docs.querying.ai/concepts/credits-and-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.