Welcome to the PIDA API documentation. This API provides programmatic access to infrastructure development projects under PIDA PAP 1 and PAP 2. All endpoints return JSON data and support CORS for browser-based applications.
Authentication
All API requests require authentication using an API token. Keep your token secure and never share it publicly.
You can authenticate using either method:
- HTTP Header (Recommended):
Authorization: Bearer YOUR_TOKEN - Query Parameter:
?api_token=YOUR_TOKEN
curl -H "Authorization: Bearer YOUR_TOKEN" https://aid.nepad.org/api/v1/api.php/projects
curl https://aid.nepad.org/api/v1/api.php/projects?api_token=YOUR_TOKEN
Available Endpoints
| Endpoint | Method | Description | Response |
|---|---|---|---|
/sectors |
GET | List all active sectors | Array of sector objects |
/subsectors |
GET | List all active subsectors with sector relationships | Array with sector_id mapping |
/statuses |
GET | List all project statuses | Array of status objects |
/stages |
GET | List all project stages (ordered) | Array of stage objects |
/stakeholders |
GET | List all active stakeholders | Array with name and acronym |
/reference-plans |
GET | PIDA PAP 1 & 2 reference plans | Array of plan objects |
/programmes |
GET | List all programmes | Array of programme objects |
/recs |
GET | List Regional Economic Community acronyms | Array of REC acronyms |
/projects |
GET | List projects with pagination and filters | Paginated project data |
/statistics |
GET | Aggregate statistics Enhanced | Summary counts and SDM metrics |
Projects Endpoint (Main Resource)
GET /projects
Retrieve a paginated, filterable list of PIDA infrastructure projects. This is the primary endpoint for accessing project data.
Pagination Parameters
page— Page number (integer, default: 1)per_page— Results per page (integer, default: 20, max: 100)
Filter Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
sector_id |
integer | Filter by sector ID | ?sector_id=3 |
subsector_id |
integer | Filter by subsector ID | ?subsector_id=12 |
status_id |
integer | Filter by project status ID | ?status_id=2 |
stage_id |
integer | Filter by project stage ID (from planning progress) | ?stage_id=5 |
programme_id |
integer | Filter by programme ID | ?programme_id=8 |
rec |
string | Filter by REC acronym | ?rec=ECOWAS |
on_sdm NEW |
mixed | Filter by SDM status. Accepts: 1/0, true/false, yes/no | ?on_sdm=1 |
search |
string | Text search in project name and description | ?search=railway |
Example Requests
GET /projects?page=2&per_page=10
GET /projects?on_sdm=true
GET /projects?sector_id=3&on_sdm=1&rec=SADC&page=1
GET /projects?search=energy&status_id=2&on_sdm=yes
Response Structure
{
"meta": {
"page": 1,
"per_page": 20,
"total": 217,
"filters_applied": ["sector_id", "on_sdm"]
},
"data": [
{
"id": 45,
"project_name": "Trans-Saharan Railway",
"description": "Railway connecting...",
"on_sdm": "1", // NEW: SDM status included
"sector_id": 3,
"sector_name": "Transport",
"subsector_name": "Railway",
"project_status": "In Preparation",
"countries": "Nigeria, Niger, Algeria",
"beneficiary_countries": "Multiple countries",
"rec": "ECOWAS, AMU",
"capex_cost": "15000000000",
"completion_percentage": 75,
"lat": "13.5127",
"lng": "2.1126",
// ... more fields
}
]
}
Statistics Endpoint
GET /statistics Enhanced with SDM
Get aggregate statistics about projects, including new SDM metrics.
Example Request
GET /statistics
Response Structure
{
"data": {
"total_projects": 217,
"total_subsectors": 35,
"total_beneficiary": 48,
"total_recs": 7,
"total_stakeholders": 120,
"sdm_summary": { // NEW: SDM statistics
"projects_on_sdm": 145,
"projects_not_on_sdm": 72,
"percentage_on_sdm": 66.82
}
}
}
Interactive API Tester
Test the API Live
Use this tool to test API endpoints directly from your browser.
Quick Filter Builder (for /projects endpoint)
Response will appear here...
Response Codes
| Code | Description |
|---|---|
200 |
Success - Request processed successfully |
401 |
Unauthorized - Invalid or missing API token |
404 |
Not Found - Unknown endpoint |
500 |
Server Error - Database connection or query failed |
Rate Limiting
Currently, there are no rate limits on the API. However, please be respectful of server resources and implement appropriate caching in your applications.
Changelog
- v1.1 (Latest) - Added
on_sdmfilter for projects, enhanced statistics with SDM metrics - v1.0 - Initial release with core endpoints