# Mapbox Geocoding via API OSK Gateway

> Mapbox Geocoding via API OSK Gateway is a paid API for AI agents from gateway.apiosk.com, paid per call via x402, $0.165/call, status down (last checked 2026-09-15).

Converts a place name or address string into geographic coordinates and structured location metadata using Mapbox

## Facts

- Endpoint: GET https://gateway.apiosk.com/mapbox/geocode
- Price: $0.165/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mapbox-geocoding-via-api-osk-gateway-06ad726e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rox5Q3pHRzNU9uN9UOFIW

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 mapbox-geocoding-via-api-osk-gateway-06ad726e
```

Example prompt: What are the coordinates and full address breakdown for San Francisco? I need the latitude, longitude, region, country, and district.

## When to prefer this

Use this endpoint when you need to geocode a place name or address into geographic coordinates and want rich structured metadata (region, country, district, wikidata IDs) in GeoJSON format. Prefer this over raw Mapbox API calls if you need pay-per-use billing via x402/USDC without managing Mapbox API keys directly.

## Known failure modes

- Unrecognized or misspelled place name returns empty features array
- Ambiguous location query may return unexpected top result
- Missing or malformed query parameter returns error
- Payment failure (x402) if USDC balance is insufficient
- Rate limiting or gateway timeout on high-traffic periods

## How this service works

API call to mapbox

## Output

Returns a GeoJSON FeatureCollection with one or more place features, each containing: coordinates (latitude/longitude), full address string, place name, region name and code, country name and code, district name, mapbox_id, and wikidata_id for the matched location.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "required": {
   "type": "string"
  },
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "FeatureCollection",
 "features": [
  {
   "id": "dXJuOm1ieHBsYzpFVzBJN0E",
   "type": "Feature",
   "geometry": {
    "type": "Point",
    "coordinates": [
     -122.419359,
     37.779238
    ]
   },
   "properties": {
    "name": "San Francisco",
    "context": {
     "place": {
      "name": "San Francisco",
      "mapbox_id": "dXJuOm1ieHBsYzpFVzBJN0E",
      "wikidata_id": "Q62"
     },
     "region": {
      "name": "California",
      "mapbox_id": "dXJuOm1ieHBsYzpCbVRz",
      "region_code": "CA",
      "wikidata_id": "Q99",
      "region_code_full": "US-CA"
     },
     "country": {
      "name": "United States",
      "mapbox_id": "dXJuOm1ieHBsYzpJdXc",
      "wikidata_id": "Q30",
      "country_code": "US",
      "country_code_alpha_3": "USA"
     },
     "district": {
      "name": "San Francisco County",
      "mapbox_id": "dXJuOm1ieHBsYzpBVG1HN0E",
      "wikidata_id": "Q62"
     }
    },
    "mapbox_id": "dXJuOm1ieHBsYzpFVzBJN0E",
    "coordinates": {
     "latitude": 37.779238,
     "longitude": -122.419359
    },
    "feature_type": "place",
    "full_address": "San Francisco, California, United States",
    "name_preferred": "San Francisco",
    "place_formatted": "California, United States"
   }
  }
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapbox-geocoding-via-api-osk-gateway-06ad726e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.apiosk.com](https://www.zero.xyz/host/gateway.apiosk.com/llms.txt)
