API key setup
August 3, 2026 · View on GitHub
goplaces uses Google Maps Platform APIs and requires a Google API key.
Create and configure a key
-
Open the Google Cloud Console and create or select a project.
-
In APIs & Services → Library, enable Places API (New).
-
Enable Routes API if you plan to use
routeordirections. -
In APIs & Services → Credentials, create an API key.
-
Restrict the key to Places API (New) and Routes API, plus any application restrictions appropriate for the machine that runs
goplaces. -
Export the key before running the CLI:
export GOOGLE_PLACES_API_KEY="..."
Add the export to your shell configuration only if that file is private and appropriate for local secrets. The key can also be supplied with --api-key, but environment-based configuration avoids putting it in shell history and process arguments.
Billing and quotas
Google Maps Platform usage is billed and quota-limited. Review the Places API usage and billing documentation, set quota limits, and configure budget alerts before unattended or high-volume use.
goplaces does not proxy requests or manage credentials. Calls go to the configured Google endpoints unless you explicitly set an endpoint override.