OSRMRoute

Geofencing API

Real-time

Test in one call which of your zones each point falls inside — polygon or circular fences.

Overview

The Geofencing API checks, in a single request, which of your zones each point is inside. Define fences as polygons or as a center + radius, then send a batch of points; the response lists the matching fence ids per point. Pure geometry, computed in-house with no rate-dependent upstreams — ideal for delivery zones, alerts and access control.

API reference

POST/api/1/geofence
ParameterTypeStatus
fencesarrayRequired
pointsarrayRequired

Example request

Credit cost: 1 credit / 100 points
curl -X POST "https://osrmroute.com/api/1/geofence?key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"fences":[{"id":"zone1","polygon":[[40.40,49.85],[40.43,49.85],[40.43,49.90],[40.40,49.90]]}],"points":[[40.41,49.87],[40.50,50.10]]}'

Other services