logo

Search Endpoint

Search Google and get structured SERP data as JSON

The Search endpoint performs a Google search for any query and returns fully parsed, structured JSON data. You get organic results, ads, knowledge graphs, local packs, video results, related questions, and more. All extracted and organized without any HTML parsing on your end.


Endpoint

GET https://api.scrape.do/plugin/google/search

Request Parameters

Required

ParameterTypeDescription
tokenstringYour Scrape.do API authentication token
qstringSearch query. URL-encode spaces and special characters. pizza+new+york or pizza%20new%20york

General

ParameterTypeDefaultDescription
devicestringdesktopDevice type for SERP layout. Accepted values: desktop, mobile
startinteger0Result offset for pagination. 0 = 1st page, 10 = 2nd page, 20 = 3rd page, etc.
include_htmlbooleanfalseWhen true, the raw Google HTML is included in the response html field. Useful for debugging and custom parsing

Localization & Geo-targeting

ParameterTypeDefaultDescription
hlstringenHost Language. Controls the language of the Google UI (buttons, labels, interface text). Supports 150+ languages. ISO 639-1 codes. Examples: tr, de, fr, ja, pt. Full list →
glstringusGeo Location (datacenter country). Determines from which country's perspective results are ranked and returned. Supports 240+ countries. ISO 3166-1 alpha-2 codes. Examples: tr, de, gb, jp. Full list →
google_domainstringgoogle.comGoogle domain to query. Supports 84 regional domains. Prefixes https://, http://, and www. are automatically stripped. Examples: google.com.tr, google.de, google.co.uk. Full list →
locationstring-Location name in Google's canonical format. Automatically encoded to UULE internally. Examples: Istanbul,Istanbul,Turkey, New York,New York,United States
uulestring-Google UULE-encoded location string. Auto-generated from location when not provided. If both location and uule are sent, uule takes priority. location is sufficient for most use cases

Result Filtering

ParameterTypeDefaultDescription
lrstring-Language Restrict. Filters results to pages written in a specific language only. Supports 35 languages. Format: lang_XX. Examples: lang_tr (Turkish), lang_en (English), lang_de (German). Full list →
crstring-Country Restrict. Filters results to pages originating from a specific country only. Supports 240+ countries. Format: countryXX. Examples: countryTR (Turkey), countryUS, countryDE. Full list →
safestring-SafeSearch. Send active to filter adult content from results
nfprbooleanfalseWhen true, disables Google's automatic spelling correction. The "Did you mean..." suggestion will not alter results
filterstring-Controls "Similar Results" and "Omitted Results" filters. Send 0 to disable and show all results. Default (not sent or 1) = filters active
time_periodstring-Time-based filter. Accepted values: last_hour, last_day, last_week, last_month, last_year

hl vs lr / gl vs cr: hl and gl set the search context. Google treats them as hints, so results may still include other languages or countries. lr and cr apply strict filtering. Only results matching the specified language or country are returned.


Example Usage

Step 1: Define Your Search Query

Decide what you want to search for on Google. This can be:

  • General queries: pizza new york, best laptop 2026
  • Local searches: restaurants near me, hotels in istanbul
  • Informational queries: how to learn python, what is web scraping

For this example, we'll search for "pizza new york":

Step 2: Send the API Request

curl --location --request GET 'https://api.scrape.do/plugin/google/search?token=<SDO-token>&q=pizza+new+york'
import requests
import json

token = "<SDO-token>"
query = "pizza+new+york"

url = f"https://api.scrape.do/plugin/google/search?token={token}&q={query}"

response = requests.request("GET", url)

print(json.dumps(response.json(), indent=2))
const axios = require('axios');

const token = "<SDO-token>";
const query = "pizza+new+york";

const url = `https://api.scrape.do/plugin/google/search?token=${token}&q=${query}`;

axios.get(url)
  .then(response => {
    console.log(JSON.stringify(response.data, null, 2));
  })
  .catch(error => {
    console.error(error);
  });
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	token := "<SDO-token>"
	query := "pizza+new+york"

	url := fmt.Sprintf(
		"https://api.scrape.do/plugin/google/search?token=%s&q=%s",
		token, query,
	)

	resp, err := http.Get(url)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(body))
}
require 'net/http'
require 'json'

token = "<SDO-token>"
query = "pizza+new+york"

url = URI("https://api.scrape.do/plugin/google/search?token=#{token}&q=#{query}")

response = Net::HTTP.get(url)

puts JSON.pretty_generate(JSON.parse(response))
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class GoogleSearch {
    public static void main(String[] args) throws Exception {
        String token = "<SDO-token>";
        String query = "pizza+new+york";

        String url = String.format(
            "https://api.scrape.do/plugin/google/search?token=%s&q=%s",
            token, query
        );

        HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
        conn.setRequestMethod("GET");

        BufferedReader reader = new BufferedReader(
            new InputStreamReader(conn.getInputStream())
        );
        String line;
        StringBuilder response = new StringBuilder();
        while ((line = reader.readLine()) != null) {
            response.append(line);
        }
        reader.close();

        System.out.println(response.toString());
    }
}
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program
{
    static async Task Main()
    {
        string token = "<SDO-token>";
        string query = "pizza+new+york";

        string url = $"https://api.scrape.do/plugin/google/search?token={token}&q={query}";

        using HttpClient client = new HttpClient();
        string response = await client.GetStringAsync(url);

        Console.WriteLine(response);
    }
}
<?php
$token = "<SDO-token>";
$query = "pizza+new+york";

$url = "https://api.scrape.do/plugin/google/search?token={$token}&q={$query}";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
curl_close($ch);

echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
?>

Step 3: Receive Structured Results

The API returns a JSON object with all SERP elements parsed and categorized:

{
  "search_parameters": {
    "q": "pizza new york",
    "hl": "en",
    "gl": "us",
    "device": "desktop",
    "start": 0,
    "google_domain": "google.com"
  },
  "search_information": {
    "page_title": "pizza new york - Google Search",
    "query_displayed": "pizza new york",
    "total_results": 349000000,
    "time_taken_displayed": 0.52,
    "organic_results_state": "Results for exact spelling",
    "results_for": "",
    "country": "",
    "city": ""
  },
  "organic_results": [
    {
      "position": 1,
      "title": "The Best Pizzerias of New York City",
      "link": "https://ny.eater.com/maps/best-pizza-new-york-city-nyc-pizzerias",
      "displayed_link": "https://ny.eater.com › maps › best-pizza-new-york-city-...",
      "snippet": "Where to find the best pizza in New York at the best pizzerias in NYC serving the best pies and slices including L&B Spumoni Gardens, L'Industrie, ...",
      "snippet_highlighted_words": ["best"],
      "source": "Eater New York"
    },
    {
      "position": 2,
      "title": "Ny Pizza New York, NY - Last Updated February 2026",
      "link": "https://www.yelp.com/search",
      "displayed_link": "https://www.yelp.com › Restaurants",
      "snippet": "Top 10 Best Ny Pizza in New York, NY - Yelp - NY Pizza Suprema, Juliana's, L'industrie Pizzeria, Joe's Pizza, Angelo's Coal Oven ...",
      "snippet_highlighted_words": ["NY Pizza Suprema"],
      "source": "yelp.com",
      "rich_snippet": {
        "bottom": {
          "extensions": ["(41,361)"]
        }
      }
    },
    {
      "position": 3,
      "title": "NYC: Best Pizza",
      "link": "https://www.the-carboholic.com/nyc-guides/nyc-best-pizza",
      "displayed_link": "https://www.the-carboholic.com › nyc-guides › nyc-best-...",
      "snippet": "Nov 23, 2025 — The best (and one of the only) I've found is from Emmett's. You can build your own deep dish pie here, choosing from a list of 20+ toppings.",
      "snippet_highlighted_words": ["Emmett's"],
      "source": "The Carboholic"
    }
  ],
  "related_questions": [
    { "question": "What is the most famous pizza in New York?" },
    { "question": "What is the best pizza in NYC?" },
    { "question": "Why is Joe's pizza so famous?" }
  ],
  "related_searches": [
    { "query": "best pizza in new york", "link": "https://www.google.com/search?q=best+pizza+in+new+york" },
    { "query": "pizza delivery new york", "link": "https://www.google.com/search?q=pizza+delivery+new+york" }
  ],
  "pagination": {
    "current": 0,
    "next": "https://www.google.com/search?q=pizza+new+york&start=10",
    "other_pages": {
      "2": "...&start=10",
      "3": "...&start=20"
    }
  }
}

Pagination

To get additional pages of results, increment the start parameter by 10:

/plugin/google/search?token=...&q=pizza+new+york&start=10

The start parameter uses zero-based offset: 0 = first page, 10 = second page, 20 = third page, and so on.


Response Structure

Top-Level Fields

FieldTypeWhen EmptyDescription
search_parametersobjectalways presentEcho of the request parameters sent by the client
search_informationobjectalways presentSearch metadata: total results, timing, detected location
organic_resultsarray[]Standard web search results
top_adsarray[]Sponsored results above organic results
bottom_adsarray[]Sponsored results below organic results
top_storiesarray[]News and stories carousel
related_questionsarray[]"People Also Ask" expandable questions
related_searchesarray[]Related search query suggestions
navigationarray[]Search type tabs (All, Images, News, etc.)
video_resultsarray[]Video results section
discussions_and_forumsarray[]Forum and Reddit-style discussion results
local_mapobjectnullMap widget with link and thumbnail image
local_resultsobjectnullLocal business listings (map pack)
knowledge_graphobjectnullKnowledge panel for entities
paginationobjectnullPagination links and metadata
htmlstringomittedRaw Google HTML. Only present when include_html=true

Array fields always return [] when empty (never null). Object fields return null when absent. The html field is completely omitted unless include_html=true.


search_parameters

Echoes the request parameters. Always-present fields are shown below; optional fields appear only when sent by the client.

{
  "q": "pizza new york",
  "hl": "en",
  "gl": "us",
  "device": "desktop",
  "start": 0,
  "google_domain": "google.com",
  "location": "New York,New York,United States",
  "uule": "w+CAIQICIfTmV3IFlvcmssTmV3...",
  "nfpr": true,
  "lr": "lang_en",
  "cr": "countryUS",
  "safe": "active",
  "time_period": "last_week",
  "filter": "0"
}

search_information

Search metadata. All fields are always present (empty string or zero when no data).

FieldTypeDescription
page_titlestringHTML page title returned by Google
query_displayedstringThe query as displayed by Google on the results page
total_resultsintegerApproximate total number of results reported by Google
time_taken_displayedfloatSearch time in seconds as displayed by Google
organic_results_statestringState of results (e.g., "Results for exact spelling")
results_forstringCorrected query if Google auto-corrected the search term
countrystringDetected country from results context
citystringDetected city from results context

organic_results[]

Standard web search results.

FieldTypeDescription
positionintegerResult position on the page (1-indexed)
titlestringPage title
linkstringDirect URL to the page
displayed_linkstringURL as shown in the SERP (breadcrumb format)
snippetstringResult description/snippet text
snippet_highlighted_wordsstring[]Bold/highlighted words within the snippet
sourcestringSource website name (e.g., "Eater New York", "Reddit · r/FoodNYC")
datestringPublication date (e.g., "3 days ago", "Nov 23, 2025")
sitelinksobjectSitelinks: { "inline": [{ "title", "link", "description" }] }
rich_snippetobjectRich snippet data: { "bottom": { "extensions": ["(41,361)", ...] } }

top_ads[] & bottom_ads[]

Sponsored results. top_ads appear above organic results, bottom_ads appear below.

FieldTypeDescription
positionintegerAd position within its group (1-indexed)
titlestringAd headline
urlstringAd destination URL
displayed_urlstringURL shown in the ad
descriptionstringAd description text
phonestringPhone number (if displayed in the ad)

knowledge_graph

Rich knowledge panel. Fields vary by entity type (person, business, place, etc.).

FieldTypeDescription
titlestringEntity name
typestringEntity type (e.g., "Restaurant", "Person", "Movie")
knowledge_graph_typestringInternal Knowledge Graph type identifier
kgmidstringKnowledge Graph Machine ID
descriptionstringEntity description text
sourceobject{ "name": "Wikipedia", "link": "..." }
header_imagesarray[{ "image": "...", "source": "..." }]
factsarray[{ "label": "Origin", "value": "Italy" }]
ratingfloatRating score
review_countintegerNumber of reviews
addressstringPhysical address
phonestringPhone number
websitestringOfficial website URL
open_hoursarray[{ "name": "Monday", "value": "10AM-11PM" }]
local_mapobject{ "link", "gps_coordinates": { "latitude", "longitude" } }
social_mediaarray[{ "platform": "Twitter", "url": "..." }]
related_topicsarray[{ "title": "Chicago-style pizza" }]
user_reviewsarray[{ "review", "rating", "user": { "name", "link" } }]

Additional entity-dependent fields may include: age, born, born_location, spouse, children, education, tv_shows, price_range, service_options, directions, menu, reservations, popular_times, web_reviews, merchant_description, profiles, images, ludocid.


local_results

Local business results (Google Maps pack). Contains a places array and an optional link to more results.

{
  "places": [
    { "position": 1, "title": "Joe's Pizza Broadway", "rating": 4.5, "price": "$10–20" },
    { "position": 2, "title": "NY Pizza Suprema", "rating": 4.6, "price": "$10–20" }
  ],
  "more_locations_link": "https://..."
}
FieldTypeDescription
places[].positionintegerPosition in the local pack (1-indexed)
places[].titlestringBusiness name
places[].ratingfloatStar rating (e.g., 4.5)
places[].pricestringPrice range (e.g., "$10–20", "$$")
more_locations_linkstringURL to see more local results

local_map

Map widget associated with local results.

{
  "link": "https://...",
  "image": "data:image/png;base64,..."
}
FieldTypeDescription
linkstringURL to the map or top local result
imagestringBase64-encoded map thumbnail image

"People Also Ask" expandable question boxes.

FieldTypeDescription
questionstringThe question text

video_results[]

FieldTypeDescription
positionintegerPosition in the video section
titlestringVideo title
urlstringVideo URL
sourcestringPlatform name and channel (e.g., "YouTube · Bon Appétit")
durationstringVideo duration (e.g., "16:00")

top_stories[]

News and stories carousel. Contains sections with an array of story items.

[{
  "items": [
    { "position": 1, "title": "...", "link": "..." },
    { "position": 2, "title": "...", "link": "..." }
  ]
}]

discussions_and_forums[]

FieldTypeDescription
positionintegerPosition in the discussions section
titlestringThread title
linkstringThread URL
sourcestringPlatform name (e.g., "Reddit", "Stack Overflow")
datestringPost date
communitystringCommunity name (e.g., "r/FoodNYC")

FieldTypeDescription
querystringRelated search query text
linkstringGoogle search URL for this query

FieldTypeDescription
titlestringTab name (e.g., "All", "Images", "News", "Maps")
urlstringURL for that search type

pagination

{
  "current": 0,
  "next": "https://www.google.com/search?q=...&start=10",
  "other_pages": {
    "2": "...&start=10",
    "3": "...&start=20"
  }
}

Example Requests

Basic search:

/plugin/google/search?token=TOKEN&q=pizza+new+york

Turkish results from Turkey, mobile device:

/plugin/google/search?token=TOKEN&q=pizza&hl=tr&gl=tr&device=mobile&google_domain=google.com.tr

Location-based search (auto UULE encoding):

/plugin/google/search?token=TOKEN&q=restaurants&location=Istanbul,Istanbul,Turkey

Advanced filtering:

/plugin/google/search?token=TOKEN&q=python+tutorial&lr=lang_en&cr=countryUS&nfpr=true

Pagination (2nd page):

/plugin/google/search?token=TOKEN&q=pizza+new+york&start=10

Debug mode (include raw HTML):

/plugin/google/search?token=TOKEN&q=test&include_html=true

Search queries must be URL-encoded. The response is gzip compressed with a minimum size of 2KB.

On this page