# agentsvc.io Geocoding API

> agentsvc.io Geocoding API is a paid API for AI agents from agentsvc.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-10).

Converts addresses to coordinates (forward geocoding) or coordinates to addresses (reverse geocoding) using OpenStreetMap Nominatim

## Facts

- Endpoint: POST https://agentsvc.io/api/v1/proxy/geocode?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentsvc-io-geocoding-api-64653409
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v5fABXd8bmVFUfIE3wvtg

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 agentsvc-io-geocoding-api-64653409 -d '<json body>'
```

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

## When to prefer this

Use this endpoint when you need a quick, pay-per-call geocoding solution with no API key setup, backed by OpenStreetMap Nominatim. Ideal for agents that need to convert addresses to coordinates or coordinates to addresses on demand without committing to a subscription. Prefer over Google Maps or HERE geocoding when open data licensing (OSM) is acceptable and cost-per-call via USDC micropayment is preferred over monthly billing.

## Known failure modes

- Address not found — results array is empty when the address cannot be resolved
- Ambiguous address — multiple results returned for a vague or non-unique place name
- Coordinates out of range — invalid lat/lon values cause an error response
- Missing required body fields — omitting address or coordinates returns a validation error
- Rate limiting or upstream Nominatim outage — proxy may return a 5xx error

## How this service works

86 APIs for AI agents: web scraping and crawling to Markdown, AI summaries, data extraction and cited answers, screenshots and PDF, PDF, OCR and document conversion, news, paper and developer search and more, paid per call with USDC on Base, Solana, Polygon or Arbitrum via x402. No account, no API key, free sample on every service.

## Output

Returns a JSON object with a mode field ('forward' or 'reverse'), a source field ('OpenStreetMap Nominatim'), and a results array. Each result contains lat/lon coordinates, OSM place type, OSM element type (node/way/relation), place_id, display_name (full formatted address string), and a structured address object with components like road, city, state, postcode, country, country_code (ISO 3166-1 alpha-2).

## 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": {
     "required": [],
     "properties": {}
    },
    "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",
     "required": [
      "success",
      "data"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "mode",
        "results"
       ],
       "properties": {
        "mode": {
         "enum": [
          "forward",
          "reverse"
         ],
         "type": "string"
        },
        "source": {
         "type": "string"
        },
        "results": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "lat": {
            "type": "number"
           },
           "lon": {
            "type": "number"
           },
           "type": {
            "enum": [
             "city",
             "postcode"
            ],
            "type": "string"
           },
           "address": {
            "type": "object",
            "properties": {
             "city": {
              "type": "string"
             },
             "state": {
              "type": "string"
             },
             "country": {
              "type": "string"
             },
             "postcode": {
              "type": [
               "string",
               "null"
              ]
             },
             "country_code": {
              "type": "string"
             }
            }
           },
           "timezone": {
            "type": [
             "string",
             "null"
            ]
           },
           "precision": {
            "enum": [
             "locality",
             "postal_code"
            ],
            "type": "string"
           },
           "population": {
            "type": [
             "integer",
            
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "mode": "forward",
   "source": "GeoNames",
   "results": [
    {
     "lat": 48.85341,
     "lon": 2.3488,
     "type": "city",
     "address": {
      "city": "Paris",
      "state": "Île-de-France",
      "country": "France",
      "postcode": null,
      "country_code": "fr"
     },
     "timezone": "Europe/Paris",
     "precision": "locality",
     "population": 2138551,
     "geonames_id": 2988507,
     "display_name": "Paris, Île-de-France, France"
    }
   ],
   "attribution": "Place data from GeoNames (geonames.org), CC BY 4.0",
   "ignored_parts": [
    "Avenue Anatole France 5"
   ]
  },
  "success": true
 }
}
```

## More

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