This page will help you get started with Offenders.io API.
If you don't have an API key yet, contact us to obtain one. Or you can self-serve your API key via the RapidAPI platform https://rapidapi.com/offenders-offenders-default/api/sex-offenders
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
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)
});
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.
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)
});