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.

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:

Online
(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.

Live Demo

Live demo · no API key required
Query parameters
street_address
zip_code
city
state

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/salestax?zip_code=90210&street_address=9641%20Sunset%20Blvd
Sample response
[
{
"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

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.

Live Demo

Live demo · premium API key required
Query parameters
state
gross_sales
taxable_sales
transactions
marketplace_sales

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/salestaxnexus?state=TX&gross_sales=750000&transactions=1200
Sample response
{
"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

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

  • state  optional

    Two-letter state code or full state name (e.g. TX or Texas). Omit for a nationwide list.

  • year  optional

    Four-digit calendar year. Defaults to the current year.

  • date  optional

    ISO date (YYYY-MM-DD). Returns only holidays in effect on that date and adds an exemption determination.

  • category  optional

    Item category to test, for example clothing, school_supplies, computers or energy_star.

  • amount  optional

    Item price, tested against the holiday's price cap. Combine with date and category for a full determination.

Live Demo

Live demo · no API key required
Query parameters
state
year
date
category
amount

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/salestaxholidays?state=TX&year=2026
Sample response
{
"results": [
{
"holiday_id": "TX-2026-emergency-preparation",
"state": "TX",
"state_name": "Texas",
"name": "Emergency Preparation Supplies",
"year": 2026,
"start": "2026-04-25T00:00:00-05:00",
"end": "2026-04-27T23:59:59-05:00",
"timezone": "America/Chicago",
"multi_zone": true,
"treatment": "exempt",
"local_participation": "all",
"coverage_level": "verified",
"items": [
{
"category_code": "generators",
"category_name": "Portable generators",
"price_cap": 3000,
"cap_basis": "per_item",
"notes": "Exempt if under $3,000."
},
{
"category_code": "emergency_preparation_supplies",
"category_name": "Hurricane shutters and emergency ladders",
"price_cap": 300,
"cap_basis": "per_item",
"notes": "Exempt if under $300."
}
],
"statute_cite": "Tex. Tax Code 151.3565",
"source_url": "https://comptroller.texas.gov/taxes/publications/98-1017.php",
"caveats": [
"This jurisdiction spans more than one time zone. The holiday runs on local time in each zone; timestamps here use America/Chicago."
],
"last_verified": "2026-09-03"
}
]
}

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

  • state  optional

    Two-letter state code or full state name (e.g. TX or Texas). Omit to return every jurisdiction.

  • frequency  optional

    Filing frequency tier, for example monthly, quarterly, semiannual, annual or monthly_accelerated. Requesting a frequency a state does not offer returns the list of the ones it does.

  • year  optional

    Four-digit calendar year. Supplying it adds a periods array with every filing period and its due date.

  • annual_liability  optional

    Annual sales tax liability in US dollars. Returns the frequency that state would assign, or indeterminate where the state publishes no computable threshold.

Live Demo

Live demo · premium API key required
Query parameters
state
frequency
year
annual_liability

Get a free API key to get started — no credit card required.

Headers
X-Api-KeyLog in or sign up to get your API key
GET
https://api.api-ninjas.com/v1/salestaxfiling?state=TX&frequency=monthly&year=2026
Sample response
{
"state": "TX",
"state_name": "Texas",
"coverage_level": "verified",
"rollover_rule": "next_business_day",
"holiday_calendar": "federal",
"local_filing_required": false,
"unpublished": [],
"source_urls": [
"https://comptroller.texas.gov/taxes/file-pay/due-dates.php"
],
"last_verified": "2026-09-03",
"frequencies": [
{
"frequency": "monthly",
"assignment_rule": "34 TAC 3.286(g)(3): permit holders with \"$1,500 or more in state sales and use tax PER QUARTER to report must file monthly\". The measure is STATE tax only, excluding local. There is NO $500/month test anywhere in the rule.",
"assignment_threshold": {
"measure": "tax_due",
"period": "quarter",
"amount": 1500,
"comparison": "gte"
},
"period_length": "month",
"due_day": 20,
"due_day_basis": "day_of_month_after_period_end",
"prepayment": {
"description": "Optional prepayment discount: prepay a reasonable estimate (at least 90% of the current period, or 100% of the same period last year).",
"due_day": 15,
"frequency": "monthly",
"timing": "month_after_covered",
"statute_cite": "34 Tex. Admin. Code 3.286"
},
"statute_cite": "Tex. Tax Code 151.401(a), 151.402(a); 34 Tex. Admin. Code 3.286(g)(3)",
"year": 2026,
"periods": [
{
"period_start": "2026-01-01",
"period_end": "2026-01-31",
"due_date": "2026-02-20",
"due_date_adjusted": false,
"prepayments": [
{
"covers": "2026-01",
"due_date": "2026-02-17",
"due_date_adjusted": true,
"statutory_due_date": "2026-02-15",
"adjustment_reason": "weekend"
}
]
},
{
"period_start": "2026-05-01",
"period_end": "2026-05-31",
"due_date": "2026-06-22",
"due_date_adjusted": true,
"statutory_due_date": "2026-06-20",
"adjustment_reason": "weekend",
"prepayments": [
{
"covers": "2026-05",
"due_date": "2026-06-15",
"due_date_adjusted": false
}
]
}
]
}
]
}

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

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