# Relaystation Geocode

> Relaystation Geocode is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Converts a free-text address string into geographic coordinates (lat/lng) and a normalized address using AWS Location Service.

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/location/geocode
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-geocode-a4e0cdbc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RQ8dkkRt7MZQJvKmgQY0u

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 relaystation-geocode-a4e0cdbc -d '<json body>'
```

Example prompt: Can you geocode '1600 Pennsylvania Avenue NW, Washington, DC 20500' and give me the latitude, longitude, and normalized address?

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call geocoding lookup without managing AWS credentials or infrastructure — particularly in agentic workflows where the x402 micropayment model fits and you want AWS Location Service quality with optional country filtering and position biasing. It is well-suited for single-address lookups at $0.005 per result rather than batch geocoding pipelines.

## Known failure modes

- Ambiguous query with no confident match returns empty results array
- Invalid or unsupported country code in the countries filter causes a validation error
- Query string too short or too long (outside 1–512 characters) returns a 400 bad request
- biasPosition array with wrong number of elements (not exactly [longitude, latitude]) causes schema validation failure
- Service unavailability from underlying AWS Location Service may result in a 502 or timeout

## How this service works

$0.005/lookup. Geocode a free-text address to coordinates (AWS Location Service) — lat/lng plus normalized address. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns one or more geocoded results, each containing latitude and longitude (WGS-84) and a normalized/standardized address string corresponding to the input query.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "query": {
       "type": "string",
       "maxLength": 512,
       "minLength": 1
      },
      "language": {
       "type": "string"
      },
      "countries": {
       "type": "array",
       "items": {
        "type": "string",
        "maxLength": 3,
        "minLength": 3
       }
      },
      "maxResults": {
       "type": "integer",
       "maximum": 20,
       "minimum": 1
      },
      "biasPosition": {
       "type": "array",
       "items": {
        "type": "number"
       },
       "maxItems": 2,
       "minItems": 2,
       "description": "[longitude, latitude] (WGS-84)."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-geocode-a4e0cdbc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
