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

# Google Search results API (GOOGLE_SERP)

> Get one page of google.com organic results, ads and SERP panels for a query, without waiting for an AI Overview.

`GOOGLE_SERP` loads one google.com results page and returns its organic results and panels. It does not wait for an AI Overview, so it answers faster than [`GOOGLE`](/engines/google-ai-overviews) and costs less. Use it for rank tracking, or to find pages to read with [`WEB_SCRAPE`](/engines/web-scrape).

| | |
| - | - |
| `taskType` | `GOOGLE_SERP` |
| Input | `query` (required); `page`, `country`, `location`, `include` |
| Credits | 1 per task |
| Country | Defaults to `US`. Any ISO 3166-1 alpha-2 code. |
| Location | Supported. See [Regions and location](/engines/capacity.md). |

## Request

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "GOOGLE_SERP", "payload": { "query": "best running shoes for flat feet", "country": "US", "page": 2 } }'
```

The task runs asynchronously. Read the result as described in [Async tasks](/concepts/async-tasks.md).

## Parameters

| Field | Required | Description |
| - | - | - |
| `query` | Yes | The search query, 1-100,000 characters. `prompt` is accepted when `query` is absent. |
| `page` | No | Results page, an integer from 1 to 10. Defaults to `1`. Each page holds ten organic results. Other values return `422 VALIDATION_ERROR`. |
| `country` | No | The Google market to search. Defaults to `US`. |
| `location` | No | `{ "latitude", "longitude" }` in decimal degrees. Google answers as a user standing at that point, and the result echoes it as `location`. |
| `include.rawResponse` | No | `true` adds the results page HTML as `rawContent`. The page is large, often near a megabyte. |

## Response

For example, page 2 of a query:

```json theme={"theme":"css-variables"}
{
  "organicResults": [
    { "position": 11, "title": "...", "link": "https://...", "displayedLink": "...", "snippet": "...", "page": 2 }
  ],
  "peopleAlsoAsk": [{ "...": "..." }],
  "relatedSearches": [{ "...": "..." }],
  "ads": [{ "...": "..." }],
  "page": 2
}
```

| Field | Description |
| - | - |
| `organicResults` | Always present. `position` counts across pages, so the first result on page 2 is `11`. Each row carries the `page` it came from. |
| `page` | The page that was loaded. |
| `peopleAlsoAsk`, `relatedSearches`, `knowledgeGraph` | Google's panels, when the page shows them. |
| `ads` | Top and bottom ads, when the page shows them. |
| `map` | The local pack: places with `name`, `position`, `placeId`, `location`, `mapsUrl`, `reviews` and more, when the page shows one. |
| `serp` | Other panels when present: `topStories`, `videoResults`, `localMap`, `discussionsAndForums`. |
| `location` | The point you sent, when you sent one. |
| `rawContent` | The results page HTML, with `include.rawResponse: true`. |

Panels the page does not show are omitted, not returned as `null` or `[]`. Treat every field except `organicResults` and `page` as optional. There is no `aioverview`, `text` or `sources`; use [`GOOGLE`](/engines/google-ai-overviews) for the AI Overview.

## Limits and errors

* An empty `organicResults` in a completed task means Google itself returned no results for the query. It is confirmed on a second browser before it is returned.
* `page` outside 1-10 returns `422 VALIDATION_ERROR`.
* A malformed `location` returns `400 VALIDATION_ERROR`.
* Other request errors are listed in [Errors](/concepts/errors.md).

## Related

* [Google AI Overviews](/engines/google-ai-overviews.md) for the same page with its AI Overview
* [Web scrape](/engines/web-scrape.md) to read a result's page as Markdown
* [Regions and location](/engines/capacity.md)


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