Response shape stated up front
Know whether the engine returns parsed result collections or a source SERP payload before you design the consumer.
API SERP
Send a contextual request to documented Google, Bing, DuckDuckGo, or Yandex endpoints. Google and Bing return parsed JSON result collections; DuckDuckGo and Yandex return request metadata plus the source SERP HTML payload in a JSON envelope.
Search data without the scraper
Provide the query and search context. WebScrapingAPI operates supported retrieval and response handling, including parsed result collections where the selected endpoint documents them.
Know whether the engine returns parsed result collections or a source SERP payload before you design the consumer.
Keep engine, query, locale, language, device, vertical, and pagination inputs beside each observation.
WebScrapingAPI runs the supported search retrieval path and maintains documented response handling.
For parsed endpoints, optional result collections appear only when the returned SERP exposes them; absence is not automatically a collection failure.
Preserve the request fingerprint with stored results so comparisons remain like-for-like.
Documented coverage
Each engine has its own parameters and response shape. Choose the endpoint first, then validate the required result types with representative queries.
Google Search supports documented web, image, video, news, shopping, and jobs controls. Dedicated endpoints cover additional Google surfaces.
googlegoogle_asyncgoogle_mapsgoogle_flightsgoogle_maps_reviewsgoogle_reverse_imagegoogle_trendsgoogle_hotelsReceive documented JSON result collections with market, location, language, safe-search, offset, and result-count controls.
Receive request metadata and the source SERP HTML payload inside a JSON envelope, with documented region, interface-language, safe-search, time-range, and device controls.
Receive request metadata and the source SERP HTML payload inside a JSON envelope, with documented location, language, device, page, and time-range controls.
Coverage boundary: an engine name does not imply identical controls or parsing. Google and Bing document parsed JSON result collections; DuckDuckGo and Yandex document a JSON envelope containing the source SERP HTML payload. The current endpoint documentation remains the production source of truth.
Engine-aware response
Parsed collections and source payloads require different consumers. Select the engine first, validate its current response shape, and preserve the request context beside the output.
Engine, query, and response-level metadata exposed by the selected endpoint.
search_parameters · generalTitles, links, descriptions, observed positions, and optional modules where documented and returned.
organic[] · related[] · module?The source HTML payload is returned inside the JSON envelope; your application owns any extraction from it.
search_results: "<html>…</html>"Add run IDs, requested timestamps, query-group identifiers, and schema versions when results enter your systems.
run_id · observed_at · schemaGoogle Search controls
Start with the required query. Add only the documented context needed to make the observation useful and comparable.
Use the query, a supported vertical, or the documented jobs search control.
qtbmibpSet supported domain, encoded location, language, country, and device values.
domainuulehlgldeviceUse the documented offset and requested result count for the page window you need.
startnumengine=googleUse the standard documented path when the application should wait for the current response.
Review synchronous parametersengine=google_asyncUse the dedicated documented workflow when queued Google retrieval fits the workload. Do not assume asynchronous behavior is shared by every engine.
Review asynchronous workflowOne request
Your application defines the observation and consumes the endpoint-specific result. WebScrapingAPI operates supported retrieval and response handling between them.
Define the observation
Choose the engine, query, and supported location, language, device, search-type, and pagination parameters.
Send the request
Call the server-side SERP endpoint with your API key. WebScrapingAPI operates supported retrieval and response handling.
Validate and use
Inspect the HTTP status and engine-specific response shape, then retain the context required by ranking, extraction, alerting, or research workflows.
Integration
Keep the API key outside client-side code, URL-encode search values, set a timeout, and inspect unsuccessful HTTP states before parsing the response.
Request brief
Use the same engine, market, language, device, and search type your product will rely on in production.
WSA_API_KEY stays server-sideapi_key + engine + qgl + hl + devicecurl --get --fail-with-body --max-time 120 \
"https://serpapi.webscrapingapi.com/v2" \
--data-urlencode "api_key=$WSA_API_KEY" \
--data-urlencode "engine=google" \
--data-urlencode "q=running shoes" \
--data-urlencode "gl=us" \
--data-urlencode "hl=en" \
--data-urlencode "device=mobile"import os
import requests
response = requests.get(
"https://serpapi.webscrapingapi.com/v2",
params={
"api_key": os.environ["WSA_API_KEY"],
"engine": "google",
"q": "running shoes",
"gl": "us",
"hl": "en",
"device": "mobile",
},
timeout=120,
)
response.raise_for_status()
print(response.json())const parameters = new URLSearchParams({
api_key: process.env.WSA_API_KEY,
engine: "google",
q: "running shoes",
gl: "us",
hl: "en",
device: "mobile",
});
const response = await fetch(
"https://serpapi.webscrapingapi.com/v2?" + parameters,
{ signal: AbortSignal.timeout(120_000) }
);
if (!response.ok) throw new Error("API status " + response.status);
console.log(await response.json());<?php
$parameters = http_build_query([
"api_key" => getenv("WSA_API_KEY"),
"engine" => "google",
"q" => "running shoes",
"gl" => "us",
"hl" => "en",
"device" => "mobile",
]);
$client = curl_init("https://serpapi.webscrapingapi.com/v2?" . $parameters);
curl_setopt_array($client, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 120,
]);
$body = curl_exec($client);
$status = curl_getinfo($client, CURLINFO_RESPONSE_CODE);
$error = curl_error($client);
curl_close($client);
if ($body === false) throw new RuntimeException($error);
if ($status >= 400) throw new RuntimeException("API status " . $status);
echo $body;package main
import (
"fmt"
"io"
"net/http"
"net/url"
"os"
"time"
)
func main() {
parameters := url.Values{}
parameters.Add("api_key", os.Getenv("WSA_API_KEY"))
parameters.Add("engine", "google")
parameters.Add("q", "running shoes")
parameters.Add("gl", "us")
parameters.Add("hl", "en")
parameters.Add("device", "mobile")
client := &http.Client{Timeout: 120 * time.Second}
response, err := client.Get(
"https://serpapi.webscrapingapi.com/v2?" + parameters.Encode(),
)
if err != nil { panic(err) }
defer response.Body.Close()
if response.StatusCode >= 400 { panic(fmt.Sprintf("API status %d", response.StatusCode)) }
body, err := io.ReadAll(response.Body)
if err != nil { panic(err) }
fmt.Println(string(body))
}import java.net.URI;
import java.net.URLEncoder;
import java.net.http.*;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
public final class SerpApiExample {
public static void main(String[] args) throws Exception {
String queryString = "api_key=" + URLEncoder.encode(
System.getenv("WSA_API_KEY"), StandardCharsets.UTF_8
) + "&engine=google&q=running%20shoes"
+ "&gl=us&hl=en&device=mobile";
var request = HttpRequest.newBuilder()
.uri(URI.create("https://serpapi.webscrapingapi.com/v2?" + queryString))
.timeout(Duration.ofSeconds(120))
.GET().build();
var response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
if (response.statusCode() >= 400) {
throw new RuntimeException("API status " + response.statusCode());
}
System.out.println(response.body());
}
}
using System;
using System.Net;
var apiKey = WebUtility.UrlEncode(
Environment.GetEnvironmentVariable("WSA_API_KEY")
);
var requestUrl =
"https://serpapi.webscrapingapi.com/v2?api_key=" + apiKey +
"&engine=google&q=running%20shoes" +
"&gl=us&hl=en&device=mobile";
using var client = new HttpClient();
client.Timeout = TimeSpan.FromSeconds(120);
var response = await client.GetAsync(requestUrl);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());require "net/http"
require "uri"
uri = URI("https://serpapi.webscrapingapi.com/v2")
uri.query = URI.encode_www_form(
api_key: ENV.fetch("WSA_API_KEY"),
engine: "google",
q: "running shoes",
gl: "us",
hl: "en",
device: "mobile"
)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.open_timeout = 10
http.read_timeout = 120
response = http.get(uri.request_uri)
raise "API status #{response.code}" unless response.is_a?(Net::HTTPSuccess)
puts response.bodyOperating ownership
SERP API returns one contextual, engine-specific response. Your application decides how parsed collections or source payloads become rankings, extracted records, comparisons, alerts, research, or recurring monitoring.
WebScrapingAPI operates
Your team owns
Decision boundary: SERP API does not define a universal rank, decide whether an absence is commercially meaningful, or operate your downstream analytics. Use eligible public results in line with the Acordo de serviço and applicable requirements.
Use cases
Preserve the request context first. Then calculate the metrics and decision rules appropriate to the use case.
Product choice
SERP API provides engine-aware search access with documented response shapes. Move toward infrastructure for more control, or toward managed delivery for more operational ownership.
Your team owns the search client, access logic, parsing, maintenance, and result model.
WebScrapingAPI retrieves an eligible public page while your application owns extraction.
Send a supported search query and receive parsed collections where documented, or a source SERP payload inside a JSON envelope.
Use a browser-backed REST request with documented waits and interaction steps when engine-specific SERP parameters are not the right fit.
WebScrapingAPI operates an agreed query set, cadence, schema, quality process, and delivery.
Production evaluation
Use representative queries before sizing a plan. Include ordinary, feature-heavy, localized, paginated, empty, and unsuccessful states across the engines and devices your application will use.
The formula is a planning model, not a billing promise. Current pricing and plan limits remain the commercial source of truth.
FAQ
Use these answers for product selection, then treat current endpoint documentation and representative requests as the implementation source of truth.
SERP API is a server-side endpoint for sending a search query with documented context and receiving the response shape supported by that engine. Google and Bing document parsed JSON result collections; DuckDuckGo and Yandex document a JSON envelope containing request metadata and the source SERP HTML payload.
Current WebScrapingAPI documentation includes Google, Bing, DuckDuckGo, and Yandex search endpoints. Google and Bing document parsed result collections, while DuckDuckGo and Yandex document a source HTML payload inside a JSON envelope. Validate each engine's parameters and response shape before production use.
The response depends on the selected engine. Google and Bing document JSON metadata plus parsed result collections. DuckDuckGo and Yandex document JSON metadata plus the source SERP HTML payload, which your application can store or extract according to its own data model.
For engines with documented parsed collections, the returned modules depend on the engine, query, location, device, and search type. Organic results and endpoint-specific modules such as ads, local elements, shopping, media, or related searches appear only when the returned search page exposes them.
Use the parameters documented for the selected engine. Google Search documents domain, encoded location, interface language, country, and desktop, mobile, or tablet device controls; other engines use their own market and localization parameters.
The documentation includes a dedicated asynchronous Google Search engine for queued retrieval. Treat asynchronous behavior as endpoint-specific and use the current workflow documentation when implementing submission and result retrieval.
No. A rank belongs to the engine, query, locale, language, device, search type, pagination state, and observation time that produced it. Preserve that request fingerprint before comparing observations.
WebScrapingAPI maintains supported response handling and parsed collections where the endpoint documentation provides them. DuckDuckGo and Yandex currently return the source SERP HTML payload in a JSON envelope, so your team owns any extraction from that payload as well as its internal data model and downstream decisions.
Inspect the HTTP status and documented error body, use bounded retries where appropriate, and distinguish an unsuccessful request from a successful search response in which an optional result collection is absent or empty.
SERP API accepts a supported search query and returns the documented response shape for that engine: parsed result collections where supported, or a source SERP payload inside a JSON envelope. Scraper API retrieves a public webpage, while Managed Data adds an agreed query set, schedule, quality process, schema, and delivery operated by WebScrapingAPI.
Your first observation
Start with a documented engine and representative query set, or speak with our team about recurring search-data delivery.