---
title: "Resolve or create a city from a Google Place ID"
method: GET
path: "/cities/place"
tags: ["Cities"]
---

# Resolve or create a city from a Google Place ID

`GET /cities/place`

## Request

- Base URL: `https://api.purplegrain.com/api/v1`
- URL: `https://api.purplegrain.com/api/v1/cities/place`
- Auth: none declared

Resolve a Google Places `place_id` to a saved city. Reuses an existing match or sends the place ID to Google Places and persists a shared city and location record when missing. Returns the saved city ID and fields; request `include=location` for coordinates. A newly created city can subsequently be read with `getCity`. An AI assistant cannot call this; the app and an API key still can. An assistant resolves a place with `getPrediction`.

## Query parameters

- `place_id` string, required
- `include` string

## Response `200`

Successful. When the `include` query parameter is used, the response may contain an `included` array (JSON:API) or inlined related resources (application/json).

- CitiesShowResponseAttributes
  - `data` CityModelAttributes: City in attributes-adapter shape (Accept application/json); fields at top level.
    - `id` string
    - `type` string
    - `place_id` string, nullable
    - `name` string
    - `subdivision` string
    - `country` string
    - `location` object: Inlined when include=location

## Other responses

- `404`: Not Found

---

[API](https://skmtc.dev/purplegrain/apis/purple-grain-api.md) · [All operations](https://skmtc.dev/purplegrain/apis/purple-grain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/purplegrain/apis/purple-grain-api/revisions/a9136f78e9fb?raw)
