Open Application Platform Docs

Address autocomplete (beta)

Suggest addresses while they are typed, then give the chosen one as a structured address with coordinates.

geo.autocomplete Beta call

How to call it

REST

POST /v1/geo/autocomplete

POST /v1/geo/place

GraphQL

query openGeoAutocomplete

query openGeoPlace

MCP

open_geo_autocomplete

Suggest addresses for text being typed (at least 3 characters), optionally limited to countries and biased toward a point. Pass a session_token to group a typing session. Billed one call.

open_geo_place

Get the structured address and coordinates of an address suggestion by its place_id, with the session_token used while typing. Billed one call.

Request schema

Generated from the same validation rules the endpoint runs, so a field cannot be documented without being validated.

POST /v1/geo/autocomplete

{
    "type": "object",
    "properties": {
        "countries": {
            "type": "array",
            "maxItems": 5,
            "items": {
                "type": "string",
                "minLength": 2,
                "maxLength": 2
            }
        },
        "input": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200
        },
        "language": {
            "type": [
                "string",
                "null"
            ],
            "maxLength": 16
        },
        "near": {
            "type": [
                "object",
                "null"
            ],
            "properties": {
                "lat": {
                    "type": "number",
                    "minimum": -90,
                    "maximum": 90,
                    "description": "Required when near is present."
                },
                "lng": {
                    "type": "number",
                    "minimum": -180,
                    "maximum": 180,
                    "description": "Required when near is present."
                },
                "radius_meters": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 1,
                    "maximum": 50000
                }
            }
        },
        "session_token": {
            "type": [
                "string",
                "null"
            ],
            "maxLength": 64
        },
        "types": {
            "type": [
                "string",
                "null"
            ],
            "enum": [
                "address",
                "geocode",
                "establishment"
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "input"
    ]
}

Request example

{
    "input": "1000 rue de la Gauchetiere",
    "countries": [
        "ca"
    ],
    "session_token": "6f1c2a8e-4b1d-4a39-9d0e-5b8f3c7a21de"
}

POST /v1/geo/place

{
    "type": "object",
    "properties": {
        "language": {
            "type": [
                "string",
                "null"
            ],
            "maxLength": 16
        },
        "place_id": {
            "type": "string",
            "maxLength": 512
        },
        "session_token": {
            "type": [
                "string",
                "null"
            ],
            "maxLength": 64
        }
    },
    "additionalProperties": false,
    "required": [
        "place_id"
    ]
}

Request example

{
    "place_id": "ChIJWeWFxFwayUwRgP5QVJUn5ww",
    "session_token": "6f1c2a8e-4b1d-4a39-9d0e-5b8f3c7a21de"
}

Response

What a successful call returns: the schema of `data` and `meta`, with a description of each field, followed by an example response from a real call.

POST /v1/geo/autocomplete

Response schema

{
    "description": "The suggestions for the text typed so far. Billed one call.",
    "data": {
        "type": "object",
        "properties": {
            "suggestions": {
                "type": "array",
                "description": "Up to five suggestions, best first.",
                "items": {
                    "type": "object",
                    "properties": {
                        "place_id": {
                            "type": "string",
                            "description": "Pass to POST /v1/geo/place for the address and coordinates."
                        },
                        "description": {
                            "type": "string",
                            "description": "The whole suggestion on one line."
                        },
                        "main_text": {
                            "type": "string",
                            "description": "The street part."
                        },
                        "secondary_text": {
                            "type": "string",
                            "description": "The city, province and country part."
                        },
                        "types": {
                            "type": "array",
                            "items": {
                                "type": "string"
                            },
                            "description": "What the suggestion is (address, premise, subpremise, route ...)."
                        }
                    }
                }
            }
        },
        "required": [
            "suggestions"
        ]
    },
    "meta": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
    }
}

Response example

{
    "request_id": "req_01k8zq3m5n7p9r1t3v5x7z9b2d",
    "capability": "geo.autocomplete",
    "billing": {
        "unit": "call",
        "quantity": 1,
        "counted": true
    },
    "data": {
        "suggestions": [
            {
                "place_id": "ChIJWeWFxFwayUwRgP5QVJUn5ww",
                "description": "1000 Rue De la Gauchetière Ouest, Montreal, QC, Canada",
                "main_text": "1000 Rue De la Gauchetière Ouest",
                "secondary_text": "Montreal, QC, Canada",
                "types": [
                    "geocode",
                    "subpremise"
                ]
            },
            {
                "place_id": "ChIJybX38KwbyUwRuUlJnrlZOAk",
                "description": "1000 Rue de la Gauchetière Est, Montreal, QC, Canada",
                "main_text": "1000 Rue de la Gauchetière Est",
                "secondary_text": "Montreal, QC, Canada",
                "types": [
                    "geocode",
                    "subpremise"
                ]
            },
            {
                "place_id": "ChIJq6qqH10ayUwRDKm5QlrmM2g",
                "description": "1000 Rue de la Gauchetière E, Montreal, QC, Canada",
                "main_text": "1000 Rue de la Gauchetière E",
                "secondary_text": "Montreal, QC, Canada",
                "types": [
                    "geocode",
                    "subpremise"
                ]
            },
            {
                "place_id": "EjExMDAwIFJ1ZSBkZSBsYSBHYXVjaGV0acOocmUsIE1vbnRyZWFsLCBRQywgQ2FuYWRhIjESLwoUChIJGz5nxFwayUwRxfGQnpCySKkQ6AcqFAoSCZVv0iVdGslMEUpWKOwLwBz0",
                "description": "1000 Rue de la Gauchetière, Montreal, QC, Canada",
                "main_text": "1000 Rue de la Gauchetière",
                "secondary_text": "Montreal, QC, Canada",
                "types": [
                    "geocode",
                    "street_address"
                ]
            },
            {
                "place_id": "EjYxMDAwIFJ1ZSBkZSBsYSBHYXVjaGV0acOocmUsIE1vbnRyw6lhbC1Fc3QsIFFDLCBDYW5hZGEiLiosChQKEgk5hd5QFeLITBFVgO8QJcFsCBIUChIJndvyLgHiyEwREdLOpOC4H6k",
                "description": "1000 Rue de la Gauchetière, Montréal-Est, QC, Canada",
                "main_text": "1000 Rue de la Gauchetière",
                "secondary_text": "Montréal-Est, QC, Canada",
                "types": [
                    "geocode",
                    "route"
                ]
            }
        ]
    },
    "meta": {
        "provider": "google"
    }
}

POST /v1/geo/place

Response schema

{
    "description": "The suggestion's address and coordinates. Billed one call.",
    "data": {
        "type": "object",
        "properties": {
            "place_id": {
                "type": "string",
                "description": "The place id."
            },
            "formatted_address": {
                "type": "string",
                "description": "The address on one line."
            },
            "address": {
                "type": "object",
                "properties": {
                    "number": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Civic number."
                    },
                    "street": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Street name."
                    },
                    "address_1": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Number and street."
                    },
                    "address_2": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Unit or suite, when the place has one."
                    },
                    "city": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "City."
                    },
                    "province": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Province or state code."
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "ISO 3166-1 alpha-2 country code."
                    },
                    "postcode": {
                        "type": [
                            "string",
                            "null"
                        ],
                        "description": "Postcode."
                    }
                }
            },
            "location": {
                "type": [
                    "object",
                    "null"
                ],
                "description": "The coordinates, `{lat, lng}`."
            }
        },
        "required": [
            "place_id",
            "address",
            "location"
        ]
    },
    "meta": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
    }
}

Response example

{
    "request_id": "req_01k8zq3m5n7p9r1t3v5x7z9b2d",
    "capability": "geo.autocomplete",
    "billing": {
        "unit": "call",
        "quantity": 1,
        "counted": true
    },
    "data": {
        "place_id": "ChIJWeWFxFwayUwRgP5QVJUn5ww",
        "formatted_address": "1000 Rue De la Gauchetière O, Montréal, QC H3B 4W5, Canada",
        "address": {
            "number": "1000",
            "street": "Rue De la Gauchetière Ouest",
            "address_1": "1000 Rue De la Gauchetière Ouest",
            "address_2": null,
            "city": "Montréal",
            "province": "QC",
            "country": "CA",
            "postcode": "H3B 4W5"
        },
        "location": {
            "lat": 45.4981354,
            "lng": -73.5659122
        }
    },
    "meta": {
        "provider": "google"
    }
}

What it costs

One call, whatever its size.

Every billable response carries a billing block with the unit, the quantity and how the quantity was derived.

Errors it can return

Status Code Description
401 TOKEN_INVALID Unknown or revoked API token.
401 TOKEN_MISSING No API token. Send Authorization: Bearer <your token>.
402 QUOTA_EXHAUSTED The included allowance for this capability is used up for the current period.
403 CAPABILITY_NOT_ENABLED This capability is not enabled for your account. See :doc to enable it.
403 CAPABILITY_NOT_GRANTED_TO_KEY Your account has this capability, but this API key was not granted it.
403 OPEN_API_DISABLED Open Platform access is not enabled for this account.
422 VALIDATION_FAILED The request failed validation. See details.
429 RATE_LIMITED Too many requests. Please retry after the indicated delay.
500 INTERNAL_ERROR An unexpected error occurred. Quote the request_id when contacting support.
502 ENGINE_UNAVAILABLE The routing engine is temporarily unreachable. Please retry.