# Coordinate Conversion API
> Convert geographic coordinates between every common format. Turn a latitude/longitude pair into a Plus Code (Open Location Code, as used by Google Maps), an MGRS reference (Military Grid Reference System), a UTM coordinate (zone, hemisphere, easting, northing) or a DMS string (degrees-minutes-seconds) — and convert any of those back to latitude/longitude. The /v1/all endpoint returns every format at once. Each conversion runs fully locally (no third-party service) so responses are instant and always available. Live, no cache. 6 endpoints. Built for GIS, mapping, surveying, logistics, aviation, emergency services and any app that exchanges coordinates between systems. Complements geohash and CRS lookups without overlap. No upstream key.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/geoconvert-api/..."
```

## Pricing
- **Free** (Free) — 1,700 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 37,000 calls/Mo, 8 req/s
- **Pro** ($28/Mo) — 205,000 calls/Mo, 20 req/s
- **Mega** ($64/Mo) — 1,020,000 calls/Mo, 50 req/s

## Endpoints

### Convert

#### `GET /v1/all` — All formats at once

**Parameters:**
- `lat` (query, required, string) — Latitude (-90..90) Example: `47.36559`
- `lon` (query, required, string) — Longitude (-180..180) Example: `8.524997`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoconvert-api/v1/all?lat=47.36559&lon=8.524997"
```

**Response:**
```json
{
    "data": {
        "dms": {
            "latitude": "47°21'56.12\"N",
            "formatted": "47°21'56.12\"N 8°31'29.99\"E",
            "longitude": "8°31'29.99\"E"
        },
        "utm": {
            "easting": 464134.72,
            "northing": 5245901.48,
            "hemisphere": "N",
            "zone_letter": "T",
            "zone_number": 32
        },
        "mgrs": "32TMT6413445901",
        "latitude": 47.36559,
        "longitude": 8.524997,
        "plus_code": "8FVC9G8F+6X"
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:04.096Z",
        "request_id": "8f4ec0af-ef51-4497-b4c9-d204ae683834"
    },
    "status": "ok",
    "message": "All formats at once",
    "success": true
}
```

#### `GET /v1/dms` — DMS (degrees-minutes-seconds)

**Parameters:**
- `lat` (query, required, string) — Latitude (-90..90) Example: `47.36559`
- `lon` (query, required, string) — Longitude (-180..180) Example: `8.524997`
- `lat_dms` (query, optional, string) — Decode: latitude DMS
- `lon_dms` (query, optional, string) — Decode: longitude DMS

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoconvert-api/v1/dms?lat=47.36559&lon=8.524997"
```

**Response:**
```json
{
    "data": {
        "lat_dms": {
            "degrees": 47,
            "minutes": 21,
            "seconds": 56.12,
            "direction": "N",
            "formatted": "47°21'56.12\"N"
        },
        "lon_dms": {
            "degrees": 8,
            "minutes": 31,
            "seconds": 29.99,
            "direction": "E",
            "formatted": "8°31'29.99\"E"
        },
        "latitude": 47.36559,
        "formatted": "47°21'56.12\"N 8°31'29.99\"E",
        "longitude": 8.524997
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:04.213Z",
        "request_id": "e8cab9bf-1604-4c47-87b1-c1130cc83182"
    },
    "status": "ok",
    "message": "DMS conversion",
    "success": true
}
```

#### `GET /v1/mgrs` — MGRS

**Parameters:**
- `lat` (query, required, string) — Latitude (-90..90) Example: `47.36559`
- `lon` (query, required, string) — Longitude (-180..180) Example: `8.524997`
- `mgrs` (query, optional, string) — Decode an MGRS reference instead

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoconvert-api/v1/mgrs?lat=47.36559&lon=8.524997"
```

**Response:**
```json
{
    "data": {
        "mgrs": "32TMT6413445901",
        "latitude": 47.36559,
        "longitude": 8.524997
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:04.319Z",
        "request_id": "71fadc62-0f77-497d-bcb9-ca113320922f"
    },
    "status": "ok",
    "message": "MGRS conversion",
    "success": true
}
```

#### `GET /v1/pluscode` — Plus Code (Open Location Code)

**Parameters:**
- `lat` (query, required, string) — Latitude (-90..90) Example: `47.36559`
- `lon` (query, required, string) — Longitude (-180..180) Example: `8.524997`
- `code` (query, optional, string) — Decode a Plus Code instead

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoconvert-api/v1/pluscode?lat=47.36559&lon=8.524997"
```

**Response:**
```json
{
    "data": {
        "code": "8FVC9G8F+6X",
        "latitude": 47.36559,
        "longitude": 8.524997
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:04.426Z",
        "request_id": "862205cd-250b-4953-8a37-6eb047a9c68e"
    },
    "status": "ok",
    "message": "Plus Code (Open Location Code)",
    "success": true
}
```

#### `GET /v1/utm` — UTM

**Parameters:**
- `lat` (query, required, string) — Latitude (-90..90) Example: `47.36559`
- `lon` (query, required, string) — Longitude (-180..180) Example: `8.524997`
- `zone` (query, optional, string) — Decode: zone number
- `easting` (query, optional, string) — Decode: easting
- `northing` (query, optional, string) — Decode: northing

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoconvert-api/v1/utm?lat=47.36559&lon=8.524997"
```

**Response:**
```json
{
    "data": {
        "easting": 464134.72,
        "latitude": 47.36559,
        "northing": 5245901.48,
        "longitude": 8.524997,
        "hemisphere": "N",
        "zone_letter": "T",
        "zone_number": 32
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:04.529Z",
        "request_id": "34ff6824-2a2d-49d0-80cb-c1e9aada8b50"
    },
    "status": "ok",
    "message": "UTM conversion",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/geoconvert-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream; this gateway requires x-api-key",
        "name": "Coordinate Conversion API",
        "note": "Convert latitude/longitude between Plus Codes, MGRS, UTM and DMS. Each endpoint is bidirectional (lat/lon in, or the format in to get lat/lon). /v1/all returns every format at once. Fully local and instant. Complements geohash-api (geohash) and epsg-api (CRS metadata).",
        "source": "Local conversion (open-location-code, mgrs, utm) — no key, no upstream",
        "endpoints": 6
    },
    "meta": {
        "timestamp": "2026-06-02T16:52:04.593Z",
        "request_id": "4feb1941-6f06-4304-a4c9-18c2ede8e799"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/geoconvert-api
OpenAPI spec: https://www.oanor.com/api/geoconvert-api/openapi.json
