Google News API

Using Google News API you can scrape results from news.google.com without worrying about proxy rotation and data parsing. Each successful request will cost you 5 API credits.

You have to send a GET request to http://api.scrapingdog.com/google_news/v2 with the below-given parameters.

Google News API pricing is available here.

The difference between the legacy Google News Search API and Google News API is that the new API is much faster, returns images as URLs instead of base64, and provides the date entity with the actual time instead of a duration, as in the Google News Search API.

Parameters

Scrapingdog Parameters

Parameter
Description

api_key

required

Your personal API key. Available on your dashboard Type: String

Search Query

Parameter
Description

query

This parameter specifies the query you want to search for, just like a standard Google News search. You can include operators such as site: or when:.

It cannot be used alongside publication_token, story_token, or topic_token parameters. Type: String

Geographic Location and Localization

Parameter
Description

country

This parameter specifies the country for the Google search using a two-letter country code (e.g., US for the United States, UK for the United Kingdom, or FR for France). For a complete list of supported countries, visit the Google countries page.

Default Value - us

Type - String

language

Language of the results. Possible Values - en, es, fr, de, etc. Visit Google's languages page for a complete list of supported countries.

Default Value - en

Type - String

Advanced Google News Parameters

Parameter
Description

topic_token

The parameter specifies the Google News topic token, which allows access to news results for a particular topic (e.g., "World," "Business," "Technology").

You can find this token in our JSON response or within the Google News URL, where it appears as a string of characters following /topics/.

This parameter cannot be used alongside q, story_token, or publication_token. Type - String

publication_token

This parameter specifies the Google News publication token, allowing you to retrieve news results from a specific publisher (e.g., "CNN," "BBC," "The Guardian").

You can find the token in our JSON response or within the URL of a Google News page (it appears as a string of characters following /publications/).

This parameter cannot be used together with q, story_token, or topic_token. Type - String

section_token

This parameter defines the Google News section token, which is used to access a subsection of a specific topic (e.g., "Business → Economy").

The token can be found in our JSON response or in the URL of a Google News page (where it appears as a string of characters following /sections/).

This parameter can only be used in combination with the topic_token or publication_token parameters. Type - String

so

This parameter defines the sorting method. Results can be sorted by relevance or date, with relevance being the default.

The supported values are:

  • 0 – Relevance (default)

  • 1 – Date

This parameter can only be used in combination with the story_token parameter. Type - String

API Example

curl "https://api.scrapingdog.com/google_news/v2/?api_key=5eaa61a6e562fc52fe763tr516e4653&query=football&country=us"

Response

Last updated