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

(4.6)

From 6,576 users

2,100+

Applications using this API

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


/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

  • 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

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 rates for the given country and year.

  • 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 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
regions
year

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&regions=federal,CA

Headers

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

Sample Response

JSON
{
    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:"..."
    },
    states:{
      CA:{
        married:{
          brackets:[
            {
              rate:0.01,
              min:0,
              max:21512
            },
            {
              rate:0.02,
              min:21512,
              max:50998
            },
            "...",
            {
              rate:0.133,
              min:1442628,
              max:"Infinity"
            }
          ]
        },
        single:{
          brackets:[
            {
              rate:0.01,
              min:0,
              max:10756
            },
            "...",
            {
              rate:0.133,
              min:1000000,
              max:"Infinity"
            }
          ]
        },
        ...:"...",
        standard_deduction:{
          single:5540,
          couple:11080
        },
        personal_exemption:{
          single:149,
          couple:298,
          dependent:461
        }
      }
    },
    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

1 2 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 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, and premium responses add states (US), 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.