Section 03
Code examples
curl "https://api.mapafrique.app/v1/locations?category=pharmacy_clinic&limit=5" \
-H "X-MapAfrique-Key: YOUR_KEY"
import requests
headers = {"X-MapAfrique-Key": "YOUR_KEY"}
response = requests.get(
"https://api.mapafrique.app/v1/locations",
params={"category": "pharmacy_clinic", "limit": 5},
headers=headers
)
data = response.json()
print(f"Found {data['count']} locations")
for loc in data["locations"]:
print(f" {loc['name']} — {loc['city']}")
const response = await fetch(
"https://api.mapafrique.app/v1/locations?category=pharmacy_clinic&limit=5",
{ headers: { "X-MapAfrique-Key": "YOUR_KEY" } }
);
const data = await response.json();
console.log(`Found ${data.count} locations`);
data.locations.forEach(loc => {
console.log(` ${loc.name} — ${loc.city}`);
});