Place autocomplete
GET
/places/autocompleteReturns place suggestions for the text being typed. The Google Places API is called on the server, so clients do not need an API key. Used for the location field on a profile.
| Auth | Login required |
|---|
Query parameters
inputstringrequiredThe text being typed. Returns no suggestions when empty.
languagestringLanguage of the suggestions (ja | en, default ja).
granularitystringComma-separated units to narrow suggestions (country,state,city). Omit to include buildings and street addresses.
Response
| Field | Type | Description |
|---|---|---|
predictions | object[] | Array of { placeId, text, secondaryText }. |
Request
curl https://api.4s.link/places/autocomplete \-H "Authorization: Bearer 4s_at_..."
Example response
{"predictions": [{"placeId": "ChIJ...","text": "東京都港区","secondaryText": "日本"}]}