# searchNearbyPlaces

**Identifier:** `googlemaps_searchNearbyPlaces`

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

Search for places near a specific location with optional type filtering. Useful for finding specific types of businesses or services in an area.

## Run it with the CLI

```bash
kirha tools run googlemaps_searchNearbyPlaces \
  --input '{
    "latitude": -90,
    "longitude": -180
  }'
```

`--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_searchNearbyPlaces",
  "input": {
    "latitude": -90,
    "longitude": -180
  }
}'
```

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": {
    "latitude": {
      "maximum": 90,
      "minimum": -90,
      "type": "number"
    },
    "limit": {
      "default": 10,
      "maximum": 20,
      "minimum": 1,
      "type": "number"
    },
    "longitude": {
      "maximum": 180,
      "minimum": -180,
      "type": "number"
    },
    "placeType": {
      "description": "Type of place to search for (e.g., 'restaurant', 'hospital', 'atm'), optional",
      "type": "string"
    },
    "query": {
      "type": "string"
    },
    "radius": {
      "default": 5000,
      "description": "In meters, optional",
      "maximum": 50000,
      "minimum": 1,
      "type": "number"
    }
  },
  "required": [
    "latitude",
    "longitude"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "nearbyPlaces": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "address": {
            "type": "string"
          },
          "distance": {
            "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"
          },
          "title": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "website": {
            "type": "string"
          }
        },
        "required": [
          "title",
          "placeId"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "searchLocation": {
      "additionalProperties": false,
      "properties": {
        "latitude": {
          "type": "number"
        },
        "longitude": {
          "type": "number"
        }
      },
      "required": [
        "latitude",
        "longitude"
      ],
      "type": "object"
    }
  },
  "required": [
    "context",
    "nearbyPlaces",
    "searchLocation"
  ],
  "type": "object"
}
```

-----

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