API Documentation

Access nationwide sex offender registry data via our REST API. Search by name, location, or coordinates with comprehensive filtering.

Quick Start

  1. Create a free account (100 API calls/month included)
  2. Generate an API key from your Dashboard
  3. Include the key in your requests via the X-API-Key header
Example request
curl -H "X-API-Key: pr_live_your_key_here" \
  "https://communityguardapi.com/api/data/search/?lastName=Smith&state=FL&page_size=10"

Authentication

All API requests require an API key. Include your key in the X-API-Key request header.

Header:X-API-Key: pr_live_xxxxxxxxxxxx

API keys use the pr_live_ prefix and are 60 characters long. Keys are hashed with SHA-256 and stored securely. The full key is only shown once at creation.

Base URL

https://communityguardapi.com/api/data/

Rate Limits & Usage

Free Tier
100
calls/month
With Payment
Unlimited
pay-as-you-go
Rate
No limit
requests/second

Usage headers are included in every response: X-API-Usage, X-API-Limit, X-API-Remaining.

Endpoints

Integration Examples

JavaScript / Node.js

const response = await fetch(
  'https://communityguardapi.com/api/data/search/?lastName=Smith&state=FL&page_size=10',
  {
    headers: {
      'X-API-Key': 'pr_live_your_key_here',
      'Content-Type': 'application/json',
    },
  }
);
const data = await response.json();
console.log(`Found ${data.pagination.total_count} offenders`);
data.results.forEach(offender => {
  console.log(`${offender.full_name} - ${offender.city}, ${offender.state_id}`);
});

Python

import requests

API_KEY = "pr_live_your_key_here"
BASE_URL = "https://communityguardapi.com/api/data"

# Search by name and state
response = requests.get(
    f"{BASE_URL}/search/",
    headers={"X-API-Key": API_KEY},
    params={"lastName": "Smith", "state": "FL", "page_size": 10},
)
data = response.json()
print(f"Found {data['pagination']['total_count']} offenders")

# Find nearby offenders
nearby = requests.get(
    f"{BASE_URL}/offenders/nearby/",
    headers={"X-API-Key": API_KEY},
    params={"latitude": 25.7617, "longitude": -80.1918, "radius": 2},
)
for offender in nearby.json():
    print(f"{offender['full_name']} - {offender['distance_miles']} mi away")

cURL

# Search by name
curl -H "X-API-Key: pr_live_your_key_here" \
  "https://communityguardapi.com/api/data/search/?firstName=John&lastName=Doe&state=NY"

# Get offender by ID
curl -H "X-API-Key: pr_live_your_key_here" \
  "https://communityguardapi.com/api/data/offenders/12345/"

# Find nearby offenders (within 3 miles)
curl -H "X-API-Key: pr_live_your_key_here" \
  "https://communityguardapi.com/api/data/offenders/nearby/?latitude=40.7128&longitude=-74.0060&radius=3"

# Get statistics
curl -H "X-API-Key: pr_live_your_key_here" \
  "https://communityguardapi.com/api/data/stats/?state=FL"

Error Codes

StatusCodeDescription
400bad_requestMissing or invalid parameters
401invalid_api_keyAPI key is invalid or revoked
402usage_limit_exceededFree tier exceeded, payment method required
404not_foundOffender not found
500server_errorInternal server error

Support

API Status

Check real-time API status and uptime.

All Systems Operational

Email Support

Get help with integration or billing.

support@communityguardapi.com

Swagger / OpenAPI

Interactive API docs with try-it-out.

Open Swagger UI

Start Building Today

100 free API calls per month. No credit card required.

Get Your API Key