data
Google Maps CLI for AI Agents
Use the Google Maps CLI from KosmoKrator to call Google Maps tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.Google Maps CLI Setup
Google Maps can be configured headlessly with `kosmokrator integrations:configure google-maps`.
# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash
# Configure and verify this integration.
kosmokrator integrations:configure google-maps --set api_key="$GOOGLE_MAPS_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor google-maps --json
kosmokrator integrations:status --json Credentials
Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.
| Key | Env var | Type | Required | Label |
|---|---|---|---|---|
api_key | GOOGLE_MAPS_API_KEY | Secret secret | yes | API Key |
url | GOOGLE_MAPS_URL | URL url | no | API Base URL |
Command Patterns
The generic command is stable across every integration. The provider shortcut is shorter for humans.
kosmo integrations:call google-maps.google_maps_geocode_address '{"address":"example_address","components":"example_components","region":"example_region","language":"example_language"}' --json kosmo integrations:google-maps google_maps_geocode_address '{"address":"example_address","components":"example_components","region":"example_region","language":"example_language"}' --json Discovery
These commands return structured output for coding agents that need to inspect capabilities before choosing a function.
kosmo integrations:docs google-maps --json
kosmo integrations:docs google-maps.google_maps_geocode_address --json
kosmo integrations:schema google-maps.google_maps_geocode_address --json
kosmo integrations:search "Google Maps" --json
kosmo integrations:list --json Automation Contexts
The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.
CLI Functions
Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.
google-maps.google_maps_geocode_address
Convert a street address into geographic coordinates and place details using Google Maps geocoding.
read - Parameters
- address, components, region, language
kosmo integrations:call google-maps.google_maps_geocode_address '{"address":"example_address","components":"example_components","region":"example_region","language":"example_language"}' --json kosmo integrations:google-maps google_maps_geocode_address '{"address":"example_address","components":"example_components","region":"example_region","language":"example_language"}' --json google-maps.google_maps_reverse_geocode
Convert latitude and longitude coordinates into street addresses using Google Maps reverse geocoding.
read - Parameters
- latitude, longitude, components, language, result_type, location_type
kosmo integrations:call google-maps.google_maps_reverse_geocode '{"latitude":1,"longitude":1,"components":"example_components","language":"example_language","result_type":"example_result_type","location_type":"example_location_type"}' --json kosmo integrations:google-maps google_maps_reverse_geocode '{"latitude":1,"longitude":1,"components":"example_components","language":"example_language","result_type":"example_result_type","location_type":"example_location_type"}' --json google-maps.google_maps_search_places
Search for places with a text query using Google Maps Places search.
read - Parameters
- query, location, radius, language, type, open_now, min_price, max_price
kosmo integrations:call google-maps.google_maps_search_places '{"query":"example_query","location":"example_location","radius":1,"language":"example_language","type":"example_type","open_now":true,"min_price":1,"max_price":1}' --json kosmo integrations:google-maps google_maps_search_places '{"query":"example_query","location":"example_location","radius":1,"language":"example_language","type":"example_type","open_now":true,"min_price":1,"max_price":1}' --json google-maps.google_maps_get_place_details
Get detailed information about a specific Google Maps place by Place ID.
read - Parameters
- place_id, fields, language, region, reviews_no_translations, reviews_sort
kosmo integrations:call google-maps.google_maps_get_place_details '{"place_id":"example_place_id","fields":"example_fields","language":"example_language","region":"example_region","reviews_no_translations":"example_reviews_no_translations","reviews_sort":"example_reviews_sort"}' --json kosmo integrations:google-maps google_maps_get_place_details '{"place_id":"example_place_id","fields":"example_fields","language":"example_language","region":"example_region","reviews_no_translations":"example_reviews_no_translations","reviews_sort":"example_reviews_sort"}' --json google-maps.google_maps_get_directions
Get directions between an origin and destination using Google Maps Directions API.
read - Parameters
- origin, destination, mode, waypoints, alternatives, avoid, language, units, departure_time, arrival_time, transit_mode, transit_routing_preference
kosmo integrations:call google-maps.google_maps_get_directions '{"origin":"example_origin","destination":"example_destination","mode":"example_mode","waypoints":"example_waypoints","alternatives":true,"avoid":"example_avoid","language":"example_language","units":"example_units"}' --json kosmo integrations:google-maps google_maps_get_directions '{"origin":"example_origin","destination":"example_destination","mode":"example_mode","waypoints":"example_waypoints","alternatives":true,"avoid":"example_avoid","language":"example_language","units":"example_units"}' --json google-maps.google_maps_get_distance_matrix
Calculate travel distances and durations between multiple origins and destinations.
read - Parameters
- origins, destinations, mode, language, units, departure_time, arrival_time, avoid, transit_mode, transit_routing_preference
kosmo integrations:call google-maps.google_maps_get_distance_matrix '{"origins":"example_origins","destinations":"example_destinations","mode":"example_mode","language":"example_language","units":"example_units","departure_time":"example_departure_time","arrival_time":"example_arrival_time","avoid":"example_avoid"}' --json kosmo integrations:google-maps google_maps_get_distance_matrix '{"origins":"example_origins","destinations":"example_destinations","mode":"example_mode","language":"example_language","units":"example_units","departure_time":"example_departure_time","arrival_time":"example_arrival_time","avoid":"example_avoid"}' --json google-maps.google_maps_get_current_user
Get geolocation data for the current requester and verify Google Maps API credentials.
read - Parameters
- none
kosmo integrations:call google-maps.google_maps_get_current_user '{}' --json kosmo integrations:google-maps google_maps_get_current_user '{}' --json Function Schemas
Use these parameter tables when building CLI payloads without calling integrations:schema first.
google-maps.google_maps_geocode_address 4 parameters
kosmo integrations:schema google-maps.google_maps_geocode_address --json | Parameter | Type | Required | Description |
|---|---|---|---|
address | string | yes | Street address to geocode. |
components | object | no | Optional component filters such as {"country": "US"}. |
region | string | no | Optional region bias such as "us". |
language | string | no | Optional language code such as "en". |
google-maps.google_maps_reverse_geocode 6 parameters
kosmo integrations:schema google-maps.google_maps_reverse_geocode --json | Parameter | Type | Required | Description |
|---|---|---|---|
latitude | number | yes | Latitude coordinate. |
longitude | number | yes | Longitude coordinate. |
components | object | no | Optional component filters. |
language | string | no | Optional language code. |
result_type | string | no | Optional result type filter such as "street_address". |
location_type | string | no | Optional location type filter such as "ROOFTOP". |
google-maps.google_maps_search_places 8 parameters
kosmo integrations:schema google-maps.google_maps_search_places --json | Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Text search query such as "restaurants in Sydney". |
location | string | no | Optional location bias as "lat,lng". |
radius | number | no | Optional radius in meters. |
language | string | no | Optional language code. |
type | string | no | Optional place type such as "restaurant". |
open_now | boolean | no | Whether to return only places open now. |
min_price | integer | no | Optional minimum price level from 0 to 4. |
max_price | integer | no | Optional maximum price level from 0 to 4. |
google-maps.google_maps_get_place_details 6 parameters
kosmo integrations:schema google-maps.google_maps_get_place_details --json | Parameter | Type | Required | Description |
|---|---|---|---|
place_id | string | yes | Google Place ID. |
fields | array | no | Optional list of fields to include. |
language | string | no | Optional language code. |
region | string | no | Optional region code. |
reviews_no_translations | string | no | Set to "true" to disable review translations. |
reviews_sort | string | no | Review sort order such as "most_relevant" or "newest". |
google-maps.google_maps_get_directions 12 parameters
kosmo integrations:schema google-maps.google_maps_get_directions --json | Parameter | Type | Required | Description |
|---|---|---|---|
origin | string | yes | Starting point as address, Place ID, or "lat,lng". |
destination | string | yes | Destination as address, Place ID, or "lat,lng". |
mode | string | no | Travel mode: driving, walking, bicycling, or transit. |
waypoints | string | no | Optional pipe-separated waypoints. |
alternatives | boolean | no | Whether to return alternative routes. |
avoid | array | no | Avoid options such as tolls, highways, ferries. |
language | string | no | Optional language code. |
units | string | no | Unit system: metric or imperial. |
departure_time | string | no | Departure time as "now" or Unix timestamp. |
arrival_time | string | no | Arrival time as Unix timestamp for transit. |
transit_mode | string | no | Transit modes such as bus, subway, train, tram, or rail. |
transit_routing_preference | string | no | Transit preference: less_walking or fewer_transfers. |
google-maps.google_maps_get_distance_matrix 10 parameters
kosmo integrations:schema google-maps.google_maps_get_distance_matrix --json | Parameter | Type | Required | Description |
|---|---|---|---|
origins | array | yes | Origin addresses or "lat,lng" strings. |
destinations | array | yes | Destination addresses or "lat,lng" strings. |
mode | string | no | Travel mode: driving, walking, bicycling, or transit. |
language | string | no | Optional language code. |
units | string | no | Unit system: metric or imperial. |
departure_time | string | no | Departure time as "now" or Unix timestamp. |
arrival_time | string | no | Arrival time as Unix timestamp for transit. |
avoid | array | no | Avoid options such as tolls, highways, ferries. |
transit_mode | string | no | Transit modes as a pipe-separated string. |
transit_routing_preference | string | no | Transit preference: less_walking or fewer_transfers. |
google-maps.google_maps_get_current_user 0 parameters
kosmo integrations:schema google-maps.google_maps_get_current_user --json | Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
Permissions
Headless calls still follow the integration read/write permission policy. Configure read/write defaults with
integrations:configure. Add --force only for trusted automation that should bypass that policy.