# Google Places

`POST https://api.serpkite.com/v1/places` · Credits: 1 per page

Local results for a search: the same Google Maps places and fields as /v1/maps, including address, coordinates, rating, category, hours, phone and place IDs.

Local results for a search: the same Google Maps search results as [/v1/maps](https://serpkite.com/docs/endpoints/maps), with the same fields and the same `ll` / `location` rules. Without `location` or `ll`, Google picks the area from the query or from where the request comes from.

## Request body

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| `q` **required** | string |  | The search query. Required. Up to 2,048 characters. |
| `country` | string | `us` | Country to search from, as a two-letter ISO code (us, gb, de, in…). Defaults to the country a location ends in. |
| `language` | string | `en` | Interface language, as a language code with an optional region (en, de, pt-BR, zh-TW…). |
| `location` | string |  | Canonical location for local results, e.g. "Austin, Texas, United States". Ending in a country name also sets country. |
| `uule` | string |  | Google-encoded location string. Use instead of location if you already have it. |
| `ll` | string |  | Maps and places: search the map at a point and zoom, as "@lat,lng,zoomz", e.g. "@52.52,13.40,14z" (zoom defaults to 14z), wherever the request comes from. Overrides location. |
| `page` | integer | `1` | Results page, 1–10. Each page is billed separately. |
| `engine` | string or array | `google` | Which search providers may answer. google is Google only (SerpKite still retries Google internally); auto falls back to other providers when Google is blocked or times out; consensus (search only) asks several independent indexes in parallel, merges the results by URL, ranks them by agreement and lists each result's sources, at the sum of one page per provider that returned results; a provider name or a list (e.g. google,brave) restricts the request to those. meta.engine names the provider that answered. One of: `google`, `auto`, `consensus`, `brave`, `bing`, `yahoo`, `duckduckgo`, `mojeek`, `wikipedia`, `yandex`. |
| `format` | string | `json` | Response format. markdown is LLM-ready prose; compact is JSON with only the fields agents need. One of: `json`, `compact`, `markdown`. |
| `fields` | string |  | Comma-separated projection, e.g. results.title,results.link,knowledge_graph. Cuts tokens. |
| `max_age` | integer |  | Accept a cached result up to this many seconds old. Cache hits cost 50% of the credits. |

## Example request

cURL:

```bash
curl https://api.serpkite.com/v1/places \
  -H "Authorization: Bearer $SERPKITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"dentist","location":"Austin, Texas, United States"}'
```

TypeScript:

```ts
import { SerpKite } from "serpkite";

const sk = new SerpKite(); // reads SERPKITE_API_KEY
const res = await sk.places({ q: "dentist", location: "Austin, Texas, United States" });
console.log(res.results[0].title, res.meta.credits_used);
```

Python:

```python
from serpkite import SerpKite

sk = SerpKite()  # reads SERPKITE_API_KEY
res = sk.places("dentist", location="Austin, Texas, United States")
print(res.results[0].title, res.meta.credits_used)
```

## Response fields

| Field | Type | Description |
| --- | --- | --- |
| `request` | object | The normalised request, with defaults filled in: `endpoint`, `engine`, `q`, `country`, `language`, `location`, `num`, `page`, `device`, `autocorrect`… |
| `results[]` | array | Same shape as [/v1/maps](https://serpkite.com/docs/endpoints/maps): `title`, `address`, `latitude`, `longitude`, `rating`, `rating_count`, `type`, `types[]`, `phone_number`, `website`, `opening_hours`, `weekly_hours`, `place_id`, `cid`, `fid`… |
| `meta` | object | `request_id`, `credits_used`, `cached`, `cached_at`, `engine` (the provider that answered), `route` (provider attempts, see [Search providers](https://serpkite.com/docs/providers)), `latency_ms`, `parse_quality` (`ok`, `partial`, `empty`), `resolved_urls`, `unresolved_links` (results whose `link` is still a Google redirect); `llm` (`provider`, `model`, `input_tokens`, `output_tokens`) and `warnings` when an AI step ran or failed. |

## Example response

```json
{
  "request": {
    "endpoint": "places",
    "engine": "google",
    "q": "dentist",
    "location": "Austin, Texas, United States",
    "language": "en"
  },
  "results": [
    {
      "position": 1,
      "title": "Example Family Dental",
      "address": "100 Example St, Austin, TX 78701",
      "latitude": 30.2711,
      "longitude": -97.7437,
      "rating": 4.9,
      "rating_count": 356,
      "type": "Dentist",
      "types": [
        "Dentist",
        "Cosmetic dentist"
      ],
      "phone_number": "(512) 555-0100",
      "international_phone_number": "+1 512-555-0100",
      "website": "https://dental.example.com",
      "country": "US",
      "timezone": "America/Chicago",
      "place_id": "ChIJexample1111111111111",
      "cid": "9876543210987654321"
    }
  ],
  "meta": {
    "request_id": "req_01J8ZK4M6Q2V7",
    "credits_used": 1,
    "cached": false,
    "engine": "google",
    "latency_ms": 1034,
    "parse_quality": "ok",
    "resolved_urls": true
  }
}
```

## Errors

| Status | Code | Meaning |
| --- | --- | --- |
| 400 | `invalid_request` | A parameter is missing or invalid. |
| 401 | `unauthorized` | The API key is missing, invalid or revoked. |
| 402 | `insufficient_credits` | Your balance is too low. Buy a pack or wait for the monthly free grant. |
| 429 | `rate_limited` | Too many requests per second for your plan. Retry after the Retry-After header. |
| 503 | `upstream_error` | Google could not be fetched or parsed. Not billed; retry after Retry-After. |

All errors: https://serpkite.com/docs/errors

## Related

- [Maps](https://serpkite.com/docs/endpoints/maps)
- [Place details](https://serpkite.com/docs/endpoints/place)
- [Localization](https://serpkite.com/docs/localization)