Google Search Advanced
Fetch a modern Google SERP and return richer structured modules including organic results, ads, People Also Ask, knowledge panels, local packs, news, videos, images, shopping blocks, answer boxes, related searches, spelling corrections, filters, and pagination when present. gl=us and hl=en are used when omitted. page is 0-based: page=0 is the first page and page=1 is the second; start is the preferred explicit result offset. total_results is Google's estimate when exposed and may be null; organic_results_count is the number of returned organic rows. Scrappa does not impose fixed per-key concurrency or requests-per-minute limits. Transient capacity responses include Retry-After, and failed responses including 503 are never charged. External text is returned as valid UTF-8; malformed byte sequences are replaced with the Unicode replacement character (�), while valid Unicode is preserved. Account balance and recent usage are available from GET /api/account/usage and in the dashboard. Explicit empty SERPs return immediately without provider retries, and tbs and as_qdr date filters use bounded retries. Source links are resolved when Google exposes their destinations; unavailable question source links are omitted. Video cards are returned in inline_videos; YouTube cards include channel, raw views and date text, normalized view_count, and publication_age when Google provides the metadata. AI Overview extraction is best effort: ai_overview is populated only when the module is present in the captured HTML. The endpoint does not wait for asynchronously inserted AI Overviews, make a secondary Google AI Overview request, or expand the module, and no request parameter enables those behaviors. When captured, cited sources are returned in ai_overview.references; null means the module was absent from the captured response, not that Google never displays one for the query. Local-pack-only responses are returned with empty organic_results and remain unbilled; they do not substitute for missing site-filtered results. Responses for a different query and non-definitive responses without usable result modules after retries return an unbilled 503. Local places include an optional website field when Google provides a valid business website action. search_url contains the sanitized Google SERP URL that produced the response. The serp_results collection preserves the DOM order of supported paid cards, local modules, and organic cards. rank_group is the 1-based position within one type; rank_absolute is the 1-based position across those supported types. A multi-place local module occupies one rank_absolute slot, and every nested local_results.places item inherits that rank so clients can merge local and organic results and sort by rank_absolute.
Run this endpoint
Endpoint
https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile
https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile
x-api-key
query
= best restaurants in Berlin
{
"search_information": {
"query_displayed": "best restaurants in Berlin",
"total_results": 428000000
},
"search_url": "https://www.google.de/search?q=best+restaurants+in+Berlin&hl=en&gl=de&complete=0&pws=0&nfpr=1",
"organic_results": [
{
"position": 1,
"rank_group": 1,
"rank_absolute": 3,
"title": "The 38 Best Restaurants in Berlin",
"link": "https://www.example.com/berlin/best-restaurants",
"displayed_link": "www.example.com > berlin > best-restaurants",
...
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
1 required parameter needed before sending a request.
25 optional filters available.
string
Required
Search query
best restaurants in Berlin
string
Optional
Location for results (currently ignored by backend)
Austin, Texas
string
Optional
Encoded location (deprecated; supported)
example
string
Optional
Google domain (e.g., google.de)
example
string
Optional
Country code (e.g., us, de, fr; default: us)
de
string
Optional
Restrict results to countries (e.g., countryUS|countryDE)
countryUS
string
Optional
Interface language code (default: en)
en
string
Optional
Restrict results to language (e.g., lang_en)
lang_en
string
Optional
Device used to fetch Google results: desktop (default), tablet, or mobile.
mobile
string
Optional
Advanced search filters (dates, patents, etc.)
example
string
Optional
Simple time range filter (e.g., d, w, m, y)
example
string
Optional
Safe search mode (active, off)
off
integer
Optional
Exclude auto-corrected results (default: 1). Set 0 to allow auto-correction; results for a different query are rejected.
10
integer
Optional
Enable/disable similar/omitted filters (0 or 1)
1
string
Optional
Search type (isch, vid, nws, lcl, shop, pts)
example
integer
Optional
Result offset for pagination (0-indexed)
0
integer
Optional
0-based page number: 0 is the first page and 1 is the second. Prefer start for new integrations.
1
integer
Optional
Results per page (1-10, may return fewer)
10
string
Optional
Google local listing signature, used with ludocid to target one listing.
example
string
Optional
Google Knowledge Graph machine ID of the entity to target (e.g. /m/0dr90d).
example
string
Optional
Opaque Google search context token, passed through unchanged.
example
string
Optional
Opaque Google interface parameter, passed through unchanged.
example
string
Optional
Opaque Google filter token from a previous result page, passed through unchanged.
example
string
Optional
Original Google query value, passed through and encoded once in the upstream URL.
example
string
Optional
Google search client identifier, passed through and encoded once in the upstream URL.
example
string
Optional
Opaque Google SERP context value, passed through and encoded once in the upstream URL.
example
Request Examples
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile",
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;
}
<?php
use Illuminate\Support\Facades\Http;
$response = Http::timeout(30)
->withHeaders(['x-api-key' => 'YOUR_API_KEY_HERE'])
->get('https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile');
if ($response->successful()) {
echo $response->body();
} else {
echo "Error: " . $response->status();
}
const options = {
method: 'GET',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE'
}
};
fetch('https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile', options)
.then(response => {
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return response.text();
})
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile',
headers: {
x-api-key: 'YOUR_API_KEY_HERE',
}
};
try {
const response = await axios(options);
console.log(response.data);
} catch (error) {
console.error('Error:', error.message);
}
require 'net/http'
require 'uri'
uri = URI.parse("https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == 'https'
request = Net::HTTP::Get.new(uri.request_uri)
request['x-api-key'] = 'YOUR_API_KEY_HERE'
begin
response = http.request(request)
puts response.body
rescue => e
puts "Error: #{e.message}"
end
import http.client
import json
conn = http.client.HTTPSConnection("scrappa.co")
headers = {
'x-api-key': 'YOUR_API_KEY_HERE',
}
try:
conn.request("GET", "/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
except Exception as e:
print(f"Error: {e}")
finally:
conn.close()
import requests
headers = {
'x-api-key': 'YOUR_API_KEY_HERE',
}
try:
response = requests.get('https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile', headers=headers)
response.raise_for_status()
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import java.io.IOException;
public class ApiExample {
public static void main(String[] args) {
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile")
.addHeader("x-api-key", "YOUR_API_KEY_HERE")
.build();
try (Response response = client.newCall(request).execute()) {
if (response.isSuccessful()) {
System.out.println(response.body().string());
} else {
System.out.println("Error: " + response.code());
}
} catch (IOException e) {
System.out.println("Error: " + e.getMessage());
}
}
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile", nil)
if err != nil {
fmt.Println("Error creating request:", err)
return
}
req.Header.Set("x-api-key", "YOUR_API_KEY_HERE")
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error making request:", err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println("Error reading response:", err)
return
}
fmt.Println(string(body))
}
#!/bin/bash
curl -X GET \
-H "x-api-key: YOUR_API_KEY_HERE" \
"https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile"
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY_HERE");
try
{
var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get, "https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile"));
var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
}
catch (Exception ex)
{
Console.WriteLine($"Error: {ex.Message}");
}
}
}
import axios from 'axios';
async function run(): Promise<void> {
try {
const response = await axios({
method: 'GET',
url: 'https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile',
headers: {
'x-api-key': 'YOUR_API_KEY_HERE',
},
});
console.log(response.data);
} catch (error) {
console.error('Error:', error);
}
}
void run();
use reqwest::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new();
let response = client
.get("https://scrappa.co/api/search-advanced?query=best+restaurants+in+Berlin&hl=en&gl=de&device=mobile")
.header("x-api-key", "YOUR_API_KEY_HERE")
.send()
.await?;
println!("{}", response.text().await?);
Ok(())
}
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
search_information
search_url
organic_results
related_questions
people_also_search_for
things_to_know
knowledge_graph
see_results_about
+26 more
Common organic_results fields
position
rank_group
rank_absolute
title
{
"search_information": {
"query_displayed": "best restaurants in Berlin",
"total_results": 428000000
},
"search_url": "https://www.google.de/search?q=best+restaurants+in+Berlin&hl=en&gl=de&complete=0&pws=0&nfpr=1",
"organic_results": [
{
"position": 1,
"rank_group": 1,
"rank_absolute": 3,
"title": "The 38 Best Restaurants in Berlin",
"link": "https://www.example.com/berlin/best-restaurants",
"displayed_link": "www.example.com > berlin > best-restaurants",
"snippet": "A curated guide to Berlin restaurants, from modern German dining rooms to casual neighborhood favorites.",
"source": "example.com"
}
],
"related_questions": [
{
"question": "What food is Berlin best known for?",
"snippet": "Berlin is known for currywurst, doner kebab, and a large international restaurant scene.",
"link": "https://www.example.com/berlin-food-guide"
}
],
"people_also_search_for": [],
"things_to_know": [],
"knowledge_graph": null,
"see_results_about": null,
"twitter_card": null,
"local_results": {
"places": [
{
"position": 1,
"rank_absolute": 2,
"title": "Example Berlin Bistro",
"rating": 4.7,
"reviews": 1842,
"type": "Restaurant",
"address": "Mitte, Berlin",
"website": "https://www.example-bistro.de/"
}
],
"modules": [
{
"title": "Places",
"place_indexes": [
0
],
"rank_group": 1,
"rank_absolute": 2
}
]
},
"local_map": null,
"answer_box": null,
"ai_overview": null,
"ads": [
{
"position": 1,
"rank_group": 1,
"rank_absolute": 1,
"title": "Reserve a Berlin restaurant",
"link": "https://ads.example.com/berlin-restaurants",
"displayed_link": "ads.example.com",
"snippet": "Find and reserve a table in Berlin."
}
],
"top_stories": [],
"videos": [],
"inline_videos": [
{
"position": 1,
"title": "Adobe Express Brand Kit Tutorial 2026",
"link": "https://www.youtube.com/watch?v=example123",
"platform": "YouTube",
"channel": "XayLi Barclay",
"views": "720+ views",
"view_count": 720,
"date": "4 months ago",
"publication_age": "4 months ago"
}
],
"inline_images": [],
"shopping_results": [],
"popular_products": [],
"perspectives": [],
"events_results": [],
"recipes_results": [],
"immersive_products": [],
"filters": [],
"related_searches": [],
"refine_this_search": [],
"nutrition_information": null,
"pagination": [],
"serp_results": [
{
"type": "paid",
"result_index": 0,
"rank_group": 1,
"rank_absolute": 1
},
{
"type": "local_results",
"module_index": 0,
"rank_group": 1,
"rank_absolute": 2
},
{
"type": "organic",
"result_index": 0,
"rank_group": 1,
"rank_absolute": 3
}
],
"organic_results_count": 1,
"total_results": 428000000,
"engine_used": "google",
"service_used": "google"
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
One or more query parameters failed validation.
{
"message": "The request validation failed",
"errors": {
"query": [
"The query field is required."
]
}
}
The upstream service is temporarily unavailable. Please retry shortly.
The upstream service is temporarily unavailable. Please retry shortly.
{
"error": "Google Search Advanced is temporarily unable to return a valid SERP."
}
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.
Related reading
Pay-as-you-go scraping API
Compare flexible scraping API billing before scaling Google Search Advanced traffic.
Best MCP servers for web scraping
Compare MCP server options for running structured scraping endpoints from AI agents.
Serper.dev alternative
Compare Google Search API pricing, free credits, request limits, and no-credit-card testing.