Holiday Sale! Get over 30% off when you subscribe to an annual plan!

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.

(4.6)

From 6,576 users

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
421ms453ms504ms691ms1365ms

Didn't find what you were looking for? Suggest an improvement


/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

  • country  required

    2-letter country code (e.g., US, CA)

  • region  optional

    2-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.

  • year  required

    The tax year for which to retrieve data

  • federal_only  optional

    If set to true, returns only federal tax information without state/provincial data. Set to false by default.

Headers

  • X-Api-Key  required

    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.

  • fica premium only

    The FICA tax rates for the given country and year (US only).

  • states premium only

    The state tax rates for the given country and year (US only).

  • provinces premium only

    The provincial tax rates for the given country and year (Canada only).

Sample Request Live Demo!

country
region
year
federal_only

Try this API endpoint with all available parameters in our API playground

https://api.api-ninjas.com/v1/incometax?country=US&year=2024&region=AL&federal_only=false

Headers

X-Api-KeyLog in or sign up to get your API Key

Sample Response

JSON
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&region=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.