API 문서는 영어로 제공됩니다.

Google AI Overview

Get Google's AI Overview for a query, with cited sources.

GET/api/v1/google/ai-overview

Costs 1 credit per request; failed requests are refunded. Authentication, the search_metadata envelope and error codes are the same as for every endpoint (see the API reference). Try it in the playground.

Parameters

Query and entity selectors

ParameterTypeDescription
qconditionalstringGoogle Search query, up to 4,000 characters.Up to 4,000 characters.Required unless ludocid or kgmid is supplied.
ludocidconditionalstringGoogle local CID used to search for one entity.Up to 128 characters.
kgmidconditionalstringGoogle Knowledge Graph machine ID, such as /m/0k8z.Up to 512 characters.

Geographic location

ParameterTypeDescription
locationstringHuman-readable city-level location encoded to UULE by serpfast.Up to 512 characters.Conflicts with uule and lat/lon.
uulestringPre-encoded Google location value.Up to 2,048 characters.Conflicts with location and lat/lon.
latnumberLatitude from -90 through 90.Range: -90 to 90.Requires lon and conflicts with location and uule.
lonnumberLongitude from -180 through 180.Range: -180 to 180.Requires lat and conflicts with location and uule.
radiusnumberDecimal search-bias radius in meters.Range: 1 to 1000.Requires location or lat/lon.Desktop: 1–199; tablet/mobile: 1–1,000.

Knowledge Graph and layout controls

ParameterTypeDescription
lsigstringOpaque Knowledge Graph or local-pack signature.Up to 4,096 characters.
sistringOpaque cached Google search context.Up to 4,096 characters.
ibpstringGoogle layout or expansion control.Up to 4,096 characters.
udsstringOpaque Google filter token.Up to 4,096 characters.
color_scheme"light" | "dark"Google result color presentation.

Localization, filtering, and pagination

ParameterTypeDescription
google_domainstringResults use google.com. Use gl, hl, cr, lr or geography for localization.Default: google.com.
glstringLowercase two-letter country localization code.
hlstringGoogle interface and result language code.Default: en.
crstringOne or more countryXX restrictions joined with |.
lrstringOne or more lang_xx restrictions joined with |.
tbsstringGoogle native date or search filter string.Up to 4,096 characters.
safe"active" | "off"Google adult-content filtering.
nfpr"0" | "1"Google auto-correction control.
filter"0" | "1"Google similar-result filtering control.
pws"0" | "1"Google personalization control; 0 asks for non-personalized results.
peek_pws"0" | "1"Google personalization peek flag, forwarded unchanged.
tbm"lcl" | "vid" | "nws" | "shop" | "pts"Google vertical: lcl, vid, nws, shop, or pts. For image searches, use /api/google/images.
startintegerNon-negative Google result offset.Default: 0.Minimum: 0.
device"desktop" | "tablet" | "mobile"Request device profile and radius bound.Default: desktop.

Advanced query parameters

ParameterTypeDescription
numintegerBest-effort first-page result count, 1 to 10.Range: 1 to 10.
as_dt"i" | "e"Includes or excludes as_sitesearch.Requires as_sitesearch.
as_epqstringExact phrase query.Up to 2,048 characters.
as_eqstringExcluded phrase query.Up to 2,048 characters.
as_lqstringRequire results that link to this URL.Up to 4,096 characters.
as_nlointegerInclusive range lower bound.Minimum: 0.Requires as_nhi.
as_nhiintegerInclusive range upper bound.Minimum: 0.Requires as_nlo.
as_oqstringAny-of search terms.Up to 2,048 characters.
as_qstringAdditional all-of search terms.Up to 2,048 characters.
as_qdrstringQuick range d, w, m, or y with an optional positive count.
as_rqstringFind pages related to this URL.Up to 4,096 characters.
as_sitesearchstringSite hostname to include or exclude.Up to 253 characters.

Request context

Optional Google request context tokens. Omit them for a normal search.

ParameterTypeDescription
oqstringOriginal query associated with an autocomplete selection.Up to 2,048 characters.
gs_lpstringGoogle gs_lp value associated with an autocomplete selection.Up to 4,096 characters.
sclientstringGoogle client identifier such as gws-wiz-serp.Up to 64 characters.

Response

A JSON object with search_metadata (request id, credits used and remaining) and the result groups the page returns. Groups and fields depend on the content of each page, so treat every field as optional.

Examples

cURL
curl "https://serpfast.com/api/v1/google/ai-overview?q=why+is+the+sky+blue" \
  -H "Authorization: Bearer $SERPFAST_KEY"
Node.js 18+
const params = new URLSearchParams({
  "q": "why is the sky blue"
});
const res = await fetch(`https://serpfast.com/api/v1/google/ai-overview?${params}`, {
  headers: { Authorization: `Bearer ${process.env.SERPFAST_KEY}` },
});
const data = await res.json();
console.log(data);
Python
import os, requests

params = {
  "q": "why is the sky blue"
}
res = requests.get(
    "https://serpfast.com/api/v1/google/ai-overview",
    params=params,
    headers={"Authorization": f"Bearer {os.environ['SERPFAST_KEY']}"},
    timeout=120,
)
print(res.json())