Income Tax API
The Income Tax API provides detailed information about current and historical income tax rates for different countries.
Currently this API supports United States (including state income tax) and Canada (including provincial income tax). If you would like to see other countries added, please let us know.
Looking for a detailed income tax calculator instead? Check out our Income Tax Calculator API.
Checking API status...
/v1/incometax GET
https://api.api-ninjas.com/v1/incometax
Returns comprehensive income tax information including tax brackets and rates at both federal and state/provincial levels (where applicable).
Parameters
countryrequired2-letter country code (e.g., US, CA)
regionoptional2-letter state code for the US (e.g., AL, CA, NY) or 2-letter provincial code for Canada (e.g., ON, BC, QC). When specified, returns tax information for that specific region.
yearrequiredThe tax year for which to retrieve data
federal_onlyoptionalIf set to
true, returns only federal tax information without state/provincial data. Set tofalseby default.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
countryThe country for which the tax rates are being retrieved.
yearThe tax year for which the tax rates are being retrieved.
federalThe federal tax rates for the given country and year.
ficapremium onlyThe FICA tax rates for the given country and year (US only).
statespremium onlyThe state tax rates for the given country and year (US only).
provincespremium onlyThe provincial tax rates for the given country and year (Canada only).
Sample Request Live Demo!
https://api.api-ninjas.com/v1/incometax?country=US&year=2024®ion=ALHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
"country": "US",
"year": "2024",
"federal": {
"single": {
"brackets": [
{
"rate": 0.1,
"min": 1,
"max": 11600
},
{
"rate": 0.12,
"min": 11601,
"max": 47150
},
{
"rate": 0.22,
"min": 47151,
"max": 100525
},
{
"rate": 0.24,
"min": 100526,
"max": 191950
},
{
"rate": 0.32,
"min": 191951,
"max": 243725
},
{
"rate": 0.35,
"min": 243726,
"max": 609350
},
{
"rate": 0.37,
"min": 609351,
"max": "Infinity"
}
]
},
"...": "..."
}
}Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/incometax?country=US&year=2024®ion=AL" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.