# FlashData Google Places API

Search for local businesses and places. Retrieve names, addresses, coordinates, ratings and contact details when available.

Canonical reference: https://flashdata.dev/docs/sources/google_places
Reviewed: 2026-10-23

Endpoint: POST https://data.flashdata.dev/v1/queries/realtime
Authentication: X-API-Key: YOUR_API_KEY
Modes: [Realtime](https://flashdata.dev/docs/reference/realtime-and-async/reference.md#realtime) · [Async](https://flashdata.dev/docs/reference/realtime-and-async/reference.md#async) · [Batch](https://flashdata.dev/docs/reference/batch-and-bulk/reference.md#batch)

Required source permission: google_places

Replace YOUR_API_KEY with an API key that has this source permission and available credits. Run requests on your server or agent host.

[Set up authentication](https://flashdata.dev/docs/guides/headers-and-authentication/reference.md)

[Choose and refine a Google search](https://flashdata.dev/docs/guides/google-search-guide/reference.md)

<a id="quickstart"></a>

## Send a request

### Python

```bash
python3 -m pip install requests
```

```python
import json

import requests

api_key = "YOUR_API_KEY"
payload = {
    "source": "google_places",
    "query": "coffee in san francisco",
    "params": {
        "gl": "us",
        "hl": "en",
        "num": 10,
        "page": 1,
    },
}

response = requests.post(
    "https://data.flashdata.dev/v1/queries/realtime",
    headers={"X-API-Key": api_key},
    json=payload,
    timeout=120,
)
response.raise_for_status()
print(json.dumps(response.json(), ensure_ascii=False, indent=2))
```

### Bash / cURL

```bash
api_key="YOUR_API_KEY"
curl --fail-with-body --max-time 120 --request POST "https://data.flashdata.dev/v1/queries/realtime" \
  --header "Content-Type: application/json" \
  --header "X-API-Key: $api_key" \
  --data-binary @- <<'FLASHDATA_JSON'
{
  "source": "google_places",
  "query": "coffee in san francisco",
  "params": {
    "gl": "us",
    "hl": "en",
    "num": 10,
    "page": 1
  }
}
FLASHDATA_JSON
```

<a id="parameters"></a>

## Parameters

<a id="parameters-group-0"></a>

### Request body

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <a id="parameter-source"></a> source | string | Yes | — | Set to google_places.  |
| <a id="parameter-query"></a> query | string | Yes | Not set | Search query. Supports Google search operators such as site: and intitle:. Min length: 1. Max length: 2000. |
| <a id="parameter-params"></a> params | object | No | {} | Settings for this request.  |
| <a id="parameter-callback_url"></a> callback_url | string · nullable | No | Not set | Async and batch only. Public HTTPS completion URL on port 443, up to 2,048 characters. No user credentials or URL fragment. Omit, use null or an empty string for no notification. In a batch, set this on each query, outside params.  |

<a id="parameters-group-1"></a>

### Country, language & location

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <a id="parameter-params-gl"></a> params.gl | string | No | Not set | Two-letter country code, such as us, gb, de or sg. Set explicitly to select a country. Min length: 2. Max length: 2. Pattern: ^[A-Za-z]{2}$ |
| <a id="parameter-params-hl"></a> params.hl | string | No | Not set | Google interface language. Set explicitly to select a language. Min length: 1. Max length: 35. Pattern: ^[A-Za-z0-9-]+$ |
| <a id="parameter-params-location"></a> params.location | string | No | Not set | Requested search location, preferably a city, such as "London, England, United Kingdom". Availability depends on the search type. Min length: 1. Max length: 200. |

<a id="parameters-group-2"></a>

### Pagination

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <a id="parameter-params-num"></a> params.num | integer | No | Not set | Requested result count. FlashData does not add a fixed default when omitted. The returned count can differ by query and search type. Minimum: 1. Maximum: 100. |
| <a id="parameter-params-page"></a> params.page | integer | No | Not set | Requested result page. Set explicitly. Each page is a separate API request. Minimum: 1. Maximum: 100. |

<a id="parameters-group-3"></a>

### Search filters

| Parameter | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| <a id="parameter-params-tbs"></a> params.tbs | string | No | Not set | Requested Google search filters, such as qdr:d for the past day or qdr:w for the past week. Availability depends on the search type. Min length: 1. Max length: 200. |
| <a id="parameter-params-autocorrect"></a> params.autocorrect | boolean | No | Not set | Request spelling correction with true or request it disabled with false. Applied behavior depends on the search type; omit to use Google's behavior.  |

<a id="response"></a>

## Read the result

Save the successful JSON response as response.json. Save this as read-response.py and run python read-response.py. It uses only Python's standard library and makes no new request.

### read-response.py

```python
import json
from pathlib import Path

response = json.loads(Path("response.json").read_text(encoding="utf-8-sig"))
if response.get("status") not in ("done", "completed") or not isinstance(response.get("results"), list):
    raise SystemExit("Expected completed result JSON; inspect the response or job status.")
if not response["results"]:
    print("[]")
    raise SystemExit(0)
result = response["results"][0]

output = [
    {name: item.get(name) for name in ("title", "address", "latitude", "longitude", "website")}
    for item in result.get("places", [])
]
print(json.dumps(output, ensure_ascii=False, indent=2))
```

## Sample response

Recorded example; fields and counts depend on the source and requested input.
```json
{
  "source": "google_places",
  "status": "done",
  "results": [
    {
      "searchParameters": {
        "q": "coffee in san francisco",
        "gl": "us",
        "hl": "en",
        "type": "places",
        "num": 10,
        "page": 1,
        "engine": "google"
      },
      "places": [
        {
          "position": 1,
          "title": "Kopê House",
          "address": "546 Laguna St",
          "latitude": 37.776222,
          "longitude": -122.42606,
          "rating": 4.9,
          "ratingCount": 76,
          "priceLevel": "$1–10",
          "category": "Cafe",
          "cid": "7430826673754830499"
        },
        {
          "position": 2,
          "title": "The Coffee Berry SF",
          "address": "1410 Lombard St",
          "latitude": 37.80141,
          "longitude": -122.424995,
          "rating": 4.9,
          "ratingCount": 642,
          "priceLevel": "$1–10",
          "category": "Coffee shop",
          "cid": "5181132708478222499"
        },
        {
          "position": 3,
          "title": "Sightglass Coffee",
          "address": "270 7th St",
          "latitude": 37.77704,
          "longitude": -122.40844,
          "rating": 4.4,
          "ratingCount": 3400,
          "priceLevel": "$10–20",
          "category": "Coffee shop",
          "cid": "13926460886861596347"
        },
        {
          "position": 4,
          "title": "Origin Lab Coffee & Matcha",
          "address": "211 Sutter St",
          "latitude": 37.789722,
          "longitude": -122.404175,
          "rating": 4.7,
          "ratingCount": 624,
          "priceLevel": "$1–10",
          "category": "Coffee shop",
          "cid": "9114931074474087601"
        },
        {
          "position": 5,
          "title": "The Coffee Movement",
          "address": "1737 Balboa St",
          "latitude": 37.7765,
          "longitude": -122.477806,
          "rating": 4.8,
          "ratingCount": 623,
          "priceLevel": "$1–10",
          "category": "Coffee shop",
          "cid": "2726196137705445702"
        },
        {
          "position": 6,
          "title": "Third Wheel Coffee",
          "address": "991 Oak St",
          "latitude": 37.77323,
          "longitude": -122.43559,
          "rating": 4.9,
          "ratingCount": 266,
          "priceLevel": "$1–10",
          "category": "Coffee shop",
          "cid": "1837357391573517555"
        },
        {
          "position": 7,
          "title": "Better Half Coffee",
          "address": "1448 Pacific Ave",
          "latitude": 37.79555,
          "longitude": -122.41909,
          "rating": 4.9,
          "ratingCount": 123,
          "priceLevel": "$10–20",
          "category": "Coffee shop",
          "cid": "11196405476986641272"
        },
        {
          "position": 8,
          "title": "Sextant Coffee Roasters",
          "address": "1415 Folsom St",
          "latitude": 37.772472,
          "longitude": -122.412964,
          "rating": 4.4,
          "ratingCount": 746,
          "priceLevel": "$1–10",
          "category": "Coffee shop",
          "cid": "16500984014294458956"
        },
        {
          "position": 9,
          "title": "Doppio Coffee & Brunch",
          "address": "1551 Mission St",
          "latitude": 37.773315,
          "longitude": -122.418015,
          "rating": 4.8,
          "ratingCount": 494,
          "priceLevel": "$10–20",
          "category": "Coffee shop",
          "cid": "16475263059648961979"
        },
        {
          "position": 10,
          "title": "Delah Coffee",
          "address": "370 4th St",
          "latitude": 37.781017,
          "longitude": -122.40022,
          "rating": 4.6,
          "ratingCount": 1200,
          "priceLevel": "$10–20",
          "category": "Coffee shop",
          "cid": "10682847123881919373"
        }
      ]
    }
  ],
  "usage": {
    "credits": 0.02
  },
  "created_at": "2026-09-16T07:41:45.679Z"
}
```

## Response fields

| Field | Type | Description |
| --- | --- | --- |
| source | string | The requested API source. |
| status | string | done when the realtime request succeeds. |
| created_at | string | Response creation time in ISO 8601 format. |
| usage.credits | number | Credits charged for the request, based on your plan. |
| results[0].searchParameters | object | Search settings reported by Google, with the query recorded as q. Returned settings may differ from the requested values. |
| results[0].places | array | Local search results. |
| results[0].places[].title | string | Place or business name. |
| results[0].places[].address | string · optional | Street address. |
| results[0].places[].latitude | number · optional | Latitude. |
| results[0].places[].longitude | number · optional | Longitude. |
| results[0].places[].rating | number · optional | Average rating. |
| results[0].places[].ratingCount | integer · optional | Number of ratings. |
| results[0].places[].category | string · optional | Business category. |
| results[0].places[].phoneNumber | string · optional | Listed phone number. |
| results[0].places[].website | string · optional | Business website. |
| results[0].places[].cid | string · optional | Google place identifier. |
| results[0].places[].position | integer | Result position. |
| results[0].places[].priceLevel | string · optional | Displayed price level when available. |

- Available fields depend on the query and search type. Optional fields may be absent, and additional fields may be returned.
- The number of returned items and searchParameters.num can differ from params.num. Use the returned array to determine the actual result count.

## Response formats

Responses use JSON by default. Choose another format with these optional headers.

- Accept: application/json (default) or text/plain. Plain text presents the same fields in a readable, indented layout.
- X-Respond-With: markdown. Leave unset for original fields. Markdown works with either response format.

Markdown is available for realtime queries and completed results.

The fields below describe the default JSON response.

[Request and response format examples](https://flashdata.dev/docs/guides/response-formats/reference.md#headers)

<a id="job-lifecycle"></a>

<a id="async-batch"></a>

## API basics

The request builder and examples above use this source's parameters. Use the Python and cURL examples below for shared submission, status and result steps. A Batch body is a JSON object containing queries; each item returns its own job ID.

- [Async request and receipt](https://flashdata.dev/docs/reference/realtime-and-async/reference.md#async)

<a id="job-status"></a>

- [Check job status](https://flashdata.dev/docs/reference/realtime-and-async/reference.md#status)

<a id="job-results"></a>

- [Retrieve completed results](https://flashdata.dev/docs/reference/realtime-and-async/reference.md#results)
- [Batch JSON requests](https://flashdata.dev/docs/reference/batch-and-bulk/reference.md#batch)
- [Customer OpenAPI](https://flashdata.dev/docs/openapi.json)

<a id="webhooks"></a>

<a id="callbacks"></a>

## Completion notifications

- [Receive and verify completion webhooks](https://flashdata.dev/docs/guides/async-batch/reference.md#webhooks)

<a id="troubleshooting"></a>

## Troubleshooting

- [Errors and status codes](https://flashdata.dev/docs/errors/reference.md#status-codes)
- [When to retry](https://flashdata.dev/docs/errors/reference.md#retries)

## Related APIs

- [Google Search API](https://flashdata.dev/docs/sources/google_search/reference.md)
- [Google Images API](https://flashdata.dev/docs/sources/google_images/reference.md)
