Cities
Get a saved city by ID
Retrieve an existing PurpleGrain city using its city ID, not a Google place ID or IP address. Returns its name, subdivision, country and Google place ID. Use include=location to embed its coordinates and accuracy. This lookup reads saved data without resolving or creating a place.
get/cities/{id}
Request
- Base URL: https://api.purplegrain.com/api/v1
- URL: https://api.purplegrain.com/api/v1/cities/{id}
- Auth: none declared
Path parameters
idstring required
Id of the record
Query parameters
includestring
Example:location
Comma-separated snake_case relationship paths to embed (JSON:API included array, or inlined for application/json). Never embedded by default; unknown paths ignored; max 10 paths. Allowed paths: location.
Response
Successful. When the include query parameter is used, the response may contain an included array (JSON:API) or inlined related resources (application/json).
Example response
{
"data": {
"type": "city"
}
}Changes
No recorded changes to this operation across all 2 revisions of this API.