Docs · API

API reference

Authenticate with header X-Api-Key: ksd_… or query ?api_key=. Base URL: https://www.unified.nestict.com/api/v1

Endpoints

MethodPathDescription
GET/schoolsList/search schools (q, region/county filters, page, per_page)
GET/schools/{code}School by code
GET/regionsAll regions
GET/counties?region_id=Counties
GET/sub-counties?county_id=Sub-counties
GET/statsDirectory totals
GET/postal?q=&county=Postal codes / offices
GET/banks?q=Banks
GET/bank-branches?bank_id=&q=Bank branches
GET/files?q=Public file catalogue (metadata)
GET/meKey info + usage totals

cURL

curl -s -H "X-Api-Key: YOUR_KEY" \
  "https://www.unified.nestict.com/api/v1/schools?q=Alliance&per_page=10"

curl -s -H "X-Api-Key: YOUR_KEY" "https://www.unified.nestict.com/api/v1/schools/12345678"
curl -s -H "X-Api-Key: YOUR_KEY" "https://www.unified.nestict.com/api/v1/regions"
curl -s -H "X-Api-Key: YOUR_KEY" "https://www.unified.nestict.com/api/v1/me"

JavaScript

const res = await fetch('https://www.unified.nestict.com/api/v1/schools?q=Nairobi&per_page=10', {
  headers: { 'X-Api-Key': 'YOUR_KEY', 'Accept': 'application/json' },
});
const data = await res.json();
console.log(data.data);

PHP

$ch = curl_init('https://www.unified.nestict.com/api/v1/stats');
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ['X-Api-Key: YOUR_KEY', 'Accept: application/json'],
]);
echo curl_exec($ch);

Python

import requests
r = requests.get(
  "https://www.unified.nestict.com/api/v1/postal",
  params={"q": "00100"},
  headers={"X-Api-Key": "YOUR_KEY"},
  timeout=30,
)
print(r.json())

More examples: Developers. Manage keys in Dashboard → API keys. Usage: Usage.