AID Platform

API Service

Access infrastructure project data programmatically. RESTful JSON endpoints for developers, researchers, and data integrators.

Base URL https://aid.nepad.org/aid/public/api

Authentication

API Key Required

All API endpoints require a valid key. There are no public/unauthenticated endpoints. Pass your key in every request using one of these methods:

// Preferred — Authorization header (Bearer) Authorization: Bearer aid_xxxxxxxxxxxxxxxxxxxx // Alternative — X-API-Key header X-API-Key: aid_xxxxxxxxxxxxxxxxxxxx // Fallback — query string (less secure) GET /endpoint?api_key=aid_xxxxxxxxxxxxxxxxxxxx

Keys follow the format aid_ followed by 64 hex characters. To create a key: register for a free account, then go to My Profile → API Keys to generate one instantly.

Error Responses

// 401 — Missing or invalid key { "error": "Unauthorized", "message": "A valid API key is required..." } // 429 — Rate limit exceeded { "error": "Too Many Requests", "reset_at": "2026-01-01 14:59:59", "retry_after": 1847 }

Rate Limits

All keys share the same limit. Limits reset at the top of each clock hour.

500
Requests / Hour (all keys)
50
Max Results / Request
1 hr
Window resets

Every response includes rate-limit headers so you can self-throttle:

X-RateLimit-Limit: 500 X-RateLimit-Remaining: 493 X-RateLimit-Reset: 1751234400 (Unix timestamp of window reset)

Endpoints

All endpoints return JSON. Responses include standard HTTP status codes.

GET /country-projects.php Projects by country

Retrieve infrastructure projects filtered by country name.

Parameters

NameTypeDescription
countrystring requiredCountry name (e.g. "Kenya", "Nigeria")
limitintegerMax results (1-100, default 50)

Example Request

GET https://aid.nepad.org/aid/public/api/country-projects.php?country=Kenya&limit=10

Example Response

{ "success": true, "country": "Kenya", "total": 45, "projects": [ { "id": 123, "project_name": "Lamu Port-South Sudan-Ethiopia Transport", "sector": "Transport", "total_investment": 25000000000, "status": "Active" } ] }
GET /country-stats.php Country statistics

Get aggregated infrastructure statistics for a specific country including project count, total investment, and sector breakdown.

Parameters

NameTypeDescription
countrystring requiredCountry name

Example Request

GET https://aid.nepad.org/aid/public/api/country-stats.php?country=Nigeria
GET /region-stats.php Regional statistics

Aggregated statistics for a region (e.g. ECOWAS, SADC, EAC).

Parameters

NameTypeDescription
regionstring requiredRegion name (e.g. "ECOWAS", "SADC")
GET /federated-search.php Federated project search

Full-text search across all projects with optional filters.

Parameters

NameTypeDescription
qstring requiredSearch query
sectorstringFilter by sector
countrystringFilter by country
limitintegerMax results (default 20)

Example Request

GET https://aid.nepad.org/aid/public/api/federated-search.php?q=solar+energy§or=Energy&limit=5
POST /ai-search.php AI-powered natural language search

Use natural language to search the database. Powered by AI to understand complex queries like "transport projects in West Africa over $1B".

Request Body

{ "query": "renewable energy projects in East Africa", "limit": 10 }

Notes

This endpoint requires authentication. Responses may take 2-5 seconds due to AI processing.

GET /search-suggest.php Autocomplete suggestions

Get autocomplete suggestions as the user types. Returns matching project names, countries, and sectors.

Parameters

NameTypeDescription
qstring requiredPartial search text (min 2 chars)
GET /geo-projects.php Geo coordinates & metadata for mapping

Retrieve project geographic data including lat/lng coordinates, location geometry, sector, corridor, programme — ideal for GIS mapping and spatial analysis.

Parameters

NameTypeDescription
countrystringFilter by country name
sectorstringFilter by sector name (e.g. "Transport", "Energy")
programmestringFilter by programme name
corridorstringFilter by corridor/reference plan name
has_coordsstringSet to "1" to return only projects with lat/lng
geometrystringSet to "1" to include full location_map geometry (can be large)
limitintegerMax results (1-500, default 200)
offsetintegerPagination offset (default 0)

Example Request

GET https://aid.nepad.org/aid/public/api/geo-projects.php?has_coords=1§or=Transport&limit=50

Example Response

{ "success": true, "total": 127, "limit": 50, "offset": 0, "projects": [ { "id": 42, "name": "Lamu Port-South Sudan-Ethiopia Transport", "pida_code": "LAPSSET", "lat": -2.27, "lng": 40.9, "sector": "Transport", "subsector": "Ports", "programme": "PIDA PAP 1", "corridor": "PIDA PAP", "countries": "Kenya, South Sudan, Ethiopia", "capex_usd": 25000000000 } ] }

Notes

Use has_coords=1 when building a map to exclude projects without coordinates. Add geometry=1 only if you need the full route/polygon data (responses can be several MB).

Code Examples

Quick-start examples for common languages.

JavaScript (Fetch)

// Always pass your API key in the Authorization header const response = await fetch( 'https://aid.nepad.org/aid/public/api/country-projects.php?country=Kenya', { headers: { 'Authorization': 'Bearer aid_your_key_here' } } ); const data = await response.json(); console.log(data.projects);

Python (requests)

# pip install requests import requests HEADERS = {"Authorization": "Bearer aid_your_key_here"} resp = requests.get("https://aid.nepad.org/aid/public/api/country-projects.php", params={"country": "Nigeria"}, headers=HEADERS) projects = resp.json()["projects"]

cURL

curl -s -H "Authorization: Bearer aid_your_key_here" \ "https://aid.nepad.org/aid/public/api/country-projects.php?country=Ghana"

Support & Contact

For API issues, feature requests, or partnership inquiries, contact us at [email protected] or visit the About page.