Country Info
Get detailed tax information for a specific country, including brackets, rates, and deduction rules.
GET
https://afrotools.com/api/tax?country={code}
Authentication required. Pass your API key via
x-api-key header. Learn more
Request Parameters
| Parameter | Type | Description |
|---|---|---|
| country required | string | ISO 3166-1 alpha-2 country code (e.g., NG, KE, ZA). |
| type optional | string | Filter to a specific tax type: income, corporate, withholding. Defaults to all. |
Response Fields
| Field | Type | Description |
|---|---|---|
| country | object | Country information. |
| country.code | string | ISO country code. |
| country.name | string | Country name. |
| country.currency | string | Local currency code. |
| income_tax | object | Income tax brackets and rules. |
| income_tax.brackets | array | Progressive tax brackets with from, to, and rate. |
| corporate_tax | object | Corporate tax rate and rules. |
| pension | object | Pension/social security rules and rates. |
| tax_year | string | Current tax year. |
| last_updated | string | ISO 8601 timestamp of last data update. |
Error Responses
| Status | Code | Description |
|---|---|---|
| 400 | invalid_country | The country code is not supported. |
| 401 | missing_api_key | No API key was provided. |
Request Examples
curl -X GET "https://afrotools.com/api/tax?country=NG" \
-H "x-api-key: afro_live_your_key_here"
const res = await fetch(
"https://afrotools.com/api/tax?country=NG",
{ headers: { "x-api-key": "afro_live_your_key_here" } }
);
const data = await res.json();
console.log(data);
import requests
resp = requests.get(
"https://afrotools.com/api/tax",
params={"country": "NG"},
headers={"x-api-key": "afro_live_your_key_here"}
)
print(resp.json())
const axios = require("axios");
const { data } = await axios.get(
"https://afrotools.com/api/tax",
{
params: { country: "NG" },
headers: { "x-api-key": "afro_live_your_key_here" }
}
);
console.log(data);
$ch = curl_init("https://afrotools.com/api/tax?country=NG");
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);
print_r(json_decode($response, true));
Response (200 OK)
{
"success": true,
"data": {
"country": {
"code": "NG",
"name": "Nigeria",
"currency": "NGN"
},
"income_tax": {
"brackets": [
{ "from": 0, "to": 300000, "rate": 7 },
{ "from": 300001, "to": 600000, "rate": 11 },
{ "from": 600001, "to": 1100000, "rate": 15 },
{ "from": 1100001, "to": 1600000, "rate": 19 },
{ "from": 1600001, "to": 3200000, "rate": 21 },
{ "from": 3200001, "to": null, "rate": 24 }
],
"relief": {
"consolidated": 200000,
"percentage_of_gross": 1
}
},
"corporate_tax": {
"standard_rate": 30,
"small_company_rate": 20,
"small_company_threshold": 25000000
},
"pension": {
"employee_rate": 8,
"employer_rate": 10,
"mandatory": true
},
"tax_year": "2026",
"last_updated": "2026-01-15T00:00:00Z"
}
}