# searchPlaces

**Identifier:** `googlemaps_searchPlaces`

**Provider:** [Google Maps](https://kirha.com/providers/googlemaps.md)

Search for places on Google Maps by query and/or location. Returns local businesses, landmarks, and points of interest.

## Run it with the CLI

```bash
kirha tools run googlemaps_searchPlaces \
  --input '{
    "query": "coffee"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "googlemaps_searchPlaces",
  "input": {
    "query": "coffee"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "limit": {
      "default": 10,
      "maximum": 20,
      "minimum": 1,
      "type": "number"
    },
    "location": {
      "description": "[latitude, longitude], optional",
      "items": false,
      "maxItems": 2,
      "minItems": 2,
      "prefixItems": [
        {
          "maximum": 90,
          "minimum": -90,
          "type": "number"
        },
        {
          "maximum": 180,
          "minimum": -180,
          "type": "number"
        }
      ],
      "type": "array"
    },
    "offset": {
      "default": 0,
      "description": "For pagination, optional",
      "minimum": 0,
      "type": "number"
    },
    "query": {
      "description": "e.g., 'coffee', 'restaurants', 'gas station'",
      "type": "string"
    }
  },
  "required": [
    "query"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "places": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string"
          },
          "latitude": {
            "type": "number"
          },
          "longitude": {
            "type": "number"
          },
          "openNow": {
            "type": "boolean"
          },
          "phone": {
            "type": "string"
          },
          "placeId": {
            "type": "string"
          },
          "price": {
            "type": "string"
          },
          "rating": {
            "type": "number"
          },
          "reviewsCount": {
            "type": "number"
          },
          "thumbnail": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "website": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "placeId"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "totalResults": {
      "type": "number"
    }
  },
  "required": [
    "context",
    "places"
  ],
  "type": "object"
}
```

## Related tools

Other Google Maps tools that this tool refers to, or that refer to it.

- [`getPlaceReviews`](https://kirha.com/providers/googlemaps/getPlaceReviews.md)
- [`getPlaceDetails`](https://kirha.com/providers/googlemaps/getPlaceDetails.md)

-----

[All Google Maps tools](https://kirha.com/providers/googlemaps.md) · [< Back to tools list](https://kirha.com/tools.md)