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

ParameterTypeDescription
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

FieldTypeDescription
countryobjectCountry information.
country.codestringISO country code.
country.namestringCountry name.
country.currencystringLocal currency code.
income_taxobjectIncome tax brackets and rules.
income_tax.bracketsarrayProgressive tax brackets with from, to, and rate.
corporate_taxobjectCorporate tax rate and rules.
pensionobjectPension/social security rules and rates.
tax_yearstringCurrent tax year.
last_updatedstringISO 8601 timestamp of last data update.

Error Responses

StatusCodeDescription
400invalid_countryThe country code is not supported.
401missing_api_keyNo 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" } }