Skip to main content
Reference material for Web Search: request parameters, response body, error handling, common gotchas, and the API summary. For walk-through examples, see Web Search and Examples. For result shapes and field presence by source, see Sources.

Request parameter reference


Response fields reference

Timestamps: Search timestamp is in milliseconds. Fetch timestamp is in seconds. Divide Search timestamps by 1000 when comparing across endpoints.

Error handling

Search returns 400 for invalid requests and 401 for auth failures.

Common gotchas


API reference summary

See the full API reference for the complete OpenAPI schema.

Sources

Web Search supports seven source types. Each returns a different result shape — always specify sources explicitly when you need predictable parsing.

Result shapes by source

The results[] array shape depends on the source field of each result. Use this reference when parsing multi-source responses.
Standard web and news results share the same shape.

Result ordering and ranking

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.total_results is the total count across all requested sources and pages.

Parsing multi-source responses

When you query multiple sources at once (or omit sources), the results[] array can contain items with different shapes. Always check the source field of each result to determine which fields are available:

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 total_results, failed_pages, and empty_pages. 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.
Standard fields — present in web, news, social, and scholar-articles / scholar-articles-enriched: Academic article fieldsscholar-articles and scholar-articles-enriched only: Academic author fieldsscholar-author only: Deep research mode fieldsai only: