Google News
Search and scrape news articles from Google News.
Endpoint
/api/google/search/news
Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Parameters
string
Optional
Search term for news (required unless using topic_token, kgmid, publication_token, section_token, or story_token)
string
Optional
Language code for the search interface (2 characters, e.g., en, de, fr). Default: en
string
Optional
Country code for geolocation (2 characters, e.g., us, de, uk). Default: us
integer
Optional
Page number for pagination (1-based). Default: 1
integer
Optional
Starting offset for pagination (0-based). Cannot be used with page parameter.
integer
Optional
Sort order: 0 for relevance, 1 for date. Default: 0
string
Optional
Token for specific topic browsing (cannot use with q parameter)
string
Optional
Knowledge Graph entity ID (format: /m/... or /g/..., use alone)
string
Optional
Token for specific publication browsing (cannot use with q parameter)
string
Optional
Token for specific news section (cannot use with q parameter)
string
Optional
Token for specific story cluster (cannot use with q parameter)
Request Examples
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://scrappa.co/api/google/news?q=technology');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'x-api-key: YOUR_API_KEY_HERE',
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
<?php
use Illuminate\Support\Facades\Http;
$response = Http::withHeaders([
'x-api-key' => 'YOUR_API_KEY_HERE',
])->get('https://scrappa.co/api/google/news?q=technology');
return $response->json();
fetch('https://scrappa.co/api/google/news?q=technology', {
headers: {
'x-api-key': 'YOUR_API_KEY_HERE'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const axios = require('axios');
axios.get('https://scrappa.co/api/google/news?q=technology', {
headers: {
'x-api-key': 'YOUR_API_KEY_HERE'
}
})
.then(response => console.log(response.data))
.catch(error => console.error('Error:', error));
import requests
headers = {
'x-api-key': 'YOUR_API_KEY_HERE'
}
response = requests.get('https://scrappa.co/api/google/news?q=technology', headers=headers)
print(response.json())
require 'net/http'
require 'uri'
require 'json'
uri = URI.parse('https://scrappa.co/api/google/news?q=technology')
request = Net::HTTP::Get.new(uri)
request['x-api-key'] = 'YOUR_API_KEY_HERE'
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
http.request(request)
end
puts JSON.parse(response.body)
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://scrappa.co/api/google/news?q=technology", nil)
req.Header.Set("x-api-key", "YOUR_API_KEY_HERE")
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
curl -X GET 'https://scrappa.co/api/google/news?q=technology' \
-H 'x-api-key: YOUR_API_KEY_HERE'
Response Schema
{
"news_results": [
{
"position": 1,
"title": "Example News Article",
"link": "https://example.com/news/article",
"type": "article",
"source": {
"name": "Example Source",
"title": "Example Source"
},
"date": "2 hours ago",
"iso_date": "2025-01-15T10:30:00+00:00",
"published_at": "2025-01-15 10:30:00 UTC",
"thumbnail": "https://news.google.com/api/attachments/example-thumbnail.jpg",
"thumbnail_small": "https://news.google.com/api/attachments/example-thumbnail-small.jpg",
"snippet": "Article summary text..."
}
],
"menu_links": [
{
"title": "Technology",
"link": "https://news.google.com/topics/CAAqJggKIiBDQkFTRWdvSUwyMHZNRFZ4ZERBU0FtVnVHZ0pWVXlnQVAB",
"topic_token": "CAAqJggKIiBDQkFTRWdvSUwyMHZNRFZ4ZERBU0FtVnVHZ0pWVXlnQVAB"
}
],
"related_publications": [],
"sub_menu_links": [],
"highlight": null,
"related_searches": [
{
"position": 1,
"query": "related search term",
"link": "https://news.google.com/search?q=related+search+term"
}
]
}