# GET /v1/places/{placeId}/geometry A place's outline, simplified for a map zoom. | Access | | | --- | --- | | Keys | publishable or secret | | Plan | Premium | | Environment | live and sandbox | | Acts for | the account | | While the account is suspended | refused | | During a data stop | works | ## Path | Name | Type | Description | | --- | --- | --- | | `placeId` | string | **Required.** The place's ID, "pl_…", from autocomplete, from a listing's `places`, or from GET /v1/places/containing. | ## Query | Name | Type | Description | | --- | --- | --- | | `zoom` | integer | **Required.** The map zoom the outline will be drawn at. Below 0 is read as 0, above 22 as 22. | ## Answers ### 200: The outline The answer is `{ data, meta }`; `meta` holds `requestId` and `environment`. `data`: | Field | Type | Description | | --- | --- | --- | | `placeId` | string | | | `kind` | `state`, `county`, `city`, `municipality`, `cdp`, `community`, `zcta`, `postal_city`, `subdivision`, `school_district` | | | `zoom` | integer | The zoom that was used, from 0 to 22. | | `tier` | `display_lo`, `display_mid`, `display_hi` | Which of the three versions was served: zoom 9 or less, 10 to 12, 13 or more. | | `approximate` | boolean | | | `vertices` | integer | How many corners the outline has: at most 5,000. | | `geometry` | object | A GeoJSON MultiPolygon. Coordinates are [longitude, latitude]. | | `geometry.type` | `MultiPolygon` | | | `geometry.coordinates` | list of any | | | `source` | string | Where the outline comes from: the place's own `source`. | | `attribution` | string or null | | Header `Outline-Quota-Limit`: Outlines a key may be served in a UTC day: 5000. Header `Outline-Quota-Remaining`: Outlines left today. Header `Outline-Quota-Reset`: Seconds until 00:00 UTC. ## Errors | Status | Codes | | --- | --- | | 400 | [`client_id_must_be_opaque`](../../errors/client_id_must_be_opaque.md), [`validation_failed`](../../errors/validation_failed.md) | | 401 | [`client_token_account_mismatch`](../../errors/client_token_account_mismatch.md), [`client_token_expired`](../../errors/client_token_expired.md), [`client_token_invalid`](../../errors/client_token_invalid.md), [`invalid_api_key`](../../errors/invalid_api_key.md), [`key_revoked`](../../errors/key_revoked.md), [`missing_api_key`](../../errors/missing_api_key.md) | | 403 | [`account_pending`](../../errors/account_pending.md), [`account_suspended`](../../errors/account_suspended.md), [`origin_not_allowed`](../../errors/origin_not_allowed.md), [`secret_key_in_browser`](../../errors/secret_key_in_browser.md), [`tier_insufficient`](../../errors/tier_insufficient.md) | | 404 | [`not_found`](../../errors/not_found.md) | | 429 | [`quota_exceeded`](../../errors/quota_exceeded.md), [`rate_limited`](../../errors/rate_limited.md) | | 500 | [`internal_error`](../../errors/internal_error.md), [`temporarily_unavailable`](../../errors/temporarily_unavailable.md) | Every error has the same body, and says how to fix it ([responses and errors](../../concepts/responses-and-errors.md)). ## More **Premium only** (`403 tier_insufficient` with `capability: "shapes"` on Basic). The place's outline, simplified for the map zoom it will be drawn at: ```json { "data": { "placeId": "pl_…", "kind": "county", "zoom": 11, "tier": "display_mid", "approximate": false, "vertices": 412, "geometry": { "type": "MultiPolygon", "coordinates": [[[[-75.3501, 40.0012], [-75.3498, 40.0021], [-75.3501, 40.0012]]]] }, "source": "census_tiger", "attribution": null }, "meta": { "requestId": "req_…", "environment": "live" } } ``` - `zoom` is required: a whole number, read as 0 below 0 and as 22 above 22 (the answer carries the value used). Without it, or with anything else, `400 validation_failed`. - The zoom picks one of three versions of the outline: `display_lo` at zoom 9 or less, `display_mid` at 10 to 12, `display_hi` at 13 or more. Coordinates have 4 decimals at low and mid zoom and 5 at high zoom. There is no full-precision option. - `geometry` is a GeoJSON `MultiPolygon` of at most 5,000 corners. `vertices` is its corner count: every position except each ring's closing repeat. - `tier` names the version served. If the version for the zoom isn't available for a place, the next coarser one is served and named; never a finer one. - `approximate` is true for an outline put together from other shapes, such as a postal city's (the ZIP areas it is the preferred city of). - `404 not_found` for an ID that doesn't exist, a retired place, and a place that has no outline: a community (a point, searched within its radius), a subdivision (matched by the name each listing carries) and a postal city no ZIP area could be found for. The message says which; `location.placeIds` still searches all three. - A school district's outline is served like any other place's. - Limits: 60 outlines in any 60 seconds and 5,000 a UTC day, per key. See [rate limits](../../concepts/rate-limits.md) for the headers every outline answer carries. _This page is made from the route's own declaration by `npm run openapi`. To change it, change the declaration or its explanation, never this file._