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 (including per-paycheck withholding) instead? Check out our Income Tax Calculator API.
From 6,576 users
Applications using this API
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
/v2/incometax GET
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
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 rates for the given country and year.
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 country and year (US only).
provincespremium onlyThe provincial tax rates for the given country and year (Canada only).
Sample Request Live Demo!
Try our APIs in the API playground
Sign up for a free API key to get started — no credit card required.
https://api.api-ninjas.com/v2/incometax?country=US&year=2026®ions=federal,CAHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
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 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, and premium responses addstates(US),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.