# SiteCheck Geocode

> SiteCheck Geocode is a paid API for AI agents from api.sitecheck-api.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Converts a place name to geographic coordinates (forward geocoding) or coordinates to a place name (reverse geocoding) using OpenStreetMap/Nominatim data.

## Facts

- Endpoint: GET https://api.sitecheck-api.workers.dev/api/geocode?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/sitecheck-geocode-8e01f6a4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yt8fvZeXmddppZxPcDgtp

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 sitecheck-geocode-8e01f6a4
```

Example prompt: What are the latitude and longitude coordinates for Berlin, Germany?

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call geocoding lookup without managing API keys for Google Maps or similar services. It is ideal for AI agents that occasionally need coordinates for a place name or want to reverse-geocode a coordinate, especially when already using other SiteCheck tools. Results are cached for 7 days, making it cost-efficient for repeated lookups of common cities.

## Known failure modes

- Place name not found or too ambiguous — empty results array returned
- Invalid or out-of-range lat/lon for reverse geocoding — empty or error response
- Missing required query parameter (neither q nor lat/lon provided) — likely 400 error
- Rate limiting or upstream Nominatim unavailability — service error
- Truncated or misspelled place names may return wrong or no results

## How this service works

Place names to coordinates and back: up to 5 matches for a name, or the place at a coordinate. Each match has a display name, latitude and longitude, country code and type. Attribution: © OpenStreetMap contributors, ODbL. Results are cached seven days.

## Output

Returns a JSON object with the original query, results array containing lat/lon, place name, type (e.g. administrative), country code, and display name, plus a source attribution string, checkedAt timestamp, and OpenStreetMap attribution notice. Results are cached for 7 days.

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "q": {
       "type": "string",
       "description": "Place name, e.g. Berlin"
      },
      "lat": {
       "type": "string",
       "description": "For reverse geocoding: latitude"
      },
      "lon": {
       "type": "string",
       "description": "For reverse geocoding: longitude"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": {
   "q": "Berlin"
  },
  "source": "https://nominatim.openstreetmap.org search (OpenStreetMap data, cached 7 days)",
  "results": [
   {
    "lat": 52.5173885,
    "lon": 13.3951309,
    "name": "Berlin",
    "type": "administrative",
    "countryCode": "DE",
    "displayName": "Berlin, Deutschland"
   }
  ],
  "checkedAt": "2026-10-14T04:49:23.637Z",
  "attribution": "© OpenStreetMap contributors, ODbL"
 }
}
```

## More

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