# NoJunk Geo — Geocode

> NoJunk Geo — Geocode is a paid API for AI agents from nojunk-geo.mick8511.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-16).

Converts a place name or address string into geographic coordinates and a structured address object, charged per successful result in USDC via x402.

## Facts

- Endpoint: GET https://nojunk-geo.mick8511.workers.dev/geocode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nojunk-geo-geocode-577a1ea0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-gHXK2cF9nTAYD788wcpF

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 nojunk-geo-geocode-577a1ea0
```

Example prompt: What are the latitude and longitude coordinates for 1600 Pennsylvania Avenue NW, Washington DC? Just give me the top result.

## When to prefer this

Choose this endpoint when you need a cheap, pay-per-successful-call geocoding solution for AI agents that already use the x402 micropayment protocol on Base. It is ideal when you need structured address output plus coordinates from a plain text place name or address, especially when feeding into the sibling /weather endpoint. Prefer this over free geocoding APIs when you want usage-based billing without subscription overhead, and over proprietary geocoding (Google, HERE) when cost per call and open data licensing (ODbL) are acceptable.

## Known failure modes

- Query string too short or too long (outside 1–200 characters) — returns 400 validation error
- No matching location found — returns empty results array, no charge
- Ambiguous query with no country filter — may return unexpected country's result
- Nominatim upstream outage — 502 or 503 response
- Payment failure or insufficient USDC balance — 402 response, no result returned
- Rate limits from upstream Nominatim if query volume is very high

## How this service works

Cheap geocoding, reverse geocoding and weather for AI agents, paid per call in USDC on Base via x402: /geocode turns a place name or address into coordinates and a structured address, /reverse turns coordinates into an address, /weather returns current conditions and a 7-day forecast for coordinates or a place name. Data from OpenStreetMap Nominatim (ODbL, attribution required) and Open-Meteo (CC BY 4.0). You are only charged when a result is returned.

## Output

Returns a JSON object with the original query, data source attribution, and an array of results — each result containing latitude, longitude, place type, importance score, bounding box, a human-readable display name, and a structured address (city, road, state, county, country, postcode, country code, house number). Also includes a fetched_at timestamp and ODbL attribution string.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "maxLength": 200,
       "minLength": 1,
       "description": "Place name or address to look up, 1-200 characters"
      },
      "limit": {
       "type": "string",
       "description": "Max results, 1-5 (default 1)"
      },
      "country": {
       "type": "string",
       "description": "Optional 2-letter ISO country code to restrict results, e.g. us"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "query": "Sunrise, Florida",
  "source": "OpenStreetMap Nominatim",
  "country": "us",
  "results": [
   {
    "lat": 26.1669711,
    "lon": -80.2567739,
    "type": "city",
    "address": {
     "city": "Sunrise",
     "road": null,
     "state": "Florida",
     "county": "Broward County",
     "country": "United States",
     "postcode": null,
     "country_code": "us",
     "house_number": null
    },
    "category": "boundary",
    "importance": 0.5327,
    "bounding_box": [
     26.1193,
     26.1897,
     -80.3618,
     -80.2178
    ],
    "display_name": "Sunrise, Broward County, Florida, United States"
   }
  ],
  "fetched_at": "2026-10-15T12:00:00.000Z",
  "attribution": "Data © OpenStreetMap contributors, ODbL"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nojunk-geo-geocode-577a1ea0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nojunk-geo.mick8511.workers.dev](https://www.zero.xyz/host/nojunk-geo.mick8511.workers.dev/llms.txt)
