Prompt
How do I look up tax rates by address in real time?
Latest observation
Nov 3, 2026
OpenAI APIWeb search: off
To look up tax rates by address in real time, you typically use a tax rate API or a geocoding + tax jurisdiction lookup workflow.
Common approach
- Normalize the address
- Street, city, state, ZIP, country
- Geocode the address
- Convert it to latitude/longitude
- Match the location to tax jurisdictions
- Determine state/county/city/special district boundaries
- Return the applicable tax rate
- Often broken into components (state, local, special district, total)
Best option: use a tax API
Popular providers include:
- Avalara AvaTax
- TaxJar
- Vertex
- Some ecommerce platforms with built-in tax lookup
These services usually let you send an address and get back:
- total sales tax rate
- jurisdiction breakdown
- taxability rules
- sometimes exemption handling
Example flow
POST /tax-rate
{
"address": {
"street": "123 Main St",
"city": "Austin",
"state": "TX",
"zip": "78701",
"country": "US"
}
}
Response:
{
"total_rate": 0.0825,
"state_rate": 0.0625,
"local_rate": 0.02,
"special_rate": 0.0
}
If you want to build it yourself
Use:
- a geocoding service: Google Maps, Mapbox, Smarty, USPS address validation
- GIS/jurisdiction datasets: state/local tax boundary shapefiles
- a spatial database like PostGIS to query which tax polygons contain the point
This is more complex because tax boundaries change often.
Important considerations
- Tax rates vary by:
- location
- product type
- seller nexus / tax registration
- shipping vs billing address
- Some jurisdictions require rooftop-level precision, not just ZIP code.
- Always cache results carefully and refresh regularly because rates can change.
If you want, I can show you:
- a TaxJar/Avalara API example, or
- a DIY implementation with geocoding + PostGIS.