Endpoints
Endpoints
GET /
List all available datasets grouped by source slug. Returns the count and metadata for every dataset.
Example request
curl https://api.plus254.dev/ Example response
{
"count": 19,
"groups": {
"centralbank": [
{
"config": "forex_period_average",
"name": "Monthly Exchange Rates (Period Average)",
"description": "Monthly exchange rates of major currencies against KES (period average)",
"source": "Central Bank of Kenya"
}
]
}
} GET /<slug>/<config_name>
Retrieve all records for a specific dataset. The slug and config name correspond to the dataset’s grouping and identifier from the list endpoint.
| Parameter | Type | Description |
|---|---|---|
slug | string | Source group slug, e.g. centralbank |
config_name | string | Dataset config name, e.g. forex_period_average |
Example request
curl https://api.plus254.dev/centralbank/forex_period_average Example response
{
"source": "Central Bank of Kenya",
"description": "Monthly exchange rates of major currencies against KES (period average)",
"url": "https://www.centralbank.go.ke/...",
"data": [
{
"year": 1993,
"month": "january",
"metric": "united states dollar",
"value": 36.23
}
]
} GET /schema/<slug>/<config_name>
Retrieve the column schema for a dataset, including data types, null counts, summary statistics, and sample values.
| Parameter | Type | Description |
|---|---|---|
slug | string | Source group slug, e.g. centralbank |
config_name | string | Dataset config name, e.g. forex_period_average |
Example request
curl https://api.plus254.dev/schema/centralbank/forex_period_average Example response (abbreviated)
{
"config": "forex_period_average",
"slug": "centralbank",
"name": "Monthly Exchange Rates (Period Average)",
"source": "Central Bank of Kenya",
"row_count": 7980,
"columns": [
{
"name": "year",
"type": "int64",
"nullable": false,
"null_count": 0,
"stats": {
"min": 1993,
"max": 2026,
"mean": 2009.7
}
}
]
}