# Tokenguard Geocoding API

> Tokenguard Geocoding API is a paid API for AI agents from eltociear-tokenguard.hf.space, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Geocodes a place name or address query into geographic coordinates (latitude, longitude) with country metadata

## Facts

- Endpoint: POST https://eltociear-tokenguard.hf.space/data/geocode
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tokenguard-geocoding-api-37525347
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bri-jjd-rHWm1Vy0D7-fq

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 tokenguard-geocoding-api-37525347 -d '<json body>'
```

Example prompt: Can you geocode 'Shibuya, Tokyo' and give me the latitude, longitude, and country code for that location?

## When to prefer this

Use this endpoint when you need to resolve a human-readable place name or address into geographic coordinates (lat/lon) and country metadata, particularly within a workflow already using the Tokenguard API platform on Base with x402 micropayments. Suitable for enriching location data in crypto/DeFi analytics contexts where user-supplied location strings need to be geocoded.

## Known failure modes

- Query string not recognized as a valid place — returns empty results array with count 0
- Ambiguous place name matches multiple locations — returns multiple result entries requiring disambiguation
- Network or service unavailability on HuggingFace Space — returns 5xx error
- Malformed POST body or missing query field — returns 4xx validation error
- Payment not included or insufficient — returns 402 Payment Required

## How this service works

Place name to coordinates, or coordinates to address (OpenStreetMap Nominatim), with country and feature type

## Output

Returns a JSON object with a count of results and an array of matches, each containing latitude, longitude, country name, ISO country code, and a human-readable display name for the matched location.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "lat": {
   "type": "number",
   "description": "Latitude for reverse geocoding"
  },
  "lon": {
   "type": "number",
   "description": "Longitude for reverse geocoding"
  },
  "query": {
   "type": "string",
   "description": "Place name or address"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "query": "Shibuya, Tokyo",
  "results": [
   {
    "lat": 35.66,
    "lon": 139.7,
    "country": "Japan",
    "country_code": "jp",
    "display_name": "Shibuya, Tokyo, Japan"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tokenguard-geocoding-api-37525347/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from eltociear-tokenguard.hf.space](https://www.zero.xyz/host/eltociear-tokenguard.hf.space/llms.txt)
