Street addresses from Google, to fill in an address form. Answers 503 where address search isn’t set up: then let the address be typed. Generated from the OpenAPI spec. Each endpoint says which key it needs; see Authentication.
| Method | Path | What it does |
|---|---|---|
| GET | /v1/places/autocomplete |
Suggest addresses for what’s been typed |
| GET | /v1/places/{id} |
A suggested address in full |
Suggest addresses for what’s been typed
Section titled “Suggest addresses for what’s been typed”GET /v1/places/autocomplete · operation searchPlaces
Street addresses matching q, from Google. Use the same session for every keystroke of one search and for the GET /v1/places/{id} that ends it (Google bills a search once). 503 when address search isn’t set up.
Auth: a secret or publishable key (Authorization: Bearer sk_… or pk_…)
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
q |
query | string | What’s been typed. max 200 chars |
session |
query | string | A random token for this search, e.g. a UUID. max 100 chars |
language |
query | string | Answer in this language (default: the marketplace’s). max 35 chars |
country |
query | string[] | Only these countries (ISO codes) |
Responses: 200 SearchPlacesResponse · default a problem
A suggested address in full
Section titled “A suggested address in full”GET /v1/places/{id} · operation getPlace
The street, postal code, city, country and coordinates of a place from GET /v1/places/autocomplete.
Auth: a secret or publishable key (Authorization: Bearer sk_… or pk_…)
Parameters
| Name | In | Type | Notes |
|---|---|---|---|
id * |
path | string | max 300 chars |
session |
query | string | The search’s session, to end it. max 100 chars |
language |
query | string | max 35 chars |
Responses: 200 AddressBody · default a problem
Schemas
Section titled “Schemas”Fields marked * are always present in responses and required in requests.
SearchPlacesResponse
Section titled “SearchPlacesResponse”| Field | Type | Notes |
|---|---|---|
items * |
SuggestionBody[] |
AddressBody
Section titled “AddressBody”| Field | Type | Notes |
|---|---|---|
city * |
string | |
country * |
string | ISO 3166-1 alpha-2 |
formatted * |
string | The address on one line |
latitude * |
number (double) | |
line1 * |
string | |
line2 |
string | |
longitude * |
number (double) | |
place_id * |
string | |
postal_code * |
string |
SuggestionBody
Section titled “SuggestionBody”| Field | Type | Notes |
|---|---|---|
main * |
string | The street part, e.g. Hallvägen 29 |
place_id * |
string | Pass to GET /v1/places/{id} for the full address |
secondary * |
string | The rest, e.g. Johanneshov, Sweden |
text * |
string | The whole suggestion, on one line |