Quickstart

All endpoints are open and require no authentication. Make a GET request to any endpoint and you'll receive a JSON response immediately. All endpoints accept limit and offset query parameters for pagination. Responses include a total field indicating the full number of records matching your query, so you can paginate through the complete result set.

$ https://api.plus254.co.ke/v1
Your First Request

Try listing the available datasets:

curl "https://api.plus254.co.ke/v1/datasets?limit=2"
import requests

url = "https://api.plus254.co.ke/v1/datasets"
params = {"limit": 2}

response = requests.get(url, params=params)
print(response.json())
fetch("https://api.plus254.co.ke/v1/datasets?limit=2")
  .then(r => r.json())
  .then(data => console.log(data));
Response
{
  "metadata": {
    "resultset": {
      "count": 45,
      "offset": 0,
      "limit": 2
    }
  },
  "results": [
    {
      "config": "forex_period_average",
      "name": "Monthly Exchange Rates (Period Average)",
      "category": "economy",
      "description": "Monthly exchange rates of major currencies against KES (period average)",
      "source": "Central Bank of Kenya",
      "url": "https://www.centralbank.go.ke/..."
    },
    {
      "config": "tea",
      "name": "Tea Production and Exports",
      "category": "agriculture",
      "description": "Weekly tea auction data",
      "source": "Tea Board of Kenya",
      "url": "https://eatta.co.ke/statistics"
    }
  ]
}
Pagination

All list and data responses are paginated. Use limit and offset to control what you receive.

Parameter Type Default Max Description
category string Filter by topic (economy, agriculture, governance)
limit integer 100 100 Maximum records to return
offset integer 0 Number of records to skip
Common Patterns
Filter by category GET /datasets?category=economy
First page GET /datasets?limit=100&offset=0
Next page GET /datasets?limit=100&offset=100
Last page offset = count - (count % limit)
Explore all endpoints