NewConnect Claude, Gemini, ChatGPT, and other AI agents to API Ninjas via our MCP server →

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

Looking for a detailed income tax calculator (including per-paycheck withholding) instead? Check out our Income Tax Calculator API.

Online
(4.6)

From 6,576 users

2,100+

Application used this API in the last 28 days.

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
430ms441ms492ms781ms1118ms

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

https://api.api-ninjas.com/v2/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)

  • year  required

    The tax year for which to retrieve data

  • regions  optional

    Comma-separated list of regions to filter the response. For United States, specify 2-letter state codes (e.g., AL, CA, NY) or federal for federal tax information only. For Canada, specify 2-letter provincial codes (e.g., ON, BC, QC) or federal for federal tax information only. Multiple regions can be specified (e.g., federal,AL,CA,NY). When specified, filters the response to only include tax information for those regions. If unset, the response will include all regions (federal and all states/provinces).

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

The /v2/incometax endpoint returns a JSON object with the following fields, or an error if the request is unsuccessful.

  • 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 brackets for the given country and year. For the US, brackets are listed for each filing status (single, married, married_separate and head_of_household). For Canada, there are no filing statuses: federal is a single brackets list. Each bracket has a rate (decimal) and the taxable income it covers, min to max in whole dollars. The first bracket starts at 0 (US) or 1 (Canada), each later bracket starts at the previous bracket's max plus 1, and the top bracket's max is the string "Infinity". US responses also include standard_deduction by filing status (single, couple, married_separate, head_of_household).

  • fica Premium only

    The FICA tax rates, including breakdown of social security and medicare percentages and social security cap, for the given country and year (US only).

  • states Premium only

    The state tax rates for the given year (US only), keyed by 2-letter state code. Each state lists brackets for the same four filing statuses as federal (some states also return married_separately, identical to married_separate), plus standard_deduction (single, couple, married_separate, head_of_household; 0 when the state has none) and personal_exemption (single, couple, dependent and type). type is deduction (subtracted from taxable income), credit (subtracted from tax) or none. A few states (such as Ohio) also list additional_tax: fixed amounts added to the bracket tax once taxable income exceeds income_over. States with no income tax on wages return empty bracket lists.

  • provinces Premium only

    The provincial tax rates for the given country and year (Canada only), keyed by 2-letter province code. Each province has a single brackets list (same format as Canadian federal), for example {"ON": {"brackets": [{"rate": 0.0505, "min": 1, "max": 53891}, ...]}}.

Live Demo

Live demo · no API key required
Query parameters
country
regions
year

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v2/incometax?country=US&year=2026&regions=federal,CA
Sample response
{
"country": "US",
"year": 2026,
"federal": {
"single": {
"brackets": [
{
"rate": 0.1,
"min": 0,
"max": 12400
},
"...",
{
"rate": 0.37,
"min": 640601,
"max": "Infinity"
}
]
},
"married": {
"brackets": [
{
"rate": 0.1,
"min": 0,
"max": 24800
},
{
"rate": 0.12,
"min": 24801,
"max": 100800
},
"...",
{
"rate": 0.37,
"min": 768701,
"max": "Infinity"
}
]
},
"married_separate": "...",
"head_of_household": "...",
"standard_deduction": {
"single": 16100,
"couple": 32200,
"married_separate": 16100,
"head_of_household": 24150
}
},
"states": {
"CA": {
"married": {
"brackets": [
{
"rate": 0.01,
"min": 0,
"max": 22912
},
{
"rate": 0.02,
"min": 22913,
"max": 54314
},
"...",
{
"rate": 0.133,
"min": 1536427,
"max": "Infinity"
}
]
},
"single": {
"brackets": [
{
"rate": 0.01,
"min": 0,
"max": 11456
},
"...",
{
"rate": 0.133,
"min": 1000001,
"max": "Infinity"
}
]
},
"married_separate": "...",
"head_of_household": "...",
"standard_deduction": {
"single": 5900,
"couple": 11800,
"married_separate": 5900,
"head_of_household": 11800
},
"personal_exemption": {
"single": 158,
"couple": 316,
"dependent": 491,
"type": "credit"
}
}
},
"fica": {
"fica_social_security_employee": 6.2,
"fica_medicare_employee": 1.45,
"fica_total_employee": 7.65,
"fica_social_security_self_employed": 12.4,
"fica_medicare_self_employed": 2.9,
"fica_total_self_employed": 15.3,
"cap": 184500
}
}

Code Examples

curl -X GET "https://api.api-ninjas.com/v2/incometax?country=US&year=2026&regions=federal,CA" \ -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.

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Income Tax API is not permitted on the free tier. See our pricing page to choose a plan that fits your needs.
  • Sign up for a free account to instantly get your API key, then pass it in the X-Api-Key header on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.
  • Your API requests will simply be denied once you hit your monthly quota — you will never be charged more than the plan you signed up for. To increase your quota, you can upgrade your plan any time on our pricing page.
  • The API responds with a standard HTTP status code and a JSON error message describing the problem. See our error codes reference for the full list of codes and how to resolve each one, or contact support if you need help.
  • The API currently supports the United States (including state income tax) and Canada (including provincial income tax), returning tax bracket data at both the federal and state/provincial levels. For other tax tools, see our Sales Tax API, Property Tax API, and VAT Rates API.
  • Call the /v2/incometax endpoint with the required country (a 2-letter code like US or CA) and year parameters, plus the optional regions parameter to filter results, for example federal,CA,NY for US states or federal,ON,BC for Canadian provinces. See the full parameter reference and live demo on the Income Tax API page.
  • Each response returns the country and year along with a federal object containing tax brackets (with rate, min, and max), by filing status for the US (plus standard_deduction) or as a single list for Canada. Premium responses add states (US, with each state's brackets, standard_deduction, personal_exemption and, for some states, additional_tax), provinces (Canada), and US fica social security and medicare rates. The premium fields require a paid plan, which you can review on the pricing page.
  • It is ideal for building tax estimators, payroll and withholding tools, and financial planning apps that need current or historical federal and state/provincial bracket data. If you need full per-paycheck withholding calculations rather than raw rates, pair it with our Income Tax Calculator API.