# Sales Tax Calculator API

> Sales Tax Calculator is a US sales tax calculation API: send an order amount with a ZIP code or state and get the combined rate, the tax amount and the order total back as JSON. Paid plans split both the rate and the tax amount by state, county, city and special district.

**Endpoint:** `GET https://api.apiverve.com/v1/salestaxcalculator`  
**Category:** Finance  
**Cost:** 2 credits per call  
**Canonical page:** https://apiverve.com/marketplace/salestaxcalculator

## Overview

Use it at checkout, on invoices or in quotes: send the amount and the ZIP code, and it looks up the current combined rate for that ZIP, applies it, and rounds the tax to the cent. A state code works too and applies the statewide base rate only. For ZIP lookups, paid plans add the region name and a breakdown with each jurisdiction's rate and its share of the tax, the split you need for itemized tax lines. It applies the general sales tax rate to the amount you send; product exemptions, shipping taxability and nexus are left to you.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/salestaxcalculator?amount=100&zip=90210&state=CA" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `amount` | number | Yes | Purchase amount to calculate tax on (0 to 1,000,000,000,000). range 0-1000000000000 |
| `zip` | string | No | Valid US 5-digit ZIP code (required unless state is given). ZIP+4 (64082-1234) is accepted and priced at its 5-digit ZIP. If both zip and state are given, zip wins and state is ignored. length 5-10 |
| `state` | string | No | 2-letter US state code (e.g., CA, NY, TX); used when zip is not given, state rate only. length 2-2 |

## Response fields

- `amount` — number · The original purchase amount before tax
- `taxRate` — number · Decimal tax rate applied to location
- `taxRatePercent` — number · Tax rate expressed as percentage, to 4 decimal places (9.475)
- `taxAmount` — number · Calculated tax amount for purchase
- `totalAmount` — number · Total amount including tax
- `zip` — string · ZIP code used for tax calculation
- `state` — string · State code used for tax lookup
- `region` — string · City or region name for location · (premium)
- `breakdown` — object · Detailed tax rate breakdown by category · (premium)
  - `breakdown.stateRate` — number · State-level tax rate component · (premium)
  - `breakdown.countyRate` — number · County-level tax rate component · (premium)
  - `breakdown.cityRate` — number · City-level tax rate component · (premium)
  - `breakdown.specialRate` — number · Special district tax rate component · (premium)
  - `breakdown.stateTax` — number · State share of the tax amount, rounded to the cent; the rounding remainder goes to the largest share so the four shares sum to taxAmount · (premium)
  - `breakdown.countyTax` — number · County share of the tax amount, rounded to the cent; the rounding remainder goes to the largest share so the four shares sum to taxAmount · (premium)
  - `breakdown.cityTax` — number · City share of the tax amount, rounded to the cent; the rounding remainder goes to the largest share so the four shares sum to taxAmount · (premium)
  - `breakdown.specialTax` — number · Special district share of the tax amount, rounded to the cent; the rounding remainder goes to the largest share so the four shares sum to taxAmount · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "amount": 100,
    "taxRate": 0.1025,
    "taxRatePercent": 10.25,
    "taxAmount": 10.25,
    "totalAmount": 110.25,
    "zip": "90210",
    "state": "CA",
    "region": "WEST HOLLYWOOD TOURISM IMPROVEMENT DISTRICT",
    "breakdown": {
      "stateRate": 0.06,
      "countyRate": 0.0025,
      "cityRate": 0.0075,
      "specialRate": 0.0325,
      "stateTax": 6,
      "countyTax": 0.25,
      "cityTax": 0.75,
      "specialTax": 3.25
    }
  }
}
```

## Use cases

- **E-commerce Checkout** — Calculate accurate sales tax at checkout based on customer shipping address for tax-compliant transactions
- **Point of Sale Systems** — Integrate real-time tax calculations into POS systems for accurate receipt generation
- **Invoice Generation** — Automatically calculate and add sales tax to invoices based on customer location
- **Price Quoting** — Generate accurate price quotes that include applicable sales tax for any US location

## SDKs

- **npm** — `npm install @apiverve/salestaxcalculator` (https://www.npmjs.com/package/@apiverve/salestaxcalculator)
- **PyPI** — `pip install apiverve-salestaxcalculator` (https://pypi.org/project/apiverve-salestaxcalculator/)
- **NuGet** — `dotnet add package APIVerve.API.SalesTaxCalculator` (https://www.nuget.org/packages/APIVerve.API.SalesTaxCalculator)
- **Source** — https://github.com/apiverve/salestaxcalculator-api

## More

- Full reference: https://docs.apiverve.com/ref/salestaxcalculator
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
