sources explicitly when you need predictable parsing.
Every request goes to the same endpoint:
Parameters
Request fields and defaults
Result shapes
Per-source field tables with Tabs
Field matrix
Which fields exist for each source
Request body
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | Yes | — | Search query text. Max 5,000 characters. Supports search operators like site: and filetype:. |
geolocation | string | No | — | ISO 3166-1 alpha-2 country code for region-specific results (e.g., "US", "GB", "JP"). |
sources | string[] | No | — | Sources to query: web, news, scholar-articles, scholar-articles-enriched, scholar-author, ai, social. Current platform behavior: omitting this field searches all sources. |
site | string | No | — | Restrict results to a domain (e.g., "linkedin.com/company", "github.com"). Max 500 characters. |
startDate | integer | No | — | Unix timestamp (seconds). Only results after this date. |
endDate | integer | No | — | Unix timestamp (seconds). Only results before this date. Must be > startDate. |
numPages | integer | No | 1 | Number of result pages to return. Minimum: 1. |
solveCloudflare | boolean | No | false | Current platform behavior: Attempt to bypass Cloudflare protection when fetching result page content. Affects content retrieval, not search discovery itself. Not guaranteed to succeed. |
Source capabilities
Current platform behavior — not guaranteed by the OpenAPI contract.
Parameter applicability varies by source. This table reflects observed behavior.
| Source | Best use case | Fetchable url? | site effective? | Date filters effective? |
|---|---|---|---|---|
web | General web search | Yes | Yes | Yes |
news | News articles | Yes | Yes | Yes |
scholar-articles | Academic papers | Yes | No | Yes |
scholar-articles-enriched | Papers + author profiles | Yes | No | Yes |
scholar-author | Researcher profiles | No | No | No |
ai | AI-generated summaries | No | No | No |
social | Social media mentions | Yes | No | No |
Response body
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the search executed successfully. |
query | string | The query as interpreted by the API (includes site: prefix if site was set). |
timestamp | integer | Unix timestamp in milliseconds when the search was performed. |
results | array | Search results. Shape varies by source — see Result shapes by source. |
metadata.totalResults | integer | Total number of results available across all pages (may exceed the number in the results array if you requested fewer pages). |
metadata.failedPages | array | Page numbers that failed to return results. |
metadata.emptyPages | array | Page numbers that returned no results. |
Timestamps: Search
timestamp is in milliseconds. Fetch timestamp is in seconds. Divide Search timestamps by 1000 when comparing across endpoints.Your first search
The simplest search uses aquery with an explicit sources array. Always specify sources for predictable result parsing.
Response trimmed for clarity.
results[] contains source, title, url, snippet, and position. Use position for ranking and url for follow-up fetching.
Restrict results to a specific site
Use thesite parameter to limit results to a single domain. Useful for finding company pages on LinkedIn, profiles on GitHub, or content on a specific website.
Search with date filtering
UsestartDate and endDate (Unix timestamps in seconds) to limit results to a specific time range.
Result shapes by source
Theresults[] array shape depends on the source field of each result. Use this reference when parsing multi-source responses.
- web / news
- scholar-articles
- ai
Standard web and news results share the same shape.
| Field | Type | Description |
|---|---|---|
source | string | "web" or "news". |
title | string | Page title. |
url | string | Page URL. |
snippet | string | Text excerpt. |
position | integer | Result position (1-based). |
Result ordering and ranking
Current platform behavior: When querying a single source,
position reflects
the source’s natural ranking order. When querying multiple sources, results from
different sources are interleaved and position may reflect a per-source rank rather
than a global rank. metadata.totalResults is the total count across all requested
sources and pages.Parsing multi-source responses
When you query multiple sources at once (or omitsources), the results[] array can contain items with different shapes. Always check the source field of each result to determine which fields are available:
Multi-page search
UsenumPages to request multiple pages of results. The metadata object tells you which pages succeeded.
Response trimmed for clarity. Pages 1 succeeded, page 2 failed, page 3 was empty.
results[] array. Check metadata to understand page-level outcomes:
metadata.totalResults— total results available across all sources and pages.metadata.failedPages— page numbers that returned errors. Retry these individually withnumPages: 1and appropriate offset logic.metadata.emptyPages— page numbers that returned no results. You have reached the end of available results — do not retry.
Current platform behavior (not guaranteed by the OpenAPI contract): Each page returns approximately 10 results.
If
metadata.emptyPages contains page numbers, you have reached the end of
available results.Field presence by source
Use this reference to determine which fields are present for each source type.Naming note: The API uses
metadata in two different contexts.
The response-level metadata is an object with totalResults, failedPages, and emptyPages.
The per-result metadata field (scholar-articles only) is a citation string like "Author - Year - Publisher".
Always use the full path (response.metadata vs result.metadata) to avoid confusion.web, news, social, and scholar-articles / scholar-articles-enriched:
| Field | Sources with this field | Notes |
|---|---|---|
source | All sources | Always present |
title | web, news, social, scholar-articles*, ai | AI: always "AI Overview" |
url | web, news, social, scholar-articles*, scholar-author | Scholar-author: profile link |
snippet | web, news, social, scholar-articles* | Absent in ai, scholar-author |
position | web, news, social, scholar-articles* | Absent in ai, scholar-author |
scholar-articles and scholar-articles-enriched only:
| Field | Type | Notes |
|---|---|---|
metadata | string | Citation string: "Author - Year - Publisher" |
pdf_url | string? | Direct PDF download link — handle outside Web Fetch |
authors | array | [{ name, profile_url, profile_id }] |
citations | integer | Total citation count |
scholar-author only:
| Field | Type | Notes |
|---|---|---|
name | string | Author full name |
affiliation | string | Institutional affiliation |
website | string? | Personal or institutional website |
interests | array | [{ title, link }] |
thumbnail | string? | Profile photo URL |
citations | object | { all, since_2020 } — different type than scholar-articles |
h_index | object | { all, since_2020 } |
i10_index | object | { all, since_2020 } |
articles | array | [{ title, url, year, citations, authors, publication }] |
ai only:
| Field | Type | Notes |
|---|---|---|
content | string | AI-generated overview text |
references | array | [{ title, url, snippet }] — fetch these URLs |
images | array | [{ url, alt, width, height }] |
Error handling
Search returns400 for invalid requests and 401 for auth failures.
Common gotchas
| Mistake | Fix |
|---|---|
Omitting sources and expecting uniform results | Different sources return different fields. Specify sources explicitly for predictable parsing. |
Using site with scholar-author or ai sources | site only applies to web and news sources. It has no effect on Scholar or AI searches. |
Expecting snippet in AI mode results | AI mode returns content and references instead of snippet and position. |
Expecting position in scholar-author results | Scholar author results don’t have position — they have name, affiliation, citations, etc. |
Using startDate >= endDate | startDate must be strictly less than endDate. |
Next steps
- Web Fetch — fetch the HTML content of URLs returned by search results.
- Web API Examples — ready-to-copy patterns for common workflows.

