Clusters & markers
Field tables for every object in a response, plus the GeoJSON form.
Livehttps://api.offendersearch.appSandboxhttps://sandbox.offendersearch.appWhat a view can contain
| Array | Object | When |
|---|---|---|
clusters | A cluster: a count for a grid cell. MapCluster | Zoom 3–12, and closer views that are too dense for pins. |
markers | A pin: one person at one address. MapMarker | Zoom 13–14, with no name. |
markers | A named pin. MapMarker | Zoom 15+. |
markers | A many-people pin: several people at one address. MapGroupPin | From zoom 13. |
areas | An approximate-area pin: people known only to an area. MapArea | From zoom 13. |
Cluster
A cluster never traps the user. People who share one address never split, so at its expansionZoom such a cluster becomes one pin with a count and a groupId.
Cluster fields: the MapCluster object
A count for one grid cell, returned in clusters mode (zoom 3 to 12, and closer views holding more than 300 pins). Draw it as a circle with count inside.
Returned or accepted by GET /v1/map/viewport, POST /v1/map/area.
| Field | Type | Description |
|---|---|---|
| id | string | The cluster's id, stable for the same cell at the same zoom. Use it as the key when you redraw. Example "c9_551_775" |
| lat | number | Latitude to draw the cluster at, in degrees, rounded to 5 decimals. |
| lng | number | Longitude to draw the cluster at, in degrees, rounded to 5 decimals. |
| count | integer | People in the cluster after your housing and precision filters. Always 1 or more: an empty cell is never returned. |
| bbox | array of number | The extent of the people in the cluster, [west, south, east, north] in degrees. |
| expansionZoom | integer | Fit the map to bbox at this zoom and the cluster comes apart into smaller clusters, pins, or one many-people pin. |
| breakdown | MapBreakdown | The four counts for this cluster. |
Pin
At zoom 13–14 a pin is a position and nothing that identifies anyone.
"mode": "pins",
"markers": [
{
"id": "mk_Qa8…",
"lat": 39.96123, "lng": -82.99881,
"precision": "street",
"addressType": "home"
}
]A person with two mapped addresses, such as home and work, has two pins. total counts that person once.
Named pin
From zoom 15 each pin also carries a label and basic fields.
"mode": "markers",
"markers": [
{
"id": "mk_Zb3…",
"lat": 39.96123, "lng": -82.99881,
"precision": "street",
"addressType": "home",
"label": "Sample J. Tester",
"housingStatus": "housed",
"hasPhoto": true,
"registryState": "OH"
},
{
"id": null,
"lat": 39.9678, "lng": -83.0042,
"precision": "street",
"count": 6,
"groupId": "mg_8Uo…",
"members": [
{
"id": "mk_…",
"addressType": "home",
"label": "Sample S. Demo",
"housingStatus": null,
"hasPhoto": false
}
]
}
],
"areas": [
{
"lat": 39.969, "lng": -83.0114,
"count": 9,
"precision": "zip",
"label": "43215",
"groupId": "mg_X1G…"
}
]These fields are enough for a popup. They cost nothing beyond the map request that returned them.
Pin and named pin fields: the MapMarker object
One person at one exact street address, in markers[]. In pins mode (zoom 13 and 14) it is a position and nothing that identifies anyone. In markers mode (zoom 15 and closer) it also carries label, housingStatus, hasPhoto and registryState. A person with two mapped addresses has two pins; total counts that person once.
| Field | Type | Description |
|---|---|---|
| id | string | The marker id, mk_…. Pass it to GET /v1/map/records/{markerId} to open the record. It works for 24 hours, only for the account it was issued to; do not store it, store the recordRef of the opened record instead. |
| lat | number | Latitude of the registered address, in degrees. |
| lng | number | Longitude of the registered address, in degrees. |
| precision | string one of "street" | Always street: an exact pin is drawn only for an exact street address. People known only to an area are in areas[]. |
| addressType | string one of "home", "work", "school", "other" | Which registered address this pin is. |
| label | string | First initial and last name, for example J. Smith (John Smith on a plan with full names, see markerFields on the status route). Present only in markers mode; absent in pins mode. |
| housingStatus | string or null one of "housed", "homeless", "incarcerated" | Housing status as the registry states it. null when the registry does not state one; null does not mean housed. Present only in markers mode. |
| hasPhoto | boolean | true when the record has a photo. Present only in markers mode. |
| registryState | string or null | Two-letter code of the state whose registry lists the person; for a registry that is not a state registry, the state of residence on file. null when neither is known. Present only in markers mode.Example "OH" |
| distanceMiles | number | Miles from center to the pin, rounded to 2 decimals. Present only on a center + radiusMiles request. |
Many-people pin
Several people at one address are one pin. It has id: null, a count and a groupId.
Many-people pin fields: the MapGroupPin object
Several people at one exact street address, drawn as one pin in markers[]. Tell it apart from a single pin by id: null and a groupId. List the people with GET /v1/map/groups/{groupId}.
| Field | Type | Description |
|---|---|---|
| id | null | Always null: there is no single record behind this pin. |
| lat | number | Latitude of the address, in degrees. |
| lng | number | Longitude of the address, in degrees. |
| precision | string one of "street" | Always street. |
| count | integer | Distinct people at this address. |
| groupId | string | The group id, mg_…. Pass it to GET /v1/map/groups/{groupId}. Works for 24 hours, for the account it was issued to. |
| members | array of MapMember | The people, inline, when the view is at zoom 15 or closer and the address holds 10 people or fewer. Absent otherwise; call the groups route. |
| distanceMiles | number | Miles from center, rounded to 2 decimals. Present only on a center + radiusMiles request. |
Approximate-area pin
Some people are known only to the middle of a ZIP, a city or a county. People in custody are always here, as are people without a fixed address whose registered address has no street number. They come back in areas, never in markers, so they are never drawn as an exact pin.
Draw an area pin so it does not look like an address: a dashed circle, a different colour, and the word “approximate”.
Approximate-area pin fields: the MapArea object
People known only to the middle of a ZIP code, a city or a county, in areas[]. People in custody are always here, as are people without a fixed address whose registered address has no street number. An area is never drawn as an exact pin: draw it so it does not look like an address.
Returned or accepted by GET /v1/map/viewport, POST /v1/map/area.
| Field | Type | Description |
|---|---|---|
| lat | number | Latitude of the middle of the area, in degrees. |
| lng | number | Longitude of the middle of the area, in degrees. |
| count | integer | Distinct people in the area. |
| precision | string one of "zip", "city", "county" | What the coordinate is the middle of. |
| label | string | The area's name: a ZIP code, a city or a county. Falls back to the state code, or Approximate area, when the area has no name on file.Example "43215" |
| groupId | string | The group id, mg_…. Pass it to GET /v1/map/groups/{groupId} for the people. |
| distanceMiles | number | Miles from center, rounded to 2 decimals. Present only on a center + radiusMiles request. |
The groups route
GET /v1/map/groups/{groupId} lists the people behind a many-people pin or an approximate-area pin. Each page is one map request.
curl "https://api.offendersearch.app/v1/map/groups/mg_8Uo…?page=1&perPage=50" \
-H "X-API-Key: $OFFENDERSEARCH_KEY"{
"total": 6,
"page": 1,
"perPage": 50,
"totalPages": 1,
"kind": "address",
"named": true,
"members": [
{
"id": "mk_…",
"addressType": "home",
"label": "Sample S. Demo",
"housingStatus": null,
"hasPhoto": false
}
],
"notice": "A pin shows a registered address, not a person's current location."
}Sex offender map API: GET /v1/map/groups/{groupId} request and response fields
One page of the people behind a many-people pin or an approximate-area pin. One map request per page; test mode and errors are free.
Request
| Field | Type | Description |
|---|---|---|
| X-API-Key required | string | A secret API key (from your server), or a map browser key os_map_pk_… sent from a site on that key's list. A dashboard session can send Authorization: Bearer <token> instead. |
| Field | Type | Description |
|---|---|---|
| groupId required | string | A groupId (mg_…) from a viewport or area answer. Works for 24 hours, only for the account it was issued to. |
| Field | Type | Description |
|---|---|---|
| page optional · default 1 | integer | The page, starting at 1. |
| perPage optional · default 50 | integer | People per page, 1 to 100. |
Response
One page of the group.
| Field | Type | Description |
|---|---|---|
| total | integer | People in the group. |
| page | integer | The page returned, as you sent it. |
| perPage | integer | The page size applied, as you sent it. |
| totalPages | integer | Pages at this perPage. At least 1. |
| kind | string one of "address", "area" | address for several people at one address (a many-people pin), area for an approximate-area pin. |
| named | boolean | true when the group id came from a view at zoom 15 or closer. Members carry label, housingStatus and hasPhoto only then. |
| members | array of MapMember | The people on this page. Each id opens with GET /v1/map/records/{markerId}. |
| sandbox | boolean | Present, and true, only on a test-mode answer. |
| notice | string | A sentence to show with the list, on every answer. Example "A pin shows a registered address, not a person's current location." |
| Status | Code | When |
|---|---|---|
| 401 | — | The key is missing or invalid. The body is the plain detail string. |
| 403 | map_not_enabled | The Map API is off for this account (map_paused when we paused it, origin_not_allowed for a browser key used from a site not on its list). Send sandbox=true to build first. |
| 404 | unknown_group | Not a group id this account was given. |
| 410 | group_expired | The group id is older than 24 hours. Request the map view again for a new one. |
| 422 | invalid_page | page is below 1, or perPage is not 1 to 100. |
| 429 | map_busy | Too many map requests at the same moment (Retry-After: 1). This route never counts against the daily area budget. |
| 503 | map_unavailable | The map could not be read just now (map_index_not_ready, map_not_configured likewise). Nothing was charged; retry after Retry-After. |
Group member fields: the MapMember object
One person behind a many-people pin or an approximate-area pin: in members[] of a groups response, and inline on a many-people pin at zoom 15 and closer. label, housingStatus and hasPhoto are present only when the group came from a view at zoom 15 or closer (named: true); otherwise a member is id and addressType only.
Returned or accepted by GET /v1/map/groups/{groupId}.
| Field | Type | Description |
|---|---|---|
| id | string | The marker id, mk_…. Pass it to GET /v1/map/records/{markerId}. Works for 24 hours, for the account it was issued to. |
| addressType | string one of "home", "work", "school", "other" | Which registered address put this person in the group. |
| label | string | First initial and last name, for example S. Jones. Present only on a named group. |
| housingStatus | string or null one of "housed", "homeless", "incarcerated" | Housing status as the registry states it; null when the registry does not state one. Present only on a named group. |
| hasPhoto | boolean | true when the record has a photo. Present only on a named group. |
The breakdown
breakdown is on the view and on every cluster. Its four numbers are not a split of the total: one person can count in two of them.
People whose registry does not state a housing status are in total and in none of the three housing numbers.
The breakdown object: MapBreakdown fields
Four counts of the people in a view or a cluster. They are not a split of the total: one person counts in street and in a housing number. A person whose registry states no housing status is in total and in none of the three housing counts.
Returned or accepted by GET /v1/map/viewport, POST /v1/map/area, POST /v1/map/route, POST /v1/map/routes.
| Field | Type | Description |
|---|---|---|
| street | integer | People with an exact street address. |
| housed | integer | People the registry lists as housed. |
| homeless | integer | People the registry lists as homeless. |
| incarcerated | integer | People the registry lists as in custody. |
Unplaced people
unplaced counts people in the states the view touches who have no mappable address. They are on a registry, and they are not on the map.
"unplaced": {"count": 96, "states": ["OH"]}Say so next to the map, so a short list of pins is not read as the whole list. For example: “96 more people are registered in Ohio with no mappable address. Search by name to find them.” The count is for whole states, not for the box.
Unplaced people: the MapUnplaced object
People in the states this view touches who have no mappable address. They are on a registry and they are not on the map: show the count next to the map so a short list of pins is not read as the whole list. The count is for whole states, not for the box.
Returned or accepted by GET /v1/map/viewport, POST /v1/map/area, POST /v1/map/route, POST /v1/map/routes.
| Field | Type | Description |
|---|---|---|
| count | integer | People with no mappable address in states. |
| states | array of string | Two-letter codes of the states the view touches. Example ["OH"] |
GeoJSON
With format=geojson the answer is a FeatureCollection of points, with content type application/geo+json. It can go straight into a map library’s GeoJSON source.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {"type": "Point", "coordinates": [-82.9988, 39.9612]},
"properties": {
"cluster": true,
"cluster_id": "c10_1103_1551",
"point_count": 412,
"point_count_abbreviated": "412",
"expansion_zoom": 11,
"bbox": [-83.06, 39.91, -82.97, 39.98],
"breakdown_street": 412,
"breakdown_housed": 201,
"breakdown_homeless": 77,
"breakdown_incarcerated": 0
}
}
],
"meta": {"mode": "clusters", "zoom": 10, "total": 508}
}Everything that is not a feature, such as mode, zoom, total, unplaced and notice, is under meta. For a heat map, use the cluster features with point_count as the weight.
GeoJSON response fields: the MapGeoJson object
The same answer as a GeoJSON FeatureCollection of points, returned with format=geojson and content type application/geo+json. It goes straight into a map library's GeoJSON source. A route answer with format: "geojson" has the same shape: one point per marker (kind: "marker"), group (kind: "group") and approximate area (kind: "area"), with the rest of the route answer under meta.
| Field | Type | Description |
|---|---|---|
| type | string one of "FeatureCollection" | Always FeatureCollection. |
| features | array of object | One point feature per cluster, pin, many-people pin and area. |
| features[].type | string one of "Feature" | Always Feature. |
| features[].geometry | object | The point. |
| features[].geometry.type | string one of "Point" | Always Point. |
| features[].geometry.coordinates | array of number | [lng, lat], longitude first. |
| features[].properties | object | A cluster carries cluster: true, cluster_id, point_count, point_count_abbreviated, expansion_zoom, bbox and breakdown_street, breakdown_housed, breakdown_homeless, breakdown_incarcerated (the names MapLibre and Mapbox GL cluster layers style). A pin carries its MapMarker fields except lat/lng, plus kind: "marker". A many-people pin carries its MapGroupPin fields plus kind: "group". An area carries its MapArea fields plus kind: "area". |
| meta | object | Every other field of the JSON answer (mode, zoom, bbox, total, breakdown, unplaced, notice and the rest): the viewport response without clusters, markers and areas. |