For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportLog InSign Up
GuidesAPI Reference
GuidesAPI Reference
    • Welcome to Ziptax
      • Quickstart
      • How to create an API key
      • How to find a TIC
      • Overview
      • By Address
      • By Lat / Lng
      • By Postal Code
Logo
SupportLog InSign Up
On this page
  • Endpoint
  • Quick example
  • Parameters
  • Required
  • Optional
  • Example response
  • Tips & common pitfalls
  • Related
REST API

By Lat / Lng

Door-level sales tax rate for a geographic coordinate

Was this page helpful?
Previous

By Postal Code

All tax rates that overlap a U.S. ZIP code
Next
Built with

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

1GET https://api.zip-tax.com/request/v60

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

$curl -H "X-API-Key: YOUR_API_KEY" \
> "https://api.zip-tax.com/request/v60?lat=33.65253&lng=-117.74794"

Parameters

Required

ParameterTypeDescription
latnumberLatitude in decimal degrees. Use at least 5 decimal places for rooftop accuracy.
lngnumberLongitude in decimal degrees. Use at least 5 decimal places for rooftop accuracy. Negative for locations west of the prime meridian.

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

ParameterTypeDefaultDescription
formatstringjsonResponse format. Set to xml if you need XML; remember to also set Content-Type accordingly.
countryCodestringUSAISO 3166-1 alpha-3 country code. Currently USA or CAN. Canadian rates require a Pro or Enterprise plan.
taxabilityCodestringnoneTaxability Information Code (TIC) to get product-specific rules in the response. See the TIC catalog. Requires Pro or Enterprise plan.
historicalstringnoneMonth to fetch historical rates for, in YYYYMM format (e.g. 202401 for January 2024). Cannot be the current month or in the future. Requires Pro or Enterprise plan.

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:

1{
2 "metadata": {
3 "version": "v60",
4 "response": { "code": 100, "name": "RESPONSE_CODE_SUCCESS" }
5 },
6 "taxSummaries": [
7 {
8 "rate": 0.0775,
9 "taxType": "SALES_TAX",
10 "summaryName": "Total Base Sales Tax"
11 }
12 ],
13 "addressDetail": {
14 "normalizedAddress": "200 Spectrum Center Dr, Irvine, CA 92618-5003, United States",
15 "geoLat": 33.65253,
16 "geoLng": -117.74794
17 }
18}

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.

Related

By Address

Supply a street address instead. Ziptax geocodes for you.

By Postal Code

ZIP-only lookup. Returns all rates that overlap the postal code.

API Reference

Full parameter and response schema.