
Work with us
Introduction
Tax Flow is a U.S. sales tax API that you can easily hook into any application providing accurate sales tax for your business. Currently all API keys and subscriptions are handled through RapidAPI.
Endpoints
- GET /api/tax/zip
This endpoint will return the combined state, city, and county sales tax for the requested area. This is achieved by passing in only a zipcode but further accuracy can be achieved by passing in an accompanying state name or abbreviation.
- GET /api/tax/state
This endpoint will return the sales tax only for the requested state by name or abbreviation. This requires only one of the parameters.
Using the Tax Flow API
GET /api/tax/zip
Required Parameters
- zip_code=90059
Optional Parameters
- state_name=California
- state_abbr=CA
- round=true
Example Request (JavaScript Fetch API)
const options = { method: 'GET', headers: { 'X-RapidAPI-Key': '5d669cb043mshaf783f8dda68f23p14a06djsn2fdb3d080b54', 'X-RapidAPI-Host': 'taxflow-u-s-sales-tax.p.rapidapi.com' } }; fetch('https://taxflow-u-s-sales-tax.p.rapidapi.com/api/tax/zip?state_abbr=CA&round=true&zip_code=90059', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
Example Response (JSON)
{ "data": { "tax_rate": "0.072", "taxable_shipping": false } }
GET /api/tax/state
Required Parameters (One of the Following)
- state_name=California
- state_abbr=CA
or
Example Request (JavaScript Fetch API)
const options = { method: 'GET', headers: { 'X-RapidAPI-Key': 'RAPID_API_KEY', 'X-RapidAPI-Host': 'taxflow-u-s-sales-tax.p.rapidapi.com' } }; fetch('https://taxflow-u-s-sales-tax.p.rapidapi.com/api/tax/state?state_name=California', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
Example Response (JSON)
{ "data": { "state_name": "California", "state_abbr": "CA", "state_tax_rate": 0.06, "taxable_shipping": false } }