Sex Offenders

GRATIS CON POSSIBILITÀ DI UPGRADE
Da Offenders IO | Aggiornamento לפני יום | Data
Popolarità

8.8 / 10

Latenza

2,491ms

Livello di servizio

100%

Health Check

100%

Torna a tutti i tutorial (1)

How to Use Offenders.io Sex Offender API and Sex Offender Database

This API supports two types of searches: GIS Search and Attribute Search.

GIS Search

You can use the Javascript example below to fetch the data from Offenders.io’s Sex Offender API endpoint, this example demonstrates how you can use our endpoint to use GIS search that is based on lat, lng and radius.

You can further filter down your result by firstName,lastName, city, state and zipcode

JavaScript

fetch(‘https://api.offenders.io/sexoffender?lat=30.967139&lng=-91.116236&radius=2&key={YOUR_API_KEY}&firstName=Michael’, {
method: ‘GET’,
headers: {
‘Content-Type’: ‘application/json’,
}
})
.then(response => response.json())
.then(data => {
console.log(data)
});
Attribute Search

Offenders.io’s Sex Offender API endpoint also supports general searches by offenders’firstName, lastName, city, state and zipcode. You can combine them however you like, as long as there’s at least one of them in the query param.

The Attribute Search supports an additional &mode=extensive param, which will pull additional datasets including the offender’s photo URL and source link to the State agency website. Please note this will come with a significant response time increase compared to the normal mode and should only be used if needed (~ 2s+ response time).

JavaScript

fetch(‘https://api.offenders.io/sexoffender?key={YOUR_API_KEY}&firstName=Michael&zipcode=12345’, {
method: ‘GET’,
headers: {
‘Content-Type’: ‘application/json’,
}
})
.then(response => response.json())
.then(data => {
console.log(data)
});

=======

QUERY PARAMS
firstName
string
First name of the offender

lastName
string
Last name of the offender

city
string
City the offender lives in

state
string
State the offender lives in, please use full State name (e.g. California instead of CA)

zipcode
string
Postal Zip Code where the offender lives in

lat
string
Latitude of the center of the search. Whenever this param is presented together with lng, the endpoint will perform GIS based search. You should also supply a radius to your search, otherwise the system will default to 1mi radius.

lng
string
Longitude of the center of the search. Whenever this param is presented together with lat, the endpoint will perform GIS based search. You should also supply a radius to your search, otherwise the system will default to 1mi radius.

mode
string
Only valid with Attribute Search, you can use ?mode=extensive to query extensive datasets, this will include offender’s image URL and source link to State agency website. Please note this will come will significant response time increase and should not be used in time sensitive application.