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.
And the questions that come after it: which purchases are exempt during a state's sales tax holiday, and when each return is actually due. Filing frequencies and due dates are generated from each state's published rules for 47 jurisdictions, including weekend and holiday rollover, non-calendar filing periods and prepayment schedules.
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
- /v1/salestaxholidays - Sales tax holidays with eligible categories and price caps
- /v1/salestaxfiling - Filing frequencies and due dates for 47 jurisdictions
From 10,182 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 276ms | 297ms | 324ms | 701ms | 1082ms |
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_codeoptionalValid US ZIP code.
street_addressoptionalStreet address (e.g.
9641 Sunset Blvd). Used together withcityandstatefor the most accurate lookup.cityoptionalCity name.
stateoptionalState name.
Headers
X-Api-KeyrequiredAPI 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_addressThe street address from the request. Only returned when the
street_addressparameter is provided.zip_codeThe ZIP code for which tax information is returned.
state_rateState sales tax rate as a decimal.
city_ratePremium onlyCity sales tax rate as a decimal.
county_ratePremium onlyCounty sales tax rate as a decimal.
additional_ratePremium onlyAdditional 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_ratePremium onlyTotal combined sales tax rate of state, county, city, and additional rates as a decimal.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
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.
stateoptionalTwo-letter US state code or full state name (e.g.
CAorCalifornia). Omit to evaluate all 50 states and DC in one call.gross_salesoptionalAll sales delivered into the state, including taxable, exempt and resale sales.
retail_salesoptionalSales delivered into the state, excluding sales for resale.
taxable_salesoptionalSales delivered into the state, excluding both resale and exempt sales.
revenueoptionalGeneric 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.
transactionsoptionalNumber 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_salesoptionalThe 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_transactionsoptionalThe portion of
transactionsfacilitated by a marketplace.
Headers
X-Api-KeyrequiredAPI 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.
stateTwo-letter state code, or
DC.revenue_thresholdRevenue threshold in US dollars, or
nullwhere none applies. 42 jurisdictions use $100,000; California, New York and Texas use $500,000; Alabama and Mississippi use $250,000.transaction_thresholdSeparate-transaction threshold, or
null. Only 18 jurisdictions still apply one. Note that New York's test is more than 100 sales, not 200.threshold_logicHow the two tests combine:
or,and, orrevenue_only. Only Connecticut and New York require both tests to be met.determinationPresent when sales figures are supplied. One of
nexus,no_nexusorindeterminate.has_nexustrue,false, ornullwhen the determination is indeterminate.measureWhich quantity the state measures, such as
taxable_sales,retail_salesorgross_sales, with a plain-languagemeasure_description.evaluation_periodThe 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_salesWhether marketplace-facilitated sales count toward the seller's own threshold in this state.
collection_start_ruleWhen registration and collection must begin after the threshold is crossed.
reasonandrequired_inputWhy this determination was reached, and — when indeterminate — the exact parameters that would settle it.
statute_cite,source_urlandlast_verifiedThe statutory citation, the primary Department of Revenue source, and the date the rule was last checked against it.
caveatsLimits 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.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/salestaxnexus?state=TX&gross_sales=750000&transactions=1200" \
-H "X-Api-Key: YOUR_API_KEY"https://api.api-ninjas.com/v1/salestaxholidays
Returns US sales tax holidays — the “tax free weekend” periods when states exempt certain purchases — with the eligible item categories and price caps for each. Omit state for a nationwide list of every holiday in a given year.
Start and end values are timezone-aware timestamps, not plain dates, because these holidays begin and end at specific local times. Alabama's, for example, runs from 12:01am on the first day to midnight on the last. A checkout integration that compares dates alone gets both boundaries wrong.
Price caps are almost always per item, not per transaction. A $150 basket of three $50 shirts qualifies under a $100 cap; a single $150 coat does not. Read cap_basis rather than assuming.
Where a state lets each city or county opt in or out, the endpoint returns exempt: null with determination: "indeterminate" and a required_input array naming what would resolve it, rather than a flat true that would be wrong for roughly half the localities in that state. An unrecognised category returns not_addressed, never exempt.
Asking for a year a state has not yet published returns an empty result set with a coverage note — not an error, and not last year's dates silently reused.
This is reference data, not tax advice.
Parameters
stateoptionalTwo-letter state code or full state name (e.g.
TXorTexas). Omit for a nationwide list.yearoptionalFour-digit calendar year. Defaults to the current year.
dateoptionalISO date (
YYYY-MM-DD). Returns only holidays in effect on that date and adds an exemption determination.categoryoptionalItem category to test, for example
clothing,school_supplies,computersorenergy_star.amountoptionalItem price, tested against the holiday's price cap. Combine with
dateandcategoryfor a full determination.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/salestaxholidays?state=TX&year=2026" \
-H "X-Api-Key: YOUR_API_KEY"Business tier and above
https://api.api-ninjas.com/v1/salestaxfiling
Returns sales tax filing frequencies and due dates for 47 US jurisdictions. Supply a year to get the full calendar for a frequency; supply annual_liability to have the state's own rules assign the frequency.
Calendars are generated from each state's published rules, never stored. A hand-entered table of 47 states × 12 months rots the moment a state moves a date, and the rot is invisible until a customer files late.
This handles what a “due on the 20th” assumption gets wrong. Due days run from the 15th (Maine) to the last day of the month (California, Connecticut, Missouri, Utah, Wyoming). New York's quarters end February, May, August and November. Massachusetts is 30 days after the period, so its January return falls on March 2, not February 28.
Weekend and holiday rollover is applied against the federal calendar, a state one, or both, and the result carries due_date_adjusted plus the original statutory_due_date so you can see that the date moved and why. Where a state requires an electronic payment to be initiated before the nominal due date (Florida), efile_initiate_by gives that earlier date.
Prepayment regimes are included, in the four distinct placements states actually use — California and New Jersey cover one month and pay the next; Pennsylvania, Michigan, Ohio and seven others fall due inside the month being covered, before the period even closes. Omitting these gets the answer wrong for exactly the high-volume filers who need it.
Where a state grants a filing frequency by written approval or departmental notice rather than by a published dollar threshold — Georgia, Idaho, New Mexico, Oklahoma, South Carolina, Virginia and others — the response is indeterminate rather than a guess. Telling a Georgia seller “quarterly” when they are monthly-until-approved means filing late.
Every jurisdiction carries coverage_level, and any field a state does not publish is listed in unpublished with an unpublished_reason explaining why. Every frequency tier carries a statute_cite and source_url.
State-level filing regimes only. Colorado home-rule cities, Louisiana parishes, Alabama's non-state-administered localities and Alaska's ARSSTC jurisdictions each file separately and are out of scope.
This is reference data, not tax advice.
Parameters
stateoptionalTwo-letter state code or full state name (e.g.
TXorTexas). Omit to return every jurisdiction.frequencyoptionalFiling frequency tier, for example
monthly,quarterly,semiannual,annualormonthly_accelerated. Requesting a frequency a state does not offer returns the list of the ones it does.yearoptionalFour-digit calendar year. Supplying it adds a
periodsarray with every filing period and its due date.annual_liabilityoptionalAnnual sales tax liability in US dollars. Returns the frequency that state would assign, or
indeterminatewhere the state publishes no computable threshold.
Live Demo
Get a free API key to get started — no credit card required.
Code Examples
curl -X GET "https://api.api-ninjas.com/v1/salestaxfiling?state=TX&frequency=monthly&year=2026" \
-H "X-Api-Key: YOUR_API_KEY"Frequently Asked Questions
Can I use the Sales Tax API for commercial purposes?
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.How do I get an API key and start using the Sales 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 Sales 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.How do I look up sales tax for a specific location?
Send a GET request to the/v1/salestaxendpoint with exactly one of either azip_code(a valid US ZIP code) or acityplusstatecombination; you can optionally addstreet_addressalongsidecityandstatefor the most accurate lookup. To compute the actual tax on a purchase amount, pair it with the Sales Tax Calculator API.What does the Sales Tax API response include?
The API returns a JSON array of breakdown objects withzip_code,state_rate,city_rate,county_rate,additional_rate, andtotal_rate(andstreet_addresswhen you provide that parameter), with all values expressed as decimals (e.g.0.0975means 9.75%). Note thatcity_rate,county_rate,additional_rate, andtotal_rateare premium only fields.What coverage and data does the Sales Tax API provide?
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.How is the additional_rate field calculated when a location has multiple special taxes?
Theadditional_ratefield 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 combinedtotal_rate. Both fields are premium only.How do I check whether I have economic sales tax nexus in a state?
The/v1/salestaxnexusendpoint 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. Omitstateto evaluate all 50 states and DC in a single call, which returns asummaryobject grouping the jurisdictions intonexus,no_nexusandindeterminate. You can also call it with no sales figures at all to use it as a plain reference lookup of each state's thresholds.Why does the nexus endpoint sometimes return indeterminate instead of true or false?
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 returnsdetermination: "indeterminate"along with arequired_inputarray naming exactly which field would settle it, rather than guessing. Anynexusorno_nexusanswer it does return is provable from the figures you supplied.Which sales figures should I send to the nexus endpoint?
Send whichever you have:gross_sales,retail_sales,taxable_sales, andtransactions. 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 plusmarketplace_salesandmarketplace_transactionsmakes every jurisdiction answerable. Use the genericrevenueparameter only if your figure is already stated on that state's own measure.Do sales made through Amazon or another marketplace count toward my own nexus threshold?
It depends on the state, which is why the endpoint takesmarketplace_salesseparately. 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 theincludes_marketplace_salesfield.Does the nexus endpoint account for physical presence?
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 itscaveatsarray. The endpoint is reference data rather than tax advice, and every jurisdiction returns astatute_cite, asource_urland alast_verifieddate so you can check the underlying rule.
Explore API integration use cases for recommended APIs and workflow examples.