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

Sales Tax API

The Sales Tax API provides accurate and detailed sales tax breakdowns for every ZIP code, city, and state in the United States, spanning over 12,100 tax jurisdictions.

It also answers the question that comes before the rate lookup: whether you are required to register in a state at all. Economic nexus thresholds are covered for all 50 states and DC.

To calculate sales tax for a given amount, please use the Sales Tax Calculator API.

For VAT rates of European Union countries, please use the VAT Rates API.

Available endpoints:

  • /v1/salestax - Look up sales tax rates by ZIP code, city, or state
  • /v1/salestaxnexus - Check economic nexus thresholds and whether a seller has crossed them
(4.7)

From 10,182 users

2,700+

Applications using this API

API Status

Online - All Systems Operational

API Response Times

Average
P50
P75
P90
P95
276ms297ms324ms701ms1082ms

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

https://api.api-ninjas.com/v1/salestax

Returns one or more sales tax breakdowns by ZIP code according to the specified parameters. Each breakdown includes the state sales tax (if any), county sales tax (if any), city sales tax (if any), and any additional special sales taxes. All tax values are presented in decimals (e.g. 0.1 means 10% tax).

Parameters

Exactly one of the following must be set: zip_code or (city + state)

  • zip_code  optional

    Valid US ZIP code.

  • street_address  optional

    Street address (e.g. 9641 Sunset Blvd). Used together with city and state for the most accurate lookup.

  • city  optional

    City name.

  • state  optional

    State name.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON array of objects, each containing the following fields, or an error if the request is unsuccessful.

  • street_address

    The street address from the request. Only returned when the street_address parameter is provided.

  • zip_code

    The ZIP code for which tax information is returned.

  • state_rate

    State sales tax rate as a decimal.

  • city_rate Premium only

    City sales tax rate as a decimal.

  • county_rate Premium only

    County sales tax rate as a decimal.

  • additional_rate Premium only

    Additional special district sales tax rate as a decimal. Some local governments may have multiple additional rates, in which case this field will contain the sum of all additional rates.

  • total_rate Premium only

    Total combined sales tax rate of state, county, city, and additional rates as a decimal.

Sample Request Live Demo!

street_address
zip_code
city
state

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/v1/salestax?zip_code=90210&street_address=9641%20Sunset%20Blvd

Headers

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

Sample Response

JSON
[
    {
      street_address:"9641 Sunset Blvd",
      zip_code:"90210",
      state_rate:"0.06",
      city_rate:"0.01",
      county_rate:"0.0025",
      additional_rate:"0.025",
      total_rate:"0.0975"
    }
]

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/salestax?zip_code=90210" \ -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.

Premium only

https://api.api-ninjas.com/v1/salestaxnexus

Returns US sales tax economic nexus thresholds, and optionally determines whether a seller has crossed them. Call it with no sales figures to use it as a reference lookup of each state's rules, or supply your sales figures to get a determination. Omit state to evaluate all 50 states and DC in a single request.

Every nexus or no_nexus answer is provable from the figures you supply. Where your inputs cannot settle the question, the endpoint returns indeterminate together with a required_input array naming exactly which parameter would resolve it, rather than guessing. This matters because states measure different quantities: taxable sales are a subset of retail sales, which are a subset of gross sales, so Florida (which measures taxable sales) and Michigan (which measures gross sales including exempt ones) can reach opposite conclusions on the same seller.

This endpoint evaluates economic nexus only. Physical presence — inventory, employees, offices, contractors, trade shows — can create nexus at any sales volume and is not considered. It is reference data, not tax advice.

This endpoint is available to premium subscribers only. Requests on the free tier return an error.

Parameters

All parameters are optional. With none set, the endpoint returns the threshold rules for every jurisdiction.

  • state  optional

    Two-letter US state code or full state name (e.g. CA or California). Omit to evaluate all 50 states and DC in one call.

  • gross_sales  optional

    All sales delivered into the state, including taxable, exempt and resale sales.

  • retail_sales  optional

    Sales delivered into the state, excluding sales for resale.

  • taxable_sales  optional

    Sales delivered into the state, excluding both resale and exempt sales.

  • revenue  optional

    Generic revenue figure. Use this only when your number is already stated on that state's own measure; otherwise prefer the three specific parameters above, which let the endpoint reason about what it can and cannot prove.

  • transactions  optional

    Number of separate sales transactions delivered into the state. Required for a definitive answer in the 18 jurisdictions that still apply a transaction-count test.

  • marketplace_sales  optional

    The portion of the above sales that was facilitated by a marketplace such as Amazon or Etsy. Required for a definitive answer in states that exclude marketplace sales from the seller's own threshold, such as Arizona, Alabama, Massachusetts and New Jersey.

  • marketplace_transactions  optional

    The portion of transactions facilitated by a marketplace.

Headers

  • X-Api-Key  required

    API Key associated with your account.

Response

A JSON object containing a results array with one entry per jurisdiction, or an error if the request is unsuccessful. When sales figures are supplied, a summary object groups the jurisdictions by determination.

  • state

    Two-letter state code, or DC.

  • revenue_threshold

    Revenue threshold in US dollars, or null where none applies. 42 jurisdictions use $100,000; California, New York and Texas use $500,000; Alabama and Mississippi use $250,000.

  • transaction_threshold

    Separate-transaction threshold, or null. Only 18 jurisdictions still apply one. Note that New York's test is more than 100 sales, not 200.

  • threshold_logic

    How the two tests combine: or, and, or revenue_only. Only Connecticut and New York require both tests to be met.

  • determination

    Present when sales figures are supplied. One of nexus, no_nexus or indeterminate.

  • has_nexus

    true, false, or null when the determination is indeterminate.

  • measure

    Which quantity the state measures, such as taxable_sales, retail_sales or gross_sales, with a plain-language measure_description.

  • evaluation_period

    The lookback window. These are not uniform: most states use a calendar year, but Texas uses the preceding 12 calendar months, New York the preceding four sales tax quarters, and Connecticut the twelve months ending September 30. Florida, Michigan, New Mexico and Rhode Island look only at the previous calendar year.

  • includes_marketplace_sales

    Whether marketplace-facilitated sales count toward the seller's own threshold in this state.

  • collection_start_rule

    When registration and collection must begin after the threshold is crossed.

  • reason and required_input

    Why this determination was reached, and — when indeterminate — the exact parameters that would settle it.

  • statute_cite, source_url and last_verified

    The statutory citation, the primary Department of Revenue source, and the date the rule was last checked against it.

  • caveats

    Limits that apply regardless of your inputs, always including that physical presence is not evaluated, plus any home-rule local complications such as Colorado's self-collecting cities or Louisiana's parishes.

Sample Nexus Request Live Demo!

state
gross_sales
taxable_sales
transactions
marketplace_sales

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/v1/salestaxnexus?state=TX&gross_sales=750000&transactions=1200

Headers

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

Sample Nexus Response

JSON
{
    results:[
      {
        state:"TX",
        state_name:"Texas",
        has_state_sales_tax:true,
        economic_nexus:true,
        revenue_threshold:500000,
        transaction_threshold:null,
        threshold_logic:"revenue_only",
        measure:"gross_revenue",
        measure_description:"Total Texas revenue from gross revenue on taxable AND nontaxable sales of tangible personal property and services into Texas. Includes separately stated handling, transportation, installation and similar fees, sales for resale, and sales to exempt entities.",
        includes_exempt_sales:true,
        includes_resale_sales:true,
        evaluation_period:"preceding_12_calendar_months",
        evaluation_period_description:"The preceding twelve calendar months.",
        collection_start_rule:"Obtain a permit and begin collecting state and local use tax by the first day of the fourth month after the month in which the $500,000 threshold was exceeded.",
        statute_cite:"34 Tex. Admin. Code 3.286(b)(2); Tex. Tax Code 151.107",
        source_url:"https://comptroller.texas.gov/taxes/sales/remote-sellers.php",
        last_verified:"2026-08-19",
        determination:"nexus",
        has_nexus:true,
        reason:"Economic nexus: the $500,000 revenue threshold is met.",
        revenue_evaluated:750000,
        revenue_remaining:0,
        caveats:[
          "Physical presence is not evaluated. Inventory, employees, offices, contractors, or trade-show activity can create nexus below any economic threshold."
        ]
      }
    ],
    summary:{
      nexus:[
        "TX"
      ],
      no_nexus:[],
      indeterminate:[]
    }
}

Code Examples

1 2 curl -X GET "https://api.api-ninjas.com/v1/salestaxnexus?state=TX&gross_sales=750000&transactions=1200" \ -H "X-Api-Key: YOUR_API_KEY"

Frequently Asked Questions

  • Yes, but you must have a premium subscription. Commercial use of the Sales 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.
  • Send a GET request to the /v1/salestax endpoint with exactly one of either a zip_code (a valid US ZIP code) or a city plus state combination; you can optionally add street_address alongside city and state for the most accurate lookup. To compute the actual tax on a purchase amount, pair it with the Sales Tax Calculator API.
  • The API returns a JSON array of breakdown objects with zip_code, state_rate, city_rate, county_rate, additional_rate, and total_rate (and street_address when you provide that parameter), with all values expressed as decimals (e.g. 0.0975 means 9.75%). Note that city_rate, county_rate, additional_rate, and total_rate are premium only fields.
  • It provides accurate, detailed sales tax breakdowns for every ZIP code, city, and state in the United States, separating state, county, city, and special district rates. For other tax types, see related APIs such as Income Tax, Property Tax, and the VAT Rates API for European Union rates.
  • The additional_rate field reflects special district sales taxes, and when a local government has multiple additional rates it contains the sum of all of them, which is then folded into the combined total_rate. Both fields are premium only.
  • The /v1/salestaxnexus endpoint is available to premium subscribers only; requests on the free tier return an error. Send a GET request to it with your sales figures, for example ?state=CA&gross_sales=750000&transactions=1200. Omit state to evaluate all 50 states and DC in a single call, which returns a summary object grouping the jurisdictions into nexus, no_nexus and indeterminate. You can also call it with no sales figures at all to use it as a plain reference lookup of each state's thresholds.
  • Because states measure different things. Florida measures taxable sales, Michigan measures gross sales including exempt ones, and Minnesota measures retail sales excluding resale. If you send a figure that cannot prove the answer either way, the endpoint returns determination: "indeterminate" along with a required_input array naming exactly which field would settle it, rather than guessing. Any nexus or no_nexus answer it does return is provable from the figures you supplied.
  • Send whichever you have: gross_sales, retail_sales, taxable_sales, and transactions. Because taxable sales are a subset of retail sales, which are a subset of gross sales, a single figure is often enough to answer definitively even for a state that measures something else. Supplying all three plus marketplace_sales and marketplace_transactions makes every jurisdiction answerable. Use the generic revenue parameter only if your figure is already stated on that state's own measure.
  • It depends on the state, which is why the endpoint takes marketplace_sales separately. Arizona, Alabama, Massachusetts and New Jersey exclude marketplace-facilitated sales from the seller's own threshold, while Alaska, California, DC, Idaho, North Carolina, Nevada, Ohio and South Carolina include them. Each state's treatment is returned in the includes_marketplace_sales field.
  • No. It evaluates economic nexus thresholds only. Inventory in a warehouse, a remote employee, an office, contractors or trade-show activity can create nexus at any sales volume, and every response carries this limit in its caveats array. The endpoint is reference data rather than tax advice, and every jurisdiction returns a statute_cite, a source_url and a last_verified date so you can check the underlying rule.