Catalog/maps-geo

Maps

Geospatial math (bearing, area, point-in-polygon) API

Pure geospatial math on coordinates: great-circle distance, initial bearing, destination point (from bearing+distance), midpoint, bounding box, point-in-polygon, and spherical polygon area. The trig is fiddly; this is deterministic. Answers 'bearing from A to B', 'is this point inside this polygon', 'area of this polygon', 'point N km from here at bearing X'.

Price$0.01per request
MethodPOST
Route/v1/maps/geo
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
mapsgeobearingpolygonpoint-in-polygonareageospatialhaversine
API URLhttps://x402.hexl.dev/v1/maps/geo
Integration docs
Example request
{
  "op": "bearing",
  "from": {
    "latitude": 40.7128,
    "longitude": -74.006
  },
  "to": {
    "latitude": 42.3601,
    "longitude": -71.0589
  }
}
Example response
{
  "op": "bearing",
  "bearingDegrees": 54.12
}
Input schema
{
  "type": "object",
  "required": [
    "op"
  ],
  "properties": {
    "op": {
      "type": "string",
      "enum": [
        "distance",
        "bearing",
        "destination",
        "midpoint",
        "point-in-polygon",
        "area",
        "bbox"
      ]
    },
    "from": {
      "type": "object"
    },
    "to": {
      "type": "object"
    },
    "bearing": {
      "type": "number"
    },
    "distanceKm": {
      "type": "number"
    },
    "point": {
      "type": "object"
    },
    "polygon": {
      "type": "array"
    },
    "points": {
      "type": "array"
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}