Open a record
The record route, when an open is charged, marker id life, and saved links.
Livehttps://api.offendersearch.appSandboxhttps://sandbox.offendersearch.appThe request
GET /v1/map/records/{markerId} returns the complete record behind a marker. It accepts a marker id, mk_…, or a saved reference, mr_….
curl https://api.offendersearch.app/v1/map/records/mk_Zb3… \
-H "X-API-Key: $OFFENDERSEARCH_KEY"{
"record": { "…the same record object POST /v1/search returns…" },
"recordRef": "mr_k2P…",
"billing": {
"billed": true,
"unit": "map_record_open",
"reason": "first_open_of_this_marker"
},
"notice": "A pin shows a registered address, not a person's current location."
}The body is record — the same record object POST /v1/search returns, defined once in The Record object — plus a lasting recordRef, a billing block and a notice. Every field is in the response table below.
Sex offender map API: GET /v1/map/records/{markerId} request and response fields
The complete record behind a marker or a saved reference. One record open per person per map response, at the account's rate ($0.035 by default): the same marker id again is free, and so is a reference within 24 hours of an open. record_no_longer_listed, test mode and errors are not billed.
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. |
| X-End-User optional | string | Any id you use for the person opening the record. Read when a daily open limit for each end user is set on the account (limits.endUserOpensPerDay); otherwise optional. |
| Field | Type | Description |
|---|---|---|
| markerId required | string | A marker id (mk_…) from a viewport, area or groups answer, or a saved reference (mr_…) from an opened record. |
Response
The record, its lasting reference and the billing outcome.
| Field | Type | Description |
|---|---|---|
| record | Record | The complete record: the same object POST /v1/search returns. Photo links to hosted photos are signed and work in an <img> tag, with no key, for at least 7 days and any number of loads. |
| recordRef | string | A lasting reference, mr_…, for bookmarks, shared links and your own database. It does not expire, and the same account and person always give the same string. Pass it to this route in place of a marker id. |
| billing | MapBilling | Whether this open was charged, and why. |
| sandbox | boolean | Present, and true, only on a test-mode answer. |
| notice | string | A sentence to show with the record, 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_marker | Not a marker id or reference this account was given. |
| 410 | marker_expired | The marker id is older than 24 hours. Request the view again, or open by the recordRef. |
| 410 | record_no_longer_listed | The registry no longer lists the person. Not billed: remove the pin. |
| 429 | map_open_limit | A daily limit on record opens is set for the account or this end user, and it is reached. A record already opened that day still opens; nothing was charged. It resets at 00:00 UTC. |
| 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 record could not be read just now (map_not_configured likewise). Nothing was charged; retry after Retry-After. |
When a record open is charged
A record open is the complete record behind one marker. Opening the same marker again is free. A new map request returns new marker ids, so opening that person from the new result is a new charge.
- One charge for each person in each map response. Opening a marker for the first time is one record open, $0.035.
- The same marker id again is free. Close the panel, open it again, reload the page: no charge. The response says
"reason": "marker_already_opened". - Two pins of one person are one charge. A person with a home pin and a work pin in the same response is charged once.
- A new map response gives new ids. Every viewport or groups response carries new marker ids. Opening the same person from the new response is a new charge.
- A
304gives no new ids. An unchanged view keeps the ids you already have, so re-opening from it stays free.
To keep opens free while a person browses, keep the marker ids from the response you drew and reuse them. Do not call the viewport route again just to open a record.
Marker ids from a route answer open the same way, at the same rate. In a POST /v1/map/routes answer every route shares one response, so a person near several routes is one record open. An account can also have a daily limit on record opens; see Daily limits.
Record open billing: the MapBilling object
Whether this record open was charged, and why. Every GET /v1/map/records/{markerId} answer carries it.
Returned or accepted by GET /v1/map/records/{markerId}.
| Field | Type | Description |
|---|---|---|
| billed | boolean | true when this call was charged as one record open. |
| unit | string one of "map_record_open" | The billing unit: always map_record_open. |
| reason | string one of "first_open_of_this_marker", "marker_already_opened", "saved_reference", "opened_in_the_last_24_hours", "sandbox" | Why. first_open_of_this_marker: billed, the first open of this marker id. marker_already_opened: free, this marker id was opened before. saved_reference: billed, opened by recordRef. opened_in_the_last_24_hours: free, the reference was opened, or the record was opened from a marker, in the last 24 hours. sandbox: free, test mode. |
How long ids last
Marker ids and group ids work for 24 hours, and only for the account they were issued to. After that the route answers 410 marker_expired or 410 group_expired. Request the view again for new ids.
Do not store a marker id in a database or a link. Store the recordRef.
Saved links: recordRef
Every opened record comes with a recordRef. It does not expire. Put it in a bookmark, a shared link or your own database, and open it later with the same route. A saved reference follows the person: when a registry republishes the listing under a new number, the same recordRef still opens that person’s current record.
curl https://api.offendersearch.app/v1/map/records/mr_k2P… \
-H "X-API-Key: $OFFENDERSEARCH_KEY"- Opening by reference is one record open. It is then free for 24 hours.
- A record you just opened from a marker is also free by its reference for 24 hours.
- A reference works only for the account it was issued to.
Photos
Photo links on hosted photos are signed. A link works in an <img> tag, with no key, for at least 7 days, and for as many loads as you like in that time. Use it as it is. To show the photo later than that, open the record again for a fresh link.
Reports
The record carries the recordId that the report route takes. See Verification reports.
Errors
| Code | Status | Cause | What to do |
|---|---|---|---|
unknown_marker | 404 | The id is not one this account was given. | Use an id from your own map responses, with the key of the same account. |
marker_expired | 410 | The marker id is older than 24 hours. | Request the view again for a new id, or use the recordRef. |
record_no_longer_listed | 410 | The registry no longer lists the person. Not billed. | Remove the pin and tell the user the record is no longer listed. |
map_open_limit | 429 | The account, or this end user, has reached a daily limit on record opens. Not billed. | Records already opened today still open. The limit resets at 00:00 UTC. |