Offendersearch
Map API Reference

Limits & errors

Every limit with its number, and every error code with its cause and fix.

Base URL https://api.offendersearch.app

Limits

LimitValueWhat happens at it
Pins start at zoom13Below it a view is answered as clusters.
Names start at zoom15Below it a pin has no label.
Lowest zoom answered3A wider view is answered at this zoom.
zoom parameter0 to 22Outside it: 422 invalid_zoom.
Map tiles in one view64A wider box is answered at a lower zoom. It is not refused.
Pins in one response300A denser view is answered as clusters on a finer grid.
People inline on a many-people pin10Past it, use the groups route.
Group page size1 to 100, default 50Outside it: 422 invalid_page.
Marker id and group id life24 hours410 marker_expired or 410 group_expired.
Free re-open by recordRef24 hoursAfter it, opening by reference is one record open again.
Signed photo link1 hourOpen the record again for a new link.
Radius0.1 to 100 milesOutside it: 422 invalid_radius.
Polygon points3 to 200Outside it: 422 invalid_shape.
Route points2 to 200Outside it: 422 invalid_shape.
Route buffer0.05 to 5 milesOutside it: 422 invalid_shape.
Browser cache time300 secondsThe max-age on a view.
Longest life of an ETag12 hoursAfter it the same view is a new answer with new ids.
Distinct areas read for pins, for each account, each day20,000429 map_sweep_limit. See below.
The same, for each end user (X-End-User)2,000429 map_end_user_limit.
Map requests answered at the same moment2 on each API server429 map_busy with Retry-After: 1.

Your account’s own values for the zoom thresholds, the pin cap and the area limits are in GET /v1/map/status.

The daily area limit

Pins are counted by area. The map is divided into fixed squares, the map tiles of zoom 14. Each day an account may read pins for 20,000 different squares.

  • Only different squares count. Looking at the same neighbourhood a thousand times in a day counts its squares once.
  • Only pins count. Cluster views are never limited, and they keep working after the limit is reached. Test mode is never counted.
  • It resets each day, at midnight UTC.
  • Each end user has a share. When you send X-End-User, that person may read pins for 2,000 different squares a day. One person paging across a whole state is then stopped with map_end_user_limit before the account’s limit is touched.
  • Normal use does not reach it. People browsing a map look at a small number of places. The limit stops a copy of every pin in the country being taken through the map.

To have either number raised, write to support@offendersearch.app with your account, what the map is for and the number you need. Both are set for each account.

The error body

Every error has the same shape. Switch on detail.code. Show detail.message to a developer, not to an end user.

403 Forbidden
{
  "detail": {
    "code": "map_not_enabled",
    "message": "The Map API is not turned on for this account. …",
    "dashboardUrl": "https://offendersearch.app/dashboard/map-api",
    "docsUrl": "https://offendersearch.app/docs/map/turn-it-on"
  }
}

Some errors add dashboardUrl, docsUrl, billingUrl or retryAfterSeconds. No error response is billed.

Request errors

CodeStatusCauseWhat to do
invalid_bbox422bbox is missing or is not west,south,east,north, or it was sent together with center.Send four numbers in degrees: south below north, west and east within ±180 and different. Send bbox or center, not both.
invalid_center422center is not lat,lng, or it came without radiusMiles.Send center=lat,lng together with radiusMiles.
invalid_radius422radiusMiles is not a number from 0.1 to 100.Send a radius inside the range.
invalid_zoom422zoom is not a number from 0 to 22.Send the map’s zoom, or leave it out.
invalid_filter422housing or precision has a value that is not listed.Use housed, homeless, incarcerated for housing, and street or any for precision.
invalid_format422format is not json or geojson.Send one of the two.
invalid_detail422detail is not full or count.Send one of the two.
invalid_page422page is below 1, or perPage is not 1 to 100.Send a page from 1 and a page size inside the range.
invalid_shape422The body has both or neither of polygon and route, the wrong number of points, or a buffer outside the range.Send one shape, inside the limits above.

Access errors

CodeStatusCauseWhat to do
—401The key is missing or wrong, or a map browser key was used on a route that does not accept one.Send a valid key in X-API-Key. Use a secret key, from your server, for other routes.
map_not_enabled403The Map API is off for this account.Turn it on. See Turn it on. To build first, send sandbox=true.
map_paused403We have paused the Map API for this account.Write to support@offendersearch.app.
origin_not_allowed403A map browser key was used from a site that is not on its list.Add the site to the key, or call from your server with a secret key. See Access & keys.

Id errors

CodeStatusCauseWhat to do
unknown_marker404The marker id or reference is not one this account was given.Use ids from your own responses, with a key of the same account.
unknown_group404The group id is not one this account was given.The same.
marker_expired410The marker id is older than 24 hours.Request the view again for a new id. For saved links, keep the recordRef.
group_expired410The group id is older than 24 hours.Request the view again for a new id.
record_no_longer_listed410The registry no longer lists the person. Not billed.Remove the pin, and say the record is no longer listed.

Limit errors

CodeStatusCauseWhat to do
map_sweep_limit429The account has used its area limit for the day.Clusters still work: show them and ask the user to try pins tomorrow. If normal use reaches it, ask us to raise it.
map_end_user_limit429One end user has used their area limit for the day.Tell that user. Other users are not affected.
map_busy429Too many map requests at the same moment.Retry after the Retry-After header, which is 1 second. Wait for the map to settle and cancel requests you no longer need.
overloaded429The service is at capacity.Retry after the Retry-After header.

A 429 here is not a charge and not a ban. Wait for the time in Retry-After and send the request again.

Service errors

CodeStatusCauseWhat to do
map_index_not_ready503The map data is not ready to answer yet.Retry shortly.
map_unavailable503The map could not be read just now. Nothing was charged.Retry after the Retry-After header.
map_not_configured503The Map API is not available on this server.Retry. If it continues, write to us.

Turn-on errors

These come only from POST /v1/map/enable and POST /v1/map/disable.

CodeStatusCauseWhat to do
minimum_not_accepted422acceptMinimum was not true.Send {"acceptMinimum": true}.
payment_method_required402There is no card on the account, or it is on the free trial.Add a payment method in the dashboard under Billing, then try again.
payment_failed402The card was declined. Nothing was turned on and nothing was charged.Fix or replace the card, then try again.
business_account_required403The account is a personal account.Use a business account.
admin_required403The dashboard seat is not an admin of the account.Ask an account admin to turn it on, or use a secret key.

Product overview