List Countries
Retrieve all 54 African countries supported by the AfroTax API.
GET
https://afrotools.com/api/tax
Authentication required. Pass your API key via
x-api-key header. Learn more
Parameters
No parameters required. Call the endpoint without any query parameters to receive the full list of supported countries.
Response Fields
| Field | Type | Description |
|---|---|---|
| countries | array | Array of country objects. |
| countries[].code | string | ISO 3166-1 alpha-2 country code. |
| countries[].name | string | Full country name in English. |
| countries[].currency | string | ISO currency code. |
| countries[].tax_types | array | Supported tax types (e.g., income, corporate). |
| countries[].tax_year | string | Current tax year. |
| count | number | Total number of countries. |
Error Responses
| Status | Code | Description |
|---|---|---|
| 401 | missing_api_key | No API key was provided. |
| 429 | rate_limit_exceeded | Rate limit exceeded. |
Request Examples
curl -X GET "https://afrotools.com/api/tax" \
-H "x-api-key: afro_live_your_key_here"
const res = await fetch("https://afrotools.com/api/tax", {
headers: { "x-api-key": "afro_live_your_key_here" }
});
const data = await res.json();
console.log(data.countries);
import requests
resp = requests.get(
"https://afrotools.com/api/tax",
headers={"x-api-key": "afro_live_your_key_here"}
)
data = resp.json()
for country in data["data"]["countries"]:
print(country["name"], country["code"])
const axios = require("axios");
const { data } = await axios.get(
"https://afrotools.com/api/tax",
{ headers: { "x-api-key": "afro_live_your_key_here" } }
);
console.log(data.data.countries);
$ch = curl_init("https://afrotools.com/api/tax");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: afro_live_your_key_here"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
print_r($data["data"]["countries"]);
Response (200 OK)
{
"success": true,
"data": {
"countries": [
{
"code": "NG",
"name": "Nigeria",
"currency": "NGN",
"tax_types": ["income", "corporate", "withholding", "capital_gains"],
"tax_year": "2026"
},
{
"code": "KE",
"name": "Kenya",
"currency": "KES",
"tax_types": ["income", "corporate", "withholding"],
"tax_year": "2026"
},
{
"code": "ZA",
"name": "South Africa",
"currency": "ZAR",
"tax_types": ["income", "corporate", "withholding", "capital_gains"],
"tax_year": "2026"
}
],
"count": 54
}
}