Google News
Search and retrieve news articles from Google News with comprehensive metadata.
Endpoint
/api/google_news
Parameters
string
Optional
The search term for news articles (optional if using tokens).
string
Optional
Interface language code (e.g., en, de, fr). Default: en
string
Optional
Geographic location code (e.g., us, uk, de). Default: us
string
Optional
Sort order: 0=relevance, 1=date. Default: 0
string
Optional
Page number for pagination. Default: 1
string
Optional
Token for specific topic browsing (cannot use with q parameter).
string
Optional
Knowledge Graph ID (format: /m/... or /g/..., use alone).
string
Optional
Token for specific publication browsing.
string
Optional
Token for specific news section.
string
Optional
Token for specific story cluster.
Request Examples
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.scrappa.co/api/google/news?q=artificial+intelligence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: YOUR API KEY HERE"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
const url = 'https://app.scrappa.co/api/google/news?q=artificial+intelligence';
const options = {
method: 'GET',
headers: {
"x-api-key": "YOUR API KEY HERE"
}
};
try {
const response = await fetch(url, options);
const result = await response.text();
console.log(result);
} catch (error) {
console.error(error);
}
require 'uri'
require 'net/http'
url = URI("https://app.scrappa.co/api/google/news?q=artificial+intelligence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = 'YOUR API KEY HERE'
response = http.request(request)
puts response.read_body
import http.client
conn = http.client.HTTPSConnection("app.scrappa.co")
headers = {
'x-api-key': "YOUR API KEY HERE",
}
conn.request("GET", "/api/google/news?q=artificial+intelligence", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://app.scrappa.co/api/google/news?q=artificial+intelligence")
.get()
.addHeader("x-api-key", "YOUR API KEY HERE")
.build();
Response response = client.newCall(request).execute();
Response Schema
[
{
"title": "JSON Results",
"description": null,
"json_sample": [
{
"date": "2 hours ago",
"link": "https://example.com/news/article",
"title": "Sample News Article Title",
"source": "Example News",
"snippet": "This is a sample snippet from the news article...",
"position": 1,
"thumbnail": "https://example.com/thumbnail.jpg"
}
]
}
]
Try It Live
Test this endpoint in our interactive playground with real data.
Open in Playground