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.
From 6,576 users
Application used this API in the last 28 days.
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 430ms | 441ms | 492ms | 781ms | 1118ms |
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
countryrequired2-letter country code (e.g., US, CA)
yearrequiredThe tax year for which to retrieve data
regionsoptionalComma-separated list of regions to filter the response. For United States, specify 2-letter state codes (e.g.,
AL, CA, NY) orfederalfor federal tax information only. For Canada, specify 2-letter provincial codes (e.g.,ON, BC, QC) orfederalfor 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-KeyrequiredAPI 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.
countryThe country for which the tax rates are being retrieved.
yearThe tax year for which the tax rates are being retrieved.
federalThe federal tax brackets for the given country and year. For the US, brackets are listed for each filing status (
single,married,married_separateandhead_of_household). For Canada, there are no filing statuses:federalis a singlebracketslist. Each bracket has arate(decimal) and the taxable income it covers,mintomaxin whole dollars. The first bracket starts at 0 (US) or 1 (Canada), each later bracket starts at the previous bracket'smaxplus 1, and the top bracket'smaxis the string"Infinity". US responses also includestandard_deductionby filing status (single,couple,married_separate,head_of_household).ficaPremium onlyThe FICA tax rates, including breakdown of social security and medicare percentages and social security cap, for the given country and year (US only).
statesPremium onlyThe 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 returnmarried_separately, identical tomarried_separate), plusstandard_deduction(single,couple,married_separate,head_of_household; 0 when the state has none) andpersonal_exemption(single,couple,dependentandtype).typeisdeduction(subtracted from taxable income),credit(subtracted from tax) ornone. A few states (such as Ohio) also listadditional_tax: fixed amounts added to the bracket tax once taxable income exceedsincome_over. States with no income tax on wages return empty bracket lists.provincesPremium onlyThe provincial tax rates for the given country and year (Canada only), keyed by 2-letter province code. Each province has a single
bracketslist (same format as Canadianfederal), for example{"ON": {"brackets": [{"rate": 0.0505, "min": 1, "max": 53891}, ...]}}.
Live Demo
Code Examples
curl -X GET "https://api.api-ninjas.com/v2/incometax?country=US&year=2026®ions=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
Can I use the Income Tax API for commercial purposes?
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.How do I get an API key and start using the Income Tax API?
Sign up for a free account to instantly get your API key, then pass it in theX-Api-Keyheader on every request. The documentation above includes ready-to-run examples in cURL, Python, JavaScript, Node.js, and more.What happens if I exceed my quota for the month?
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.What happens if a request to the Income Tax API fails?
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.Which countries and tax levels does the Income Tax API cover?
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.How do I query income tax rates for a specific region and year?
Call the/v2/incometaxendpoint with the requiredcountry(a 2-letter code like US or CA) andyearparameters, plus the optionalregionsparameter to filter results, for examplefederal,CA,NYfor US states orfederal,ON,BCfor Canadian provinces. See the full parameter reference and live demo on the Income Tax API page.What does the Income Tax API response include?
Each response returns thecountryandyearalong with afederalobject containing tax brackets (withrate,min, andmax), by filing status for the US (plusstandard_deduction) or as a single list for Canada. Premium responses addstates(US, with each state's brackets,standard_deduction,personal_exemptionand, for some states,additional_tax),provinces(Canada), and USficasocial security and medicare rates. The premium fields require a paid plan, which you can review on the pricing page.What are some use cases for the Income Tax API?
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.
Explore API integration use cases for recommended APIs and workflow examples.