Access real-time Nigeria security data programmatically. Build safer applications with our RESTful API.
Get API KeyAll API requests require authentication via an API key. Include your API key in the X-API-Key header.
curl -H "X-API-Key: sj_live_12345abcdef67890" https://safejourney.ai/api/v1/incidents/api/v1/incidentsRetrieve security incidents with optional filtering
statestringFilter by Nigerian state name
typestringFilter by incident type (KIDNAPPING, BANDITRY, etc.)
daysnumberNumber of days to look back (default: 30)
limitnumberMaximum results to return (default: 50, max: 500)
roadstringFilter by road/highway name
{
"success": true,
"data": {
"incidents": [
{
"id": "clx...",
"type": "KIDNAPPING",
"state": "Kaduna",
"location": "Abuja-Kaduna Expressway",
"latitude": 10.5265,
"longitude": 7.4384,
"date": "2026-02-28T14:30:00Z",
"title": "Travellers kidnapped on highway",
"killed": 0,
"kidnapped": 8,
"rescued": 0,
"injured": 2
}
],
"count": 1
},
"meta": {
"requestId": "abc123",
"timestamp": "2026-03-01T12:00:00Z",
"credits_remaining": 95
}
}curl -X GET "https://safejourney.ai/api/v1/incidents?state=Kaduna&days=7" \ -H "X-API-Key: sj_live_12345abcdef67890"
import requests
headers = {"X-API-Key": "sj_live_12345abcdef67890"}
params = {"state": "Kaduna", "days": 7}
response = requests.get(
"https://safejourney.ai/api/v1/incidents",
headers=headers,
params=params
)
data = response.json()
print(data)const response = await fetch(
'https://safejourney.ai/api/v1/incidents?state=Kaduna&days=7',
{
headers: {
'X-API-Key': 'sj_live_12345abcdef67890'
}
}
);
const data = await response.json();
console.log(data);/api/v1/state-riskGet security risk scores for Nigerian states
statestringSpecific state name (returns all states if omitted)
{
"success": true,
"data": {
"states": [
{
"state": "Kaduna",
"risk_score": 7.8,
"incident_count": 42,
"killed": 23,
"kidnapped": 67,
"injured": 15,
"trend": "up"
}
],
"period_days": 30
},
"meta": {
"requestId": "def456",
"timestamp": "2026-03-01T12:00:00Z",
"credits_remaining": 94
}
}curl -X GET "https://safejourney.ai/api/v1/state-risk?state=Kaduna" \ -H "X-API-Key: sj_live_12345abcdef67890"
import requests
headers = {"X-API-Key": "sj_live_12345abcdef67890"}
response = requests.get(
"https://safejourney.ai/api/v1/state-risk",
headers=headers,
params={"state": "Kaduna"}
)
data = response.json()
print(f"Risk Score: {data['data']['states'][0]['risk_score']}")const response = await fetch(
'https://safejourney.ai/api/v1/state-risk?state=Kaduna',
{
headers: {
'X-API-Key': 'sj_live_your_api_key_here'
}
}
);
const data = await response.json();
console.log('Risk Score:', data.data.states[0].risk_score);/api/v1/route-riskCalculate risk score for a specific route
from_statestringOrigin state name
to_statestringDestination state name
from_latnumberOrigin latitude
from_lngnumberOrigin longitude
to_latnumberDestination latitude
to_lngnumberDestination longitude
{
"success": true,
"data": {
"risk_score": 6.5,
"incident_count": 18,
"casualties": {
"killed": 12,
"kidnapped": 34,
"injured": 8
},
"recent_incidents": [],
"road_segments_affected": 3,
"safest_time_of_day": "Morning (6AM-12PM)",
"analysis_period_days": 90
}
}curl -X GET "https://safejourney.ai/api/v1/route-risk?from_state=Lagos&to_state=Abuja" \ -H "X-API-Key: sj_live_12345abcdef67890"
/api/v1/roadsList monitored roads with incident counts and risk levels
{
"success": true,
"data": {
"roads": [
{
"road": "Abuja-Kaduna Expressway",
"states": [
"Kaduna",
"FCT"
],
"incident_count": 28,
"casualties": {
"killed": 15,
"kidnapped": 42,
"injured": 10
},
"risk_level": "HIGH",
"risk_score": 8.2
}
],
"total_monitored": 45,
"period_days": 90
}
}curl -X GET "https://safejourney.ai/api/v1/roads" \ -H "X-API-Key: sj_live_12345abcdef67890"
/api/v1/alerts/subscribeSubscribe to real-time security alerts
webhook_urlstringWebhook URL for alerts (either this or telegram_chat_id)
telegram_chat_idstringTelegram chat ID for alerts
statesarrayArray of state names to monitor
roadsarrayArray of road names to monitor
min_severitystringMinimum severity: LOW, MEDIUM, HIGH, CRITICAL
{
"success": true,
"data": {
"subscription_id": "sub_abc123",
"states": [
"Kaduna",
"Kano"
],
"roads": [
"Abuja-Kaduna Expressway"
],
"min_severity": "HIGH",
"webhook_url": "https://example.com/webhook",
"active": true
}
}curl -X POST "https://safejourney.ai/api/v1/alerts/subscribe" \
-H "X-API-Key: sj_live_12345abcdef67890" \
-H "Content-Type: application/json" \
-d '{
"webhook_url": "https://example.com/webhook",
"states": ["Kaduna", "Kano"],
"min_severity": "HIGH"
}'import requests
headers = {
"X-API-Key": "sj_live_12345abcdef67890",
"Content-Type": "application/json"
}
payload = {
"webhook_url": "https://example.com/webhook",
"states": ["Kaduna", "Kano"],
"min_severity": "HIGH"
}
response = requests.post(
"https://safejourney.ai/api/v1/alerts/subscribe",
headers=headers,
json=payload
)
data = response.json()
print(f"Subscription ID: {data['data']['subscription_id']}")Rate limits reset daily at midnight UTC. Exceeding your limit returns a 429 status code.
Get your API key and start integrating SafeJourney data into your application today.
Get Started