> ## Documentation Index
> Fetch the complete documentation index at: https://getanyapi.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Search

> Sell google.search on AnyAPI: the request your endpoint receives, the response it must return, and what the live trial grades.

Run a Google web search and get the organic results (title, link, snippet, position) as clean JSON. Returns about 10 results per call - Google stopped honoring bulk result counts in September 2025, so a limit above 10 is accepted but returns no more than a page. Send page 2, 3, ... to walk further, or use google.search\_100 for up to 100 ranked results in one call, which is cheaper past roughly 20 results.

This page is the seller-facing summary of one catalog API, `google.search`. The transport rules that apply to every API a seller serves - signed requests, the response envelope, timeouts, and body limits - are on [the operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md).

## The price you compete with

AnyAPI publishes this API from **\$0.50 per 1,000 requests**. That is the price a buyer sees today, so it is the price your endpoint has to come in under to win traffic.

## The request your endpoint receives

| Field | Type | Required | What it means |
| - | - | - | - |
| `autocorrect` | boolean | no | Toggle Google spelling autocorrect (default true). Set false to search the exact query without correction. |
| `cursor` | string | no | Deprecated: send page instead. A continuation token from an earlier response's nextCursor is still accepted and still continues on the source that issued it; page is ignored when cursor is sent alongside it. |
| `gl` | string | no | Two-letter country code for result localization (e.g. us, gb, de). Default `"us"`. |
| `hl` | string | no | Two-letter interface and results language code (e.g. en, es, de). Default `"en"`. |
| `limit` | integer | no | Page size to ask for. Google returns about 10 organic results per page and stopped honoring larger counts in September 2025, so a limit above 10 still returns about 10. Some sources return their whole page of about 10 whatever limit says: a page is never trimmed after the call, so nextCursor always continues exactly where this response ended. To go deeper, send page (about 10 results per page, each billed as a request) or use google.search\_100, which returns up to 100 ranked results in a single call for one flat charge and is cheaper past roughly 20 results. Price is flat per request. Default `10`. |
| `location` | string | no | Fine-grained location to localize results to, more specific than the country-level gl. Send it as an Active Canonical Name from Google's geo-target list: place, then each parent region, then country, with no space after each comma, e.g. 'New York,New York,United States', 'Austin,Texas,United States', 'London,England,United Kingdom'. Common variations are translated to that name when they point to exactly one place: spaces after commas, missing accents, a US state abbreviation ('Orlando, FL, United States'), or a skipped region ('Sydney, Australia'). A value that names no place, or more than one, is rejected rather than quietly searched from somewhere else. |
| `page` | integer | no | Which page of about 10 organic results to return, starting at 1. Send page 2, 3, ... to walk deeper; each page is billed as one request and any source can serve any page. Replaces cursor. Default `1`. |
| `query` | string | yes | The Google search query. |
| `requireCursor` | boolean | no | Deprecated. Every source for this search returns a nextCursor, so this changes nothing about the price or which source serves you; it stays accepted so callers that already send it keep working. |
| `timeframe` | string | no | Restrict results to a recent time window: 1h, 1d, 7d, 1y, or all. Default all (no time restriction). One of: `1h`, `1d`, `7d`, `1y`, `all`. |

> **Full input JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/google.search.input.json",
>   "example": {
>     "query": "best coffee maker",
>     "gl": "us",
>     "hl": "en",
>     "limit": 10
>   },
>   "title": "Google search input",
>   "type": "object",
>   "additionalProperties": false,
>   "x-anyapi-input-normalizers": {
>     "location": "google_geo_target"
>   },
>   "x-aliases": {
>     "q": "query",
>     "num": "limit"
>   },
>   "required": [
>     "query"
>   ],
>   "properties": {
>     "query": {
>       "type": "string",
>       "description": "The Google search query."
>     },
>     "limit": {
>       "type": "integer",
>       "minimum": 1,
>       "maximum": 100,
>       "default": 10,
>       "description": "Page size to ask for. Google returns about 10 organic results per page and stopped honoring larger counts in September 2025, so a limit above 10 still returns about 10. Some sources return their whole page of about 10 whatever limit says: a page is never trimmed after the call, so nextCursor always continues exactly where this response ended. To go deeper, send page (about 10 results per page, each billed as a request) or use google.search_100, which returns up to 100 ranked results in a single call for one flat charge and is cheaper past roughly 20 results. Price is flat per request."
>     },
>     "page": {
>       "type": "integer",
>       "minimum": 1,
>       "default": 1,
>       "description": "Which page of about 10 organic results to return, starting at 1. Send page 2, 3, ... to walk deeper; each page is billed as one request and any source can serve any page. Replaces cursor."
>     },
>     "requireCursor": {
>       "type": "boolean",
>       "deprecated": true,
>       "description": "Deprecated. Every source for this search returns a nextCursor, so this changes nothing about the price or which source serves you; it stays accepted so callers that already send it keep working."
>     },
>     "cursor": {
>       "type": "string",
>       "minLength": 1,
>       "description": "Deprecated: send page instead. A continuation token from an earlier response's nextCursor is still accepted and still continues on the source that issued it; page is ignored when cursor is sent alongside it.",
>       "deprecated": true
>     },
>     "gl": {
>       "type": "string",
>       "default": "us",
>       "description": "Two-letter country code for result localization (e.g. us, gb, de)."
>     },
>     "hl": {
>       "type": "string",
>       "default": "en",
>       "description": "Two-letter interface and results language code (e.g. en, es, de)."
>     },
>     "location": {
>       "type": "string",
>       "description": "Fine-grained location to localize results to, more specific than the country-level gl. Send it as an Active Canonical Name from Google's geo-target list: place, then each parent region, then country, with no space after each comma, e.g. 'New York,New York,United States', 'Austin,Texas,United States', 'London,England,United Kingdom'. Common variations are translated to that name when they point to exactly one place: spaces after commas, missing accents, a US state abbreviation ('Orlando, FL, United States'), or a skipped region ('Sydney, Australia'). A value that names no place, or more than one, is rejected rather than quietly searched from somewhere else."
>     },
>     "timeframe": {
>       "type": "string",
>       "enum": [
>         "1h",
>         "1d",
>         "7d",
>         "1y",
>         "all"
>       ],
>       "description": "Restrict results to a recent time window: 1h, 1d, 7d, 1y, or all. Default all (no time restriction)."
>     },
>     "autocorrect": {
>       "type": "boolean",
>       "description": "Toggle Google spelling autocorrect (default true). Set false to search the exact query without correction."
>     }
>   }
> }
> ```

## The response your endpoint must return

| Field | Type | Always present | What it means |
| - | - | - | - |
| `data` | null or object | yes | |
| `data.nextCursor` | string or null | no | Opaque cursor for the next page of results, or null when this lane has no more. Pass it back as cursor to continue. |
| `data.query` | string | yes | |
| `data.results` | array | yes | |
| `data.results[].link` | string | yes | |
| `data.results[].position` | integer | yes | |
| `data.results[].snippet` | string | yes | |
| `data.results[].title` | string | yes | |
| `found` | boolean | yes | |

Extra fields are kept, missing declared fields fail.

> **Full output JSON Schema**
>
> ```json theme={"dark"}
> {
>   "$schema": "https://json-schema.org/draft/2020-12/schema",
>   "$id": "https://getanyapi.com/schemas/google.search.output.json",
>   "title": "Google search output",
>   "type": "object",
>   "additionalProperties": false,
>   "required": [
>     "found",
>     "data"
>   ],
>   "properties": {
>     "found": {
>       "type": "boolean"
>     },
>     "data": {
>       "oneOf": [
>         {
>           "type": "null"
>         },
>         {
>           "type": "object",
>           "additionalProperties": false,
>           "required": [
>             "query",
>             "results"
>           ],
>           "properties": {
>             "query": {
>               "type": "string"
>             },
>             "nextCursor": {
>               "type": [
>                 "string",
>                 "null"
>               ],
>               "description": "Opaque cursor for the next page of results, or null when this lane has no more. Pass it back as cursor to continue."
>             },
>             "results": {
>               "x-anyapi-must-populate": true,
>               "type": "array",
>               "items": {
>                 "type": "object",
>                 "required": [
>                   "title",
>                   "link",
>                   "snippet",
>                   "position"
>                 ],
>                 "properties": {
>                   "title": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "link": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "snippet": {
>                     "x-anyapi-must-populate": true,
>                     "type": "string"
>                   },
>                   "position": {
>                     "type": "integer"
>                   }
>                 }
>               }
>             }
>           }
>         }
>       ]
>     }
>   }
> }
> ```

## Fields that must never come back empty

* `link`
* `results`
* `snippet`
* `title`

The repository marks these fields as ones every source must be able to fill. An empty value is only correct when the entity itself genuinely has nothing there.

## Not found, and how it differs from empty

When the entity does not exist, answer 2xx with the not-found shape:

```json theme={"dark"}
{
  "found": false,
  "data": null
}
```

An empty list is not a not-found: when the entity exists and has nothing to return, answer 2xx with `found: true` and an empty `results` array.

This output schema declares no `reason` field, so `found: false` is the whole not-found answer.

## Example request

```json theme={"dark"}
{
  "query": "best coffee maker",
  "gl": "us",
  "hl": "en",
  "limit": 10
}
```

The compatibility checks fire the schema's example at your endpoint. After that, your answers are graded against what the currently serving source returned for the same real customer inputs.

## Next

* [The operator endpoint contract](https://getanyapi.com/docs/sell/operator-endpoint-contract.md) for signing, budgets, and the live trial.
* [Every API open to sellers](https://getanyapi.com/docs/sell/apis/index.md).
* Want to sell an API that is not on that list? Email [support@getanyapi.com](mailto:support@getanyapi.com).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.