# Tollmint Geocoding API

> Tollmint Geocoding API is a paid API for AI agents from api.tollmint.com, paid per call via x402, $0.0008/call, status unknown (last checked 2026-09-13).

Converts a free-form address or place name into geographic coordinates and structured location data, billed per call via x402 micropayment.

## Facts

- Endpoint: POST https://api.tollmint.com/v1/ref/geocode
- Price: $0.0008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tollmint-geocoding-api-3d7bd583
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2tOA97vjbTFOIaLu2Xq1k

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tollmint-geocoding-api-3d7bd583 -d '<json body>'
```

Example prompt: Can you geocode '1600 Amphitheatre Parkway, Mountain View, CA' and give me up to 3 results restricted to the US?

## When to prefer this

Choose this endpoint when your agent needs lightweight, per-call geocoding without managing API keys, billing accounts, or subscriptions — particularly in autonomous agent workflows where micropayment via x402 is already supported. It is well-suited for low-to-moderate geocoding volumes where paying $0.0008 per call is acceptable and no pre-registration overhead is tolerable. Prefer alternatives like Google Maps Geocoding API or Nominatim if you need high-volume bulk geocoding, richer place metadata, or want to avoid per-call payment infrastructure.

## Known failure modes

- Ambiguous or misspelled address returns low-confidence or zero results
- country_codes filter too restrictive — eliminates all valid matches
- query string exceeds 500 characters — validation error
- limit out of range (below 1 or above 10) — schema validation error
- Payment fails or x402 handshake is rejected — request is not processed
- Network timeout or service unavailability — 5xx error

## How this service works

An API that quotes its own price and takes payment in the same request. Built for autonomous agents: no account, no invoice, no human in the loop.

## Output

A JSON array of up to `limit` geocoding results, each containing a place name, structured address components, and latitude/longitude coordinates corresponding to the queried address or place name.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "integer",
   "default": 5,
   "maximum": 10,
   "minimum": 1
  },
  "query": {
   "type": "string",
   "maxLength": 500,
   "minLength": 1,
   "description": "Free-form address or place name"
  },
  "country_codes": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 2,
    "minLength": 2
   },
   "maxItems": 10,
   "description": "ISO 3166-1 alpha-2 codes to restrict the search"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tollmint-geocoding-api-3d7bd583/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.tollmint.com](https://www.zero.xyz/host/api.tollmint.com/llms.txt)
