Send a query to /serp, get parsed Google results back: positions, titles, links, snippets, related searches, and pagination. Flat 15 credits per search. When you need the pages behind the results, the same API scrapes those too.
2,000 free API credits · No credit card required
Field names follow the common SERP API convention, so code written against SerpApi-style responses reads ours with little change.
| Block | Fields |
|---|---|
organic_results | position, title, link, domain, displayed_link, plus snippet and date when Google shows them. Up to 10 results per page, in rank order. |
search_information | query_displayed, organic_results_state, and showing_results_for when Google auto-corrected the query. |
related_searches | Google's "Related searches" suggestions, each as query. |
pagination | current, and next when there is a further page. |
search_parameters | The normalized engine, q, gl, hl, and page the search ran with. |
q — the search query (required).gl / hl — two-letter country and language codes (default us / en).page — 1 to 100. position restarts at 1 on every page; absolute rank is (page - 1) * 10 + position.proxy=residential and js=true, which Google requires; 30 credits a page), or use a SERP vendor that parses them.Pass the query as q; set country with gl, language with hl, and depth with page.
curl -G "https://api.webscraping.ai/serp" \
--data-urlencode "api_key=YOUR_API_KEY" \
--data-urlencode "q=coffee machines" \
--data-urlencode "gl=us" \
--data-urlencode "hl=en" \
--data-urlencode "page=1"
# Response (excerpt):
# {
# "search_parameters": {"engine": "google", "q": "coffee machines", "gl": "us", "hl": "en", "page": 1},
# "search_information": {"query_displayed": "coffee machines",
# "organic_results_state": "Results for exact spelling"},
# "organic_results": [
# {"position": 1, "title": "Best Coffee Machines of 2026",
# "link": "https://www.example.com/best-coffee-machines", "domain": "example.com",
# "displayed_link": "www.example.com › Reviews › Coffee Machines",
# "snippet": "We tested 20 coffee machines to find the best ones..."},
# ...
# ],
# "related_searches": [{"query": "best espresso machine"}, ...],
# "pagination": {"current": 1, "next": 2}
# }
# pip install webscraping_ai
# https://pypi.org/project/webscraping-ai/
from webscraping_ai import Client
client = Client(api_key="YOUR_API_KEY")
results = client.serp("coffee machines", gl="us", hl="en", page=1)
for r in results["organic_results"]:
print(r["position"], r["title"], r["link"])
# Response (excerpt):
# {
# "search_parameters": {"engine": "google", "q": "coffee machines", "gl": "us", "hl": "en", "page": 1},
# "search_information": {"query_displayed": "coffee machines",
# "organic_results_state": "Results for exact spelling"},
# "organic_results": [
# {"position": 1, "title": "Best Coffee Machines of 2026",
# "link": "https://www.example.com/best-coffee-machines", "domain": "example.com",
# "displayed_link": "www.example.com › Reviews › Coffee Machines",
# "snippet": "We tested 20 coffee machines to find the best ones..."},
# ...
# ],
# "related_searches": [{"query": "best espresso machine"}, ...],
# "pagination": {"current": 1, "next": 2}
# }
// npm install webscraping-ai
// https://www.npmjs.com/package/webscraping-ai
import { WebScrapingAI } from 'webscraping-ai';
const client = new WebScrapingAI({ apiKey: 'YOUR_API_KEY' });
const serp = await client.serp({ q: 'coffee machines', gl: 'us', hl: 'en', page: 1 });
for (const r of serp.organic_results) {
console.log(`${r.position}. ${r.title} — ${r.link}`);
}
// Response (excerpt):
// {
// "search_parameters": {"engine": "google", "q": "coffee machines", "gl": "us", "hl": "en", "page": 1},
// "search_information": {"query_displayed": "coffee machines",
// "organic_results_state": "Results for exact spelling"},
// "organic_results": [
// {"position": 1, "title": "Best Coffee Machines of 2026",
// "link": "https://www.example.com/best-coffee-machines", "domain": "example.com",
// "displayed_link": "www.example.com › Reviews › Coffee Machines",
// "snippet": "We tested 20 coffee machines to find the best ones..."},
// ...
// ],
// "related_searches": [{"query": "best espresso machine"}, ...],
// "pagination": {"current": 1, "next": 2}
// }
<?php
// composer require webscraping-ai/webscraping-ai-php
// https://packagist.org/packages/webscraping-ai/webscraping-ai-php
require 'vendor/autoload.php';
use WebScrapingAI\Client;
$client = new Client('YOUR_API_KEY');
$serp = $client->serp(q: 'coffee machines', gl: 'us', hl: 'en', page: 1);
foreach ($serp['organic_results'] as $r) {
printf("%d. %s — %s\n", $r['position'], $r['title'], $r['link']);
}
// Response (excerpt):
// {
// "search_parameters": {"engine": "google", "q": "coffee machines", "gl": "us", "hl": "en", "page": 1},
// "search_information": {"query_displayed": "coffee machines",
// "organic_results_state": "Results for exact spelling"},
// "organic_results": [
// {"position": 1, "title": "Best Coffee Machines of 2026",
// "link": "https://www.example.com/best-coffee-machines", "domain": "example.com",
// "displayed_link": "www.example.com › Reviews › Coffee Machines",
// "snippet": "We tested 20 coffee machines to find the best ones..."},
// ...
// ],
// "related_searches": [{"query": "best espresso machine"}, ...],
// "pagination": {"current": 1, "next": 2}
// }
# gem install webscraping_ai
# https://rubygems.org/gems/webscraping_ai
require 'webscraping_ai'
client = WebScrapingAI::Client.new(api_key: 'YOUR_API_KEY')
results = client.serp(q: 'coffee machines', gl: 'us', hl: 'en', page: 1)
results['organic_results'].each do |r|
puts "#{r['position']}. #{r['title']} — #{r['link']}"
end
# Response (excerpt):
# {
# "search_parameters": {"engine": "google", "q": "coffee machines", "gl": "us", "hl": "en", "page": 1},
# "search_information": {"query_displayed": "coffee machines",
# "organic_results_state": "Results for exact spelling"},
# "organic_results": [
# {"position": 1, "title": "Best Coffee Machines of 2026",
# "link": "https://www.example.com/best-coffee-machines", "domain": "example.com",
# "displayed_link": "www.example.com › Reviews › Coffee Machines",
# "snippet": "We tested 20 coffee machines to find the best ones..."},
# ...
# ],
# "related_searches": [{"query": "best espresso machine"}, ...],
# "pagination": {"current": 1, "next": 2}
# }
// go get github.com/webscraping-ai/webscraping-ai-go/v4
// https://pkg.go.dev/github.com/webscraping-ai/webscraping-ai-go/v4
package main
import (
"context"
"fmt"
webscrapingai "github.com/webscraping-ai/webscraping-ai-go/v4"
)
func main() {
client, _ := webscrapingai.NewClient(&webscrapingai.Config{APIKey: "YOUR_API_KEY"})
page := 1
serp, _ := client.Serp(context.Background(), &webscrapingai.SerpOptions{
Q: "coffee machines",
GL: "us",
HL: "en",
Page: &page,
})
for _, r := range serp.OrganicResults {
fmt.Println(r.Position, r.Title, r.Link)
}
}
// Response (excerpt):
// {
// "search_parameters": {"engine": "google", "q": "coffee machines", "gl": "us", "hl": "en", "page": 1},
// "search_information": {"query_displayed": "coffee machines",
// "organic_results_state": "Results for exact spelling"},
// "organic_results": [
// {"position": 1, "title": "Best Coffee Machines of 2026",
// "link": "https://www.example.com/best-coffee-machines", "domain": "example.com",
// "displayed_link": "www.example.com › Reviews › Coffee Machines",
// "snippet": "We tested 20 coffee machines to find the best ones..."},
// ...
// ],
// "related_searches": [{"query": "best espresso machine"}, ...],
// "pagination": {"current": 1, "next": 2}
// }
// Maven: ai.webscraping:webscraping-ai:4.2.0
// https://central.sonatype.com/artifact/ai.webscraping/webscraping-ai
import ai.webscraping.Client;
import ai.webscraping.Config;
import ai.webscraping.option.SerpOptions;
import ai.webscraping.result.SerpResult;
Client client = new Client(Config.builder().apiKey("YOUR_API_KEY").build());
SerpResult serp = client.serp(SerpOptions.builder()
.q("coffee machines")
.gl("us")
.hl("en")
.page(1)
.build());
for (SerpResult.OrganicResult r : serp.getOrganicResults()) {
System.out.println(r.getPosition() + ". " + r.getTitle() + " — " + r.getLink());
}
// Response (excerpt):
// {
// "search_parameters": {"engine": "google", "q": "coffee machines", "gl": "us", "hl": "en", "page": 1},
// "search_information": {"query_displayed": "coffee machines",
// "organic_results_state": "Results for exact spelling"},
// "organic_results": [
// {"position": 1, "title": "Best Coffee Machines of 2026",
// "link": "https://www.example.com/best-coffee-machines", "domain": "example.com",
// "displayed_link": "www.example.com › Reviews › Coffee Machines",
// "snippet": "We tested 20 coffee machines to find the best ones..."},
// ...
// ],
// "related_searches": [{"query": "best espresso machine"}, ...],
// "pagination": {"current": 1, "next": 2}
// }
// dotnet add package WebScrapingAI
// https://www.nuget.org/packages/WebScrapingAI
using WebScrapingAI;
var client = new WebScrapingAIClient(new WebScrapingAIClientOptions { ApiKey = "YOUR_API_KEY" });
var serp = await client.SerpAsync(new SerpRequest {
Q = "coffee machines",
Gl = "us",
Hl = "en",
Page = 1,
});
foreach (var r in serp.OrganicResults) {
Console.WriteLine($"{r.Position}. {r.Title} — {r.Link}");
}
// Response (excerpt):
// {
// "search_parameters": {"engine": "google", "q": "coffee machines", "gl": "us", "hl": "en", "page": 1},
// "search_information": {"query_displayed": "coffee machines",
// "organic_results_state": "Results for exact spelling"},
// "organic_results": [
// {"position": 1, "title": "Best Coffee Machines of 2026",
// "link": "https://www.example.com/best-coffee-machines", "domain": "example.com",
// "displayed_link": "www.example.com › Reviews › Coffee Machines",
// "snippet": "We tested 20 coffee machines to find the best ones..."},
// ...
// ],
// "related_searches": [{"query": "best espresso machine"}, ...],
// "pagination": {"current": 1, "next": 2}
// }
Both return parsed Google results. The difference is what else the API does, and how many SERP features it parses.
SerpApi, Serper, SearchAPI.io, DataForSEO…
A SERP endpoint inside a general scraping API
/serp: organic results, related searches, spelling corrections, and pagination.link, on one API key and one bill./serp doesn't parse. If you need many SERP features or engines pre-parsed, a dedicated SERP API is the better fit.Rank checks usually lead to "now fetch the top 10 pages." Feed each link into /html, /text, or /ai/fields — one API and one bill for both steps.
organic_results, position, link, snippet, related_searches — the naming most SERP APIs share, with position restarting on every page as they do.
No proxy or rendering settings to tune — /serp handles routing and parsing. You pick the country and language with gl and hl.
15 credits per search, whatever the query or country. Failed searches aren't charged, and an invalid page is rejected before billing.
Does this return parsed SERP JSON like SerpApi?
Yes. The /serp endpoint returns Google results as JSON with the common SERP API field names: organic_results (position, title, link, domain, displayed_link, snippet, date), search_information, related_searches, and pagination. It does not parse People Also Ask, knowledge graph, ads, local packs, or AI Overviews — for those, run AI extraction on the Google results URL (with proxy=residential and js=true, which Google requires; 30 credits a page), or use a SERP vendor that parses them.
Can I target specific countries and languages?
Yes. Set gl to a two-letter country code and hl to a two-letter language code (defaults: us and en). Use page (1 to 100, 10 results per page) to go deeper; position restarts at 1 on every page, so the absolute rank is (page - 1) * 10 + position.
How much does a Google search cost?
A flat 15 credits per successful search. Failed searches are not charged, and an invalid page value is rejected with a 400 before billing. A real results page with zero organic results is a successful search and is billed. On the $29/mo plan (250,000 credits) that is roughly $1.74 per 1,000 searches, less on higher tiers.
Can I scrape the pages that rank, not just the SERP?
Yes — that's the main reason to get SERP data from a general scraping API. Take the link of each organic result and pass it to /html, /text, or /ai/fields to scrape the destination pages themselves. Rank tracking, content analysis, and competitor research run through one integration.
What about Bing, DuckDuckGo, or other search engines?
The /serp endpoint covers Google web search only today. For other engines, the page endpoints and AI extraction work on any public search results URL — you describe the fields you want instead of getting a pre-parsed schema.
Get started with 2,000 free API credits. No credit card required.