Google News API (v2)
The Google News API (v2) is faster than the search API and returns images as URLs instead of base64, and provides actual dates instead of relative durations. Supports topic tokens, publication tokens, and section tokens.
Endpoint:
https://api.scrapingdog.com/google_news/v2API Parameters
π
Authentication
api_keyRequiredYour personal API key. Available on your dashboard.
Type: String
π
Search Parameters
queryOptionalSpecifies the query you want to search for, just like a standard Google News search. You can include operators such assite:orwhen:. Cannot be used withpublication_token,story_token, ortopic_token.
Type: String
π
Geographic Location and Localization
countryOptionalSpecifies the country for the Google search using a two-letter country code (e.g.,us,uk,fr). Default:us. For a full list, see the Google Country Parameter.
Type: StringlanguageOptionalLanguage of the results. Possible Values:en,es,fr,de, etc. Default:en. For a full list, see the Google Language Page.
Type: String
β
οΈ Advanced Parameters
topic_tokenOptionalSpecifies the Google News topic token, which allows access to news results for a particular topic (e.g., World, Business, Technology). Cannot be used withquery(q),story_token, orpublication_token
Type: Stringpublication_tokenOptionalSpecifies the Google News publication token, allowing retrieval of news results from a specific publisher (e.g., CNN, BBC, The Guardian). Cannot be used withquery(q),story_token, ortopic_token
Type: Stringsection_tokenOptionalDefines the Google News section token, which is used to access a subsection of a specific topic (e.g., Business β Economy). Can only be used withtopic_tokenorpublication_token
Type: StringsoOptionalDefines the sorting method:0(Relevance, default) or1(Date). Can only be used withstory_token. Default:0
Type: String
API Examples
Code to Integrate
curl "https://api.scrapingdog.com/google_news/v2?api_key=APIKEY&query=football&country=us"
import requests url = "https://api.scrapingdog.com/google_news/v2" params = {"api_key": "APIKEY", "query": "football", "country": "us"} response = requests.get(url, params=params) if response.status_code == 200: print(response.json())
const axios = require('axios'); axios.get('https://api.scrapingdog.com/google_news/v2', { params: { api_key: 'APIKEY', query: 'football', country: 'us' } }).then(response => console.log(response.data)) .catch(error => console.error(error.message));
<?php $url = 'https://api.scrapingdog.com/google_news/v2/?' . http_build_query([ 'api_key' => 'APIKEY', 'query' => 'football', 'country' => 'us', ]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); echo curl_exec($ch); curl_close($ch);
require 'net/http' require 'uri' url = URI.parse("https://api.scrapingdog.com/google_news/v2/") url.query = URI.encode_www_form('api_key' => 'APIKEY', 'query' => 'football', 'country' => 'us') http = Net::HTTP.new(url.host, url.port) http.use_ssl = true puts http.request(Net::HTTP::Get.new(url)).body
import java.io.*; import java.net.*; public class Main { public static void main(String[] args) throws Exception { String apiUrl = "https://api.scrapingdog.com/google_news/v2/?api_key=APIKEY&query=football&country=us"; URL url = new URL(apiUrl); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; while ((line = reader.readLine()) != null) System.out.println(line); conn.disconnect(); } }
API Response
{
"news_results": [
{
"title": "Who are the best QBs in college football?",
"link": "https://www.espn.com/college-football/insider/story/_/id/44391723/",
"thumbnail": "https://a3.espncdn.com/combiner/i?img=%2Fphoto%2F2024%2F1216%2Fr1428799.jpg",
"source": "ESPN",
"authors": ["Adam Rittenberg"],
"date": "2025-03-27T12:11:00.000Z",
"rank": 1
},
{
"title": "NFL brings in WNBA star Caitlin Clark for flag football panel",
"link": "https://www.nfl.com/news/nfl-flag-football-panel",
"source": "NFL.com",
"date": "2025-03-26T14:00:00.000Z",
"rank": 2
}
]
}