# Photon Geocoder via x402

> Photon Geocoder via x402 is a paid API for AI agents from x402-v2-mint-photon.vercel.app, paid per call via x402, $0.020204/call, status unknown (last checked 2026-12-01).

Converts a place name or address text query into geocoded location results (coordinates, place details) using the Komoot Photon geocoding engine, billed per call via x402 micropayments.

## Facts

- Endpoint: POST https://x402-v2-mint-photon.vercel.app/v1/photon?utm_source=zero.xyz
- Price: $0.020204/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/photon-geocoder-via-x402-4b2aee12
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_FfSeJwdhd61pohRLdrsQZ

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 photon-geocoder-via-x402-4b2aee12 -d '<json body>'
```

Example prompt: Can you geocode '1600 Pennsylvania Ave NW, Washington DC' and give me its coordinates? Return up to 5 results.

## When to prefer this

Choose this endpoint when you need keyless, pay-per-use forward geocoding (address/place name to coordinates) without managing API keys or subscriptions, especially in agentic workflows that use x402 micropayment settlement. Prefer over key-based geocoders when operating in trustless or multi-agent environments. Backed by Komoot Photon (OpenStreetMap data), making it well-suited for global place search including POIs, cities, streets, and landmarks.

## Known failure modes

- HTTP 402 returned when payment is not settled before call — no results returned
- HTTP 400 with charged:false when query is empty or malformed after payment — charge not applied
- No results found for highly ambiguous or non-existent place names
- Rate limiting or service unavailability on the Vercel deployment
- Query exceeds 200 character limit — rejected at input validation

## How this service works

Komoot Photon geocoder (keyless). POST {q|query|text,limit?,lat?,lon?}. Unpaid empty → 402; after settle empty/invalid → 400 charged:false. Soft disclose geocode-search / census-geocode.

## Output

Returns a JSON object with ok:true, the skill name ('photon'), a charged:true flag confirming the micropayment was applied, and a summary field. On success, geocoding results include place name, coordinates, and location details sourced from OpenStreetMap via the Photon engine. On unpaid calls returns HTTP 402; on settled but invalid queries returns 400 with charged:false.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "q": {
   "type": "string",
   "maxLength": 200
  },
  "lat": {
   "type": "number"
  },
  "lon": {
   "type": "number"
  },
  "text": {
   "type": "string",
   "maxLength": 200
  },
  "limit": {
   "type": "integer",
   "maximum": 20,
   "minimum": 1
  },
  "query": {
   "type": "string",
   "maxLength": 200
  },
  "request_id": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "skill": "photon",
  "charged": true,
  "summary": "ok"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/photon-geocoder-via-x402-4b2aee12/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-v2-mint-photon.vercel.app](https://www.zero.xyz/host/x402-v2-mint-photon.vercel.app/llms.txt)
