Skip to content

Overview

Available credits

Unit rate

Rate limit

API key

No active key

Send it in the x-api-key header. Keys in the URL are rejected.

Generate a new key?

Your current key stops working immediately. Any app using it will get 401 errors until you switch to the new key.

Production Batch Starter Scripts & Quickstart

Queries Google Maps across multiple ZIP codes, deduplicates by place_id, and exports business names, E.164 phones, domains, ratings, and coordinates to CSV.

import csv, requests

API_KEY = "gm_live_your_api_key"
seen = {}

for zip_code in ["10012", "10013", "10014"]:
    res = requests.get(
        "https://api.googlemapsapi.io/v1/places/search",
        params={"q": f"coffee shops in New York, NY {zip_code}", "limit": 50},
        headers={"x-api-key": API_KEY},
        timeout=30,
    ).json()
    for place in res.get("data") or []:
        seen[place["place_id"]] = {
            "place_id": place.get("place_id"),
            "name": place.get("name"),
            "category": place.get("primary_category"),
            "rating": place.get("rating"),
            "reviews": place.get("review_count"),
            "phone": place.get("phone_e164"),
            "domain": place.get("domain"),
            "address": (place.get("address") or {}).get("formatted"),
        }

with open("google_maps_leads.csv", "w", newline="", encoding="utf-8") as f:
    w = csv.DictWriter(f, fieldnames=["place_id", "name", "category", "rating", "reviews", "phone", "domain", "address"])
    w.writeheader()
    w.writerows(seen.values())
print(f"Saved {len(seen)} unique leads to google_maps_leads.csv")

Replace gm_live_your_api_key with your key, or click Generate new key to inject your live key into these scripts automatically.

Usage