Offender Map API · v1.0.0

The viewport request

Every parameter, how zoom picks the detail level, and the caching headers.

Livehttps://api.offendersearch.appSandboxhttps://sandbox.offendersearch.app

The request

GET /v1/map/viewport answers one map view. Call it when the map first loads and each time it stops moving. One call is one map request.

GET /v1/map/viewport
curl -G https://api.offendersearch.app/v1/map/viewport \
  -H "X-API-Key: $OFFENDERSEARCH_KEY" \
  -d bbox=-83.2,39.8,-82.8,40.1 \
  -d zoom=10

Parameters

Every query parameter and header, with its type, default and an example, is in the request table below. The ones a map sends on every call are bbox and zoom; center with radiusMiles answers a circle instead (see Near an address), and sandbox=true puts the request in test mode.

Send bbox, or center with radiusMiles. Not both.

The optional X-End-User header carries any id you choose for the person using the map. It is read on this route and on POST /v1/map/area. See Limits & errors.

How the zoom picks the detail level

Effective zoommodeReturned
3–12clustersA count for each grid cell, with its extent and a breakdown.
13–14pinsOne pin for each address: a position, with no name.
15+markersPins with a name label and basic fields.

The effective zoom is worked out like this:

  1. It starts as the zoom you sent. If you sent none, it is the zoom at which the box is about four map tiles wide.
  2. If the box covers more than 64 map tiles at that zoom, the zoom is lowered until it fits.
  3. It is never lower than 3.

The response states the zoom that was used, in zoom, and the level, in mode. Draw from mode, not from your own zoom.

Any size of area

There is no largest box. A view of a whole country is answered as clusters, in one map request, at the same price as a view of one street. A wide box is simply answered at a lower zoom.

The 300-pin rule

A response holds at most 300 pins. A view at zoom 13 or closer with more than that is answered as clusters on a finer grid, with mode: "clusters". Each cluster’s expansionZoom says how far to zoom for it to come apart.

The response

200 OK
{
  "mode": "clusters",
  "zoom": 10,
  "bbox": [-83.2, 39.8, -82.8, 40.1],
  "datasetVersion": "2026-10-12",
  "total": 508,
  "breakdown": {
    "street": 508, "housed": 247, "homeless": 96, "incarcerated": 0
  },
  "clusters": [
    {
      "id": "c10_1103_1551",
      "lat": 39.9612, "lng": -82.9988,
      "count": 412,
      "bbox": [-83.06, 39.91, -82.97, 39.98],
      "expansionZoom": 11,
      "breakdown": {
        "street": 412, "housed": 201, "homeless": 77, "incarcerated": 0
      }
    }
  ],
  "markers": [],
  "areas": [],
  "unplaced": {"count": 96, "states": ["OH"]},
  "notice": "A pin shows a registered address, not a person's current location.",
  "sandbox": true
}

Every response field is in the response table below. What to draw is in clusters, markers and areas, and each of those objects is defined once, in Clusters & markers.

Markers are sorted by distance from the centre of the view.

Sex offender map API: GET /v1/map/viewport request and response fields

GET/v1/map/viewportAuth: X-API-Key

What to draw for one map view: clusters, pins or named pins of registered sex offenders. Send the view as bbox, or as center with radiusMiles. One map request per answer, whatever the view holds; a 304, test mode and errors are free.

Request

Headers
FieldTypeDescription
X-API-Key
required
stringA 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.
X-End-User
optional
stringAny id you use for the person behind this request. Their pin views are then also counted against the per-end-user daily area budget (2,000 distinct areas), so one heavy user is stopped before the account is.
If-None-Match
optional
stringThe ETag of an earlier answer for the same view. An unchanged view answers 304 with no body and is not billed.
Query parameters
FieldTypeDescription
bbox
optional
stringThe view, west,south,east,north in degrees. Any size: a wide box is answered at a lower zoom, never refused. A box crossing the date line has west greater than east. Send bbox, or center with radiusMiles, not both.
Example "-83.5,39.6,-82.4,40.3"
center
optional
stringInstead of bbox: lat,lng in degrees. Requires radiusMiles. Only what is inside the circle comes back.
Example "39.9612,-82.9988"
radiusMiles
optional
numberWith center: the radius in miles, 0.1 to 100.
Example 0.5
zoom
optional
numberThe map's current zoom, 0 to 22; a fraction is floored. Leave it out and the zoom at which the box is about four tiles wide is used.
Example 13
format
optional · default "json"
string
one of "json", "geojson"
json for the response below, geojson for a MapGeoJson FeatureCollection (application/geo+json).
detail
optional · default "full"
string
one of "full", "count"
full for what to draw, count for numbers only (mode: "count", no ids).
housing
optional
stringKeep only people with these housing statuses: one or more of housed, homeless, incarcerated, comma-separated. Leave it out to keep everyone.
Example "homeless,incarcerated"
precision
optional
string
one of "street", "any"
street keeps only people with an exact street address. any, or leaving it out, keeps everyone.
sandbox
optional · default false
booleantrue answers in test mode: made-up people around eight US cities, in the real response shape, never billed, no plan needed.

Response

200 · application/json

The answer for this view. Every answer carries Cache-Control: private, max-age=300 and an ETag.

FieldTypeDescription
mode
string
one of "clusters", "pins", "markers", "count"
What this answer holds. clusters at zoom 3 to 12, or for a closer view holding more than 300 pins. pins at zoom 13 and 14. markers (pins with names) at zoom 15 and closer. count with detail=count: numbers only, and clusters, markers and areas are empty.
zoom
integerThe effective zoom this view was answered at: your zoom (or the one derived from the box), lowered until the box fits in 64 map tiles, never below 3.
bbox
array of numberThe box answered, [west, south, east, north] in degrees. For a radius request it is the box around the circle; for a drawn shape, the shape's bounding box.
datasetVersion
string (date)The date of the map data that answered.
Example "2026-10-12"
total
integerPeople in the view, each counted once. In clusters mode: the people in the clusters returned. On a radius request: the people inside the circle, equal to withinRadius.
breakdown
MapBreakdownThe four counts for total.
clusters
array of MapClusterThe clusters to draw, largest first. [] outside clusters mode.
markers
array of objectThe pins to draw, nearest the centre of the view first. Each entry is one person's pin (a MapMarker) or a many-people pin (a MapGroupPin, id: null with a groupId). [] in clusters and count mode.
areas
array of MapAreaApproximate-area pins. [] in clusters and count mode.
unplaced
MapUnplacedPeople in the states this view touches who have no mappable address.
center
array of number[lat, lng] of the circle answered. Present only on a center + radiusMiles request.
radiusMiles
numberThe radius answered, in miles. Present only on a radius request.
withinRadius
integerThe exact number of people inside the circle, at every detail level. Present only on a radius request.
shape
string
one of "polygon", "route"
polygon or route: the shape that was drawn. Present only on a POST /v1/map/area answer.
totalIsEstimate
booleanPresent, and true, only on a POST /v1/map/area answer counted from clusters (clusters mode, or count mode at a cluster zoom): a cluster is counted when its centre is inside the shape. Zoom in or draw a smaller shape for an exact total.
sandbox
booleanPresent, and true, only on a test-mode answer.
notice
stringA sentence to show on the map, on every answer.
Example "A pin shows a registered address, not a person's current location."
304 · no body

The view has not changed since the ETag sent in If-None-Match. No body, not billed: draw the body you kept.

Errors
StatusCodeWhen
401—The key is missing or invalid. The body is the plain detail string.
403map_not_enabledThe 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.
422invalid_bboxA parameter cannot be read. The code names it: invalid_bbox, invalid_center, invalid_radius, invalid_zoom, invalid_filter, invalid_format, invalid_detail.
429map_busyToo many map requests at the same moment (Retry-After: 1). map_sweep_limit and map_end_user_limit when a daily area budget is used (clusters still work); overloaded when the service is at capacity.
503map_unavailableThe map could not be read just now (map_index_not_ready, map_not_configured likewise). Nothing was charged; retry after Retry-After.

Caching

Every answer carries Cache-Control: private, max-age=300 and an ETag.

  • Send the ETag back in If-None-Match. An unchanged view answers 304, with no body. A 304 is not billed.
  • The ETag changes when the map data changes, and at least every 12 hours, so marker ids are never kept past their life.
  • Keep the body with its ETag. On a 304, draw the body you kept.
  • The answer is private to your account. Do not put it in a shared cache.

Errors

A bad parameter answers 422 with a code that names it: invalid_bbox, invalid_center, invalid_radius, invalid_zoom, invalid_filter, invalid_format, invalid_detail. All codes are in Limits & errors.

Product overview