map_area
Get what to draw inside a drawn shape: a polygon, or a line with a buffer.
The same answer as map_viewport for the shape's bounding box, limited to what
is inside the shape, at the same detail levels (clusters, pins, or named pins
at zoom 15+). The response adds `shape: 'polygon' | 'route'`.
Returns: { shape, mode, zoom, bbox, datasetVersion, total, breakdown {street,
housed, homeless, incarcerated}, clusters[], markers[], areas[], unplaced
{count, states}, notice }.
- A marker with `id: null` and a `groupId` stands for several people at one
address: call map_group with that `groupId`.
- `areas` are people placed only at the middle of a ZIP, city or county.
Never describe them as being at an exact spot.
- To see who one marker is, call map_open_record with its `id`.
A pin shows a REGISTERED ADDRESS, not a person's current location — say so
when you describe a result (`notice` carries the sentence).
Billing: one map request per call ($2 per 1,000), whatever the shape holds.
Marker and group ids work for 24 hours. The Map API must be turned on for the
account (403 `map_not_enabled` otherwise); `sandbox=true` works without it.
Auth: uses the caller's X-API-Key (request header or OFFENDERSEARCH_API_KEY env).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zoom | No | Optional map zoom, 0 to 22. Decides the detail as on map_viewport: 3-12 clusters, 13-14 pins without names, 15+ pins with names. Omit it and the zoom is worked out from the size of the shape. | |
| detail | No | full = clusters or pins (default); count = numbers only. | full |
| housing | No | Keep only people with one of these housing statuses. | |
| polygon | No | A ring of 3 to 200 [lng, lat] points (GeoJSON order: longitude first), e.g. [[-83.0,39.9],[-82.9,39.9],[-82.95,40.0]]. A repeated closing point is fine. Send this OR route_points, not both. | |
| sandbox | No | If true, answer in test mode: made-up people (labels start with 'Sample') in the real response shape. Needs no plan and is never billed. | |
| street_only | No | If true, keep only people with an exact street address. | |
| buffer_miles | No | Distance either side of route_points, in miles, 0.05 to 5. | |
| route_points | No | A line of 2 to 200 [lng, lat] points (GeoJSON order). Everyone within buffer_miles either side of it is counted. Send with buffer_miles, instead of polygon. For exact per-leg and per-stop counts along a walking or bus route use map_route. |