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.
/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
- countryrequired- 2-letter country code (e.g., US, CA) 
- yearrequired- The tax year for which to retrieve data 
- federal_onlyoptional- If set to true, returns only federal tax information without state/provincial data. 
Headers
- X-Api-Keyrequired- API Key associated with your account. 
Response
- country- The country for which the tax rates are being retrieved. 
- year- The tax year for which the tax rates are being retrieved. 
- federal- The federal tax rates for the given country and year. 
- ficapremium only- The FICA tax rates for the given country and year (US only). 
- statespremium only- The state tax rates for the given country and year (US only). 
- provincespremium only- The 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=2024Headers
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" \
  -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.