> ## 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 Places results API (GOOGLE_PLACES)

> Get up to 100 places from Google's Places list for a local search, searched from the city you choose.

`GOOGLE_PLACES` returns the places Google lists in its Places tab for a search, the list that opens from "More places" under a local pack. It reads up to five pages of 20 places and searches every page from the same city, so you get up to 100 places in the order Google ranks them there. Use it to track a business's rank across a city's full local list, or to collect the businesses Google shows for a service in a city.

| | |
| - | - |
| `taskType` | `GOOGLE_PLACES` |
| Input | `query` (required); `city` or `uule`, `limit`, `country` |
| Credits | 1 per Places page read. A page holds 20 places. |
| Country | Defaults to `US`. Any ISO 3166-1 alpha-2 code. |
| Location | Set with `city` or `uule`. See [Regions and location](https://docs.querying.ai/engines/capacity.md). |

## Request

This request asks for the first 100 places Google lists for long-term care in Manville, Rhode Island:

```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_PLACES", "payload": { "query": "long term care near me", "city": "Manville, Rhode Island, United States", "limit": 100 } }'
```

If your system already stores Google's `uule` for each place, send it in place of `city`. This value is Reno, Nevada:

```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_PLACES", "payload": { "query": "Reno attorney", "uule": "w+CAIQICIbUmVubywgTmV2YWRhLCBVbml0ZWQgU3RhdGVz", "limit": 100 } }'
```

The task runs asynchronously. Read the result as described in [Async tasks](https://docs.querying.ai/concepts/async-tasks.md). A task with `limit: 100` usually completes in a minute or two.

## Parameters

| Field | Required | Description |
| - | - | - |
| `query` | Yes | The search, 1-100,000 characters. `prompt` is accepted when `query` is absent. |
| `city` | No | The place to search from, named the way Google names places: city, state or region, and country, such as `"Reno, Nevada, United States"`. Up to 100 characters. The result echoes it as `city`. |
| `uule` | No | Google's own location parameter in its `w+` form, as rank trackers store it, sent to Google unchanged. Send `city` or `uule`. The result echoes it as `uule`. |
| `limit` | No | How many places to return, an integer from 1 to 100. Defaults to `20`, one page. Send `100` for the full list. |
| `country` | No | The Google market to search. Defaults to `US`. |

Without `city` or `uule`, Google picks the place to search from.

## Response

For example, the Manville request above:

```json theme={"theme":"css-variables"}
{
  "places": [
    {
      "position": 1,
      "page": 1,
      "name": "...",
      "placeId": "...",
      "location": { "address": "...", "...": "..." },
      "mapsUrl": "https://maps.google.com/?cid=...",
      "reviews": [{ "...": "..." }],
      "category": "..."
    },
    { "position": 21, "page": 2, "...": "..." }
  ],
  "pages": 5,
  "city": "Manville, Rhode Island, United States"
}
```

| Field | Description |
| - | - |
| `places` | Always present, in Google's order. Each place has the fields of a local pack place in [Google Search](https://docs.querying.ai/engines/google-serp.md)'s `map`: `name`, `placeId`, `location` (`address`, `latitude`, `longitude`), `phoneNumber`, `url`, `mapsUrl`, `reviews`, `category`, `price`, `snippet` and `image`, as Google shows them. |
| `places[].position` | The place's rank in the whole list, from 1. It continues across pages. |
| `places[].page` | The Places page the place came from, 1 to 5. |
| `pages` | How many Places pages were read. The task is charged for these. |
| `googleLocation` | The place Google shows it searched from, returned only when its page names one. |
| `city` | The `city` you sent, when you sent one. |
| `uule` | The `uule` you sent, when you sent one. |

A place that a later page lists again is counted once. When Google's list ends before `limit`, `places` holds every place Google listed; a small town often has fewer than 100. Fields Google does not show for a place are omitted. Treat every field except `name`, `position` and `page` as optional.

## Credits

Each Places page read costs 1 credit. At submit, the task holds the credits for the pages `limit` needs, one page per 20 places: 1 for the default, 5 for `limit: 100`. On completion it is charged for the pages it read, so a list Google ends after three pages costs 3. A failed task costs 0. See [Credits and limits](https://docs.querying.ai/concepts/credits-and-limits.md).

## Limits and errors

* An empty `places` in a completed task means Google listed no places for the search from that location. It is confirmed on a second browser before it is returned, and costs 1 credit.
* `limit` outside 1-100, a `city` that is empty or longer than 100 characters, or `city` sent together with `uule` or `location` returns `422 VALIDATION_ERROR`.
* A `uule` that is not a `w+` UULE returns `400 VALIDATION_ERROR`.
* `location` returns `422`. Set the place with `city` or `uule`.
* `include.rawResponse` has no effect, and `include.html` and `include.analysis` return `422`. See [Markdown and raw responses](https://docs.querying.ai/engines/response-options.md).
* Other request errors are listed in [Errors](https://docs.querying.ai/concepts/errors.md).

## Related

* [Google Search](https://docs.querying.ai/engines/google-serp.md) for one results page with its local pack
* [Regions and location](https://docs.querying.ai/engines/capacity.md)
* [Credits and limits](https://docs.querying.ai/concepts/credits-and-limits.md)


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