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.
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 API.
/v1/salestax GET
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_codeoptional- Valid US ZIP code. 
- cityoptional- City name. 
- stateoptional- State name. 
Headers
- X-Api-Keyrequired- API Key associated with your account. 
Returns
- zip_code- The ZIP code for which tax information is returned. 
- state_rate- State sales tax rate as a decimal. 
- city_ratepremium only- City sales tax rate as a decimal. 
- county_ratepremium only- County sales tax rate as a decimal. 
- additional_ratepremium only- Additional special district sales tax rate as a decimal. 
- total_ratepremium only- Total combined sales tax rate of state, county, city, and additional rates as a decimal. 
Sample Request Live Demo!
https://api.api-ninjas.com/v1/salestax?zip_code=90210Headers
X-Api-KeyLog in or sign up to get your API KeySample Response
1
2
3
4
5
6
7
8
9
10
[
  {
    "zip_code": "90210",
    "total_rate": "0.102500",
    "state_rate": "0.060000",
    "city_rate": "0.007500",
    "county_rate": "0.002500",
    "additional_rate": "0.032500"
  }
]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.