🚀 Quick Start
Get started with the Emergency Contacts API in just a few lines of code:
JavaScript (Browser)
// Include the API client
<script src="https://your-api.pages.dev/emergency-contacts-api.js"></script>
// Initialize and get emergency contacts
const api = new EmergencyContactsAPI();
const contacts = await api.getEmergencyContacts();
// Filter for women's services
const womensServices = await api.getEmergencyContacts({
manualRegion: 'jakarta',
filters: {
target_demographic: 'women',
free_only: true
}
});
console.log('Emergency contacts:', contacts);
cURL
# Get all emergency contacts
curl -X GET "https://your-api.pages.dev/api/v1/emergency-contacts.json"
# Get Jakarta contacts only
curl -X GET "https://your-api.pages.dev/api/v1/regions/jakarta.json"
# Check API health
curl -X GET "https://your-api.pages.dev/api/v1/health-check.json"
Python
import requests
# Get emergency contacts
response = requests.get('https://your-api.pages.dev/api/v1/emergency-contacts.json')
data = response.json()
print(f"Found {len(data['regions'])} regions")
for region in data['regions']:
print(f"- {region['name']}: {len(region['contacts'])} service categories")