By Lat / Lng
By Lat / Lng
Door-level sales tax rate for a geographic coordinate
Look up the single sales tax rate that applies at a specific latitude/longitude. The API skips the geocoding step and returns the rate for that exact point. Ideal when you already have verified coordinates from your own address verification pipeline, a map click, a GPS reading, or a storefront’s known location.
Lat/lng lookups return the same door-level, adjusted rate as By Address, just without the geocoding. If you only have a street address, use By Address instead.
Endpoint
Send the coordinates in the lat and lng query parameters as decimal
degrees.
Use at least 5 decimal places of precision (e.g. 33.65253, not
33.65). Rooftop-level accuracy requires sub-meter precision; truncating
coordinates may land you in a different tax jurisdiction.
Quick example
Parameters
Required
Both lat and lng must be supplied together. You must also
authenticate with your API key via the X-API-KEY header (recommended)
or the key query parameter.
Optional
Plan-gated parameters return a specific response code if your account
doesn’t have the entitlement: countryCode=CAN returns code 112
(rate_loc_can entitlement), taxabilityCode returns code 113
(product_rates entitlement). See the
Response Codes reference for the full
list.
Example response
The response shape is identical to the
By Address response: baseRates,
taxSummaries, sourcingRules, addressDetail (with the reverse-geocoded
address), etc. A truncated example:
Tips & common pitfalls
Precision matters
Coordinates truncated to 2 decimal places can drift by more than a kilometer, enough to cross a city or special-district boundary and return the wrong rate. Always pass at least 5 decimal places (≈1 meter resolution).
Negative longitudes for North America
All U.S. and Canadian longitudes are negative (west of the prime meridian). A missing minus sign will either return an error or, if the sign flip lands on a valid location, the wrong rate entirely.
When to use lat/lng over address
Prefer lat/lng when you’ve already geocoded the address in-house, for fixed points (warehouses, store locations, kiosks), or when working from map clicks and GPS. Prefer By Address when you only have a textual address. Ziptax’s geocoder is tuned to tax jurisdictions and does the rooftop adjustment for you.
Canadian coordinates
Set countryCode=CAN for coordinates inside Canada. Without the
flag, a Canadian lat/lng will fail to match a U.S. jurisdiction and
return an error.
US territory coordinates
Set countryCode to a US territory code for coordinates inside
PRI (Puerto Rico), ASM (American Samoa), GUM (Guam), MNP
(Northern Mariana Islands), or VIR (U.S. Virgin Islands). These are
looked up through the US path and need no extra entitlement.