Skip to main content
The Google REST API gives you programmatic access to a cloud-based platform built for searching, organizing, and acting on information at scale. Every interaction follows standard REST conventions: you send HTTP requests to well-defined endpoints, and the API responds with structured JSON. Whether you are building a lightweight integration or a production-grade data pipeline, understanding the foundational conventions below — base URL, versioning, request and response formats, rate limits, pagination, and error handling — will help you build confidently and avoid common pitfalls from the start.

Base URL

All API requests are made to the following base URL:
Every endpoint path you encounter in this documentation is relative to this base URL. For example, the search endpoint is reached at https://api.google.com/v1/search. You should store this base URL in a configuration variable in your application so you can update it in one place if needed.
Always use HTTPS when making requests. Plain HTTP requests will be rejected to protect your data and credentials in transit.

Versioning

The current stable version of the API is v1, which is reflected directly in the URL path. This explicit versioning strategy ensures that breaking changes to the API never affect your integration without advance notice. When a new major version is released, the older version enters a deprecation period. During this window, you will receive email notifications at the address associated with your account, along with a deprecation timeline and a migration guide. You can continue using v1 endpoints until the version is formally retired.
Minor, backwards-compatible changes — such as new optional fields or additional endpoints — may be introduced to the current version at any time without a version bump. Subscribe to the changelog to stay informed.

Request Format

All request bodies must be sent as valid JSON with the Content-Type header set to application/json. Requests that omit this header or submit malformed JSON will receive a 400 Bad Request response.
Query parameters should be URL-encoded when passed in the request URL. For GET requests, no request body is required or expected.

Response Format

Every response from the API is returned as JSON and wrapped in a consistent envelope structure. The data field contains the resource or collection you requested, while the meta field includes contextual metadata about the request itself — useful for logging, tracing, and debugging.
The request_id field within meta uniquely identifies each API call. You should log this value alongside your own application logs so you can correlate activity and reference it when contacting support.

Rate Limits

The API enforces rate limits to ensure fair usage and platform stability across all customers. Limits are applied per API key and vary by subscription plan. When you exceed your rate limit, the API returns a 429 Too Many Requests response. The response will include a Retry-After header indicating the number of seconds you should wait before retrying the request.
Retrying immediately after a 429 without honoring the Retry-After header will continue to result in rejected requests and may temporarily increase your backoff window. Always implement exponential backoff in your retry logic.

Pagination

Endpoints that return collections of resources support cursor-free, offset-based pagination via two query parameters: Paginated responses include additional fields alongside data to help you navigate the full result set:
Use total to display result counts in your UI, and pages to know when you have reached the last page. If page exceeds pages, the API returns an empty data array rather than an error.

Error Handling

When a request cannot be completed successfully, the API returns a structured error object instead of a data payload. The code field provides a machine-readable identifier you can use in your application logic, while message provides a human-readable explanation. The request_id ties the error back to the specific API call.
The table below summarizes the HTTP status codes you may encounter and what each one means in the context of this API:
When contacting support about an unexpected API error, always include the value of the X-Request-Id response header (or the request_id from the response body) in your message. This identifier allows the support team to locate the exact request in server logs and dramatically speeds up diagnosis.