curl "https://api.scrapio.dev/v1/google/search?search=openai&search_type=classic&country_code=us" \
-H "Authorization: Bearer $SCRAPIO_API_KEY"import os, requests
resp = requests.get(
"https://api.scrapio.dev/v1/google/search",
headers={"Authorization": f"Bearer {os.environ['SCRAPIO_API_KEY']}"},
params={"search": "openai", "country_code": "us"},
)
print(resp.json()["organic_results"])const params = new URLSearchParams({ search: "openai", country_code: "us" });
const resp = await fetch(`https://api.scrapio.dev/v1/google/search?${params}`, {
headers: { Authorization: `Bearer ${process.env.SCRAPIO_API_KEY}` },
});
const data = await resp.json();
console.log(data.organic_results);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrapio.dev/v1/google/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrapio.dev/v1/google/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrapio.dev/v1/google/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrapio.dev/v1/google/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"meta_data": {},
"organic_results": [
{}
],
"top_ads": [
{}
],
"bottom_ads": [
{}
],
"related_searches": [
{}
],
"related_queries": [
{}
],
"questions": [
{}
],
"images": [
{}
],
"knowledge_graph": {},
"local_results": [
{}
],
"map_results": [
{}
],
"news_results": [
{}
],
"top_stories": [
{}
],
"shopping_results": [
{}
],
"hotel_results": [
{}
],
"ai_overviews": [
{}
],
"html": "<string>"
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}Google Search
Execute a Google SERP query and receive structured results including organic results, ads, images, and more.
curl "https://api.scrapio.dev/v1/google/search?search=openai&search_type=classic&country_code=us" \
-H "Authorization: Bearer $SCRAPIO_API_KEY"import os, requests
resp = requests.get(
"https://api.scrapio.dev/v1/google/search",
headers={"Authorization": f"Bearer {os.environ['SCRAPIO_API_KEY']}"},
params={"search": "openai", "country_code": "us"},
)
print(resp.json()["organic_results"])const params = new URLSearchParams({ search: "openai", country_code: "us" });
const resp = await fetch(`https://api.scrapio.dev/v1/google/search?${params}`, {
headers: { Authorization: `Bearer ${process.env.SCRAPIO_API_KEY}` },
});
const data = await resp.json();
console.log(data.organic_results);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrapio.dev/v1/google/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrapio.dev/v1/google/search"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrapio.dev/v1/google/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrapio.dev/v1/google/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"meta_data": {},
"organic_results": [
{}
],
"top_ads": [
{}
],
"bottom_ads": [
{}
],
"related_searches": [
{}
],
"related_queries": [
{}
],
"questions": [
{}
],
"images": [
{}
],
"knowledge_graph": {},
"local_results": [
{}
],
"map_results": [
{}
],
"news_results": [
{}
],
"top_stories": [
{}
],
"shopping_results": [
{}
],
"hotel_results": [
{}
],
"ai_overviews": [
{}
],
"html": "<string>"
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}{
"request_id": "<string>",
"error": {
"code": "<string>",
"message": "<string>",
"details": [
"<string>"
],
"diagnostics": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Search query text
1Type of Google search to perform
classic, news, images, lens, ai_mode, ads Country code for localized results
2Language for results
2Device profile to emulate
desktop, mobile Result page number
-9007199254740991 <= x <= 9007199254740991Time filter for results
past_hour, past_day, past_week, past_month, past_year Latitude for local results
Longitude for local results
Search radius for local results
-9007199254740991 <= x <= 9007199254740991Raw extra query parameters
1Lighter-weight response
Include raw HTML in response
Disable auto-correct redirect
Custom tag/label for the request
1Response
Structured Google SERP response with organic results, ads, and enrichments.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes