Overview
Look up sales tax by ZIP code for a checkout, an invoice or a POS setup screen. A ZIP code returns the estimated combined rate for that area, and a state code returns the statewide base rate. ZIP+4 codes are accepted. Each response names the city and state. Paid plans break the combined rate into its state, county, city and special district parts, add the tax region name, and say whether the state sources in-state sales at origin or destination, which decides whose local rate a seller charges. To apply the rate to an order, the Sales Tax Calculator API returns the tax amount and total in the same call.
Live Test Sales Tax Lookup API →
Endpoint
One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.
curl "https://api.apiverve.com/v1/salestax?zip=64082" \
-H "x-api-key: your_api_key_here"const res = await fetch('https://api.apiverve.com/v1/salestax?zip=64082', {
headers: { 'x-api-key': 'your_api_key_here' },
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const { data } = await res.json();
console.log(data);import requests
res = requests.get(
"https://api.apiverve.com/v1/salestax?zip=64082",
headers={"x-api-key": "your_api_key_here"},
timeout=15,
)
res.raise_for_status()
print(res.json()["data"])package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/salestax?zip=64082", nil)
req.Header.Set("x-api-key", "your_api_key_here")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.
Authentication
Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.
A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.
Parameters
Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.
| Parameter | Type | Description |
|---|---|---|
zipRequired | string | The zip code for which you want to get the sales tax rate. ZIP+4 (64082-1234) is accepted and priced at its 5-digit ZIP length 5–10 |
Response
Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.
{
"status": "ok",
"error": null,
"data": {
"state": "CA",
"zip": 90210,
"region": "WEST HOLLYWOOD TOURISM IMPROVEMENT DISTRICT",
"rate": 0.1025,
"county": 0.0025,
"city": 0.0075,
"special": 0.0325,
"stateRate": 0.06,
"cityName": "Beverly Hills",
"stateName": "California",
"sourcing": "mixed"
}
}
Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
state | string | "CA" | Two-letter state code for the tax jurisdiction |
zip | number | 90210 | ZIP code that was looked up |
regionPremium | string | "WEST HOLLYWOOD TOURISM IMPROVEMENT DISTRICT" | The geographic region or jurisdiction name for the tax rate |
rate | number | 0.1025 | State sales tax rate |
countyPremium | number | 0.0025 | Estimated county tax rate |
cityPremium | number | 0.0075 | Estimated city tax rate |
specialPremium | number | 0.0325 | Estimated special district tax rate |
stateRatePremium | number | 0.06 | State-level tax rate included in the combined rate |
cityName | string | "Beverly Hills" | Primary city name for the ZIP code; null when unknown |
stateName | string | "California" | Full state name |
sourcingPremium | string | "mixed" | How the state sources in-state sales: origin (the seller's location rate), destination (the buyer's), mixed (California: state, county and city at origin, district taxes at destination) or none (no state sales tax). Remote sellers use destination rates everywhere |
Errors
Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.
| Status | Meaning | What to do |
|---|---|---|
400 | Input was rejected | Read error; it names the parameter. |
401 | Key missing or invalid | Check the header name and the key value. |
403 | Key valid, but not permitted | A key restriction or IP allow-list; see key scoping. |
429 | Rate limited, or out of credits | Read error to tell them apart; see rate limits. |
Use cases
- Online Store Checkout
- When a customer enters their shipping ZIP code, e-commerce checkouts apply the matching combined rate to calculate cart totals.
- Automated Invoice Generation
- B2B billing platforms look up state tax rates to append accurate tax line items to monthly customer invoices.
- Point of Sale Calculation
- Retail POS systems query store location ZIP codes during setup to store local tax percentages for offline transactions.
- Subscription Billing Quotes
- SaaS quote generators calculate estimated local taxes before sending multi-state sales proposals to prospective corporate clients.
Other ways to use Sales Tax Lookup
Set up Sales Tax Lookup on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.
Related
More in Finance: