Geofencing API
Know when people arrive, leave or stay.
Send a location and get back the geofences it's in and what changed since the last one. Enter, exit and dwell events go to your webhooks, signed so you can trust them. Geofences can be circles, polygons, or the area someone can reach in ten minutes on foot.
What you get
-
Circles, polygons and isochrones
Draw them, upsert them by tag and externalId, or give an address instead of coordinates. Isochrones cover 1 to 60 minutes by foot, bike, car, truck or motorbike, computed once with Valhalla.
-
Geofences from where your data is
Import GeoJSON or CSV (10,000 rows at a time), KML or zipped Shapefiles, or sync a PostGIS table so polygons follow your own data (Pro).
-
Events you can act on
Entered, exited and dwelled, with a confidence of 1 to 3 that allows for GPS accuracy. Stop detection, buffered entries and exits, and a maximum accuracy keep noisy fixes from firing events.
-
Rules per geofence
Operating hours in a time zone, temporary geofences that disable or delete themselves, restrictions to certain users or IPs, a dwell time, and up to 16 metadata keys you can filter on.
-
Lookups without state
Ask which geofences contain a point, check one geofence, search near a point by tag, or list who is inside a geofence now.
-
Webhooks and privacy
HMAC-SHA256 signatures and three delivery attempts. Mark events accepted or rejected, and delete a user with all their events and trips for privacy requests.
Try it
Copy this, swap in a key from your project, and run it.
curl https://api.mapsocket.com/v1/track \
-H "Authorization: pk_live_…" -H "Content-Type: application/json" \
-d '{"userId":"driver-118","latitude":40.7411,"longitude":-73.9897,"accuracy":12}' {
"user": { "userId": "driver-118", "geofenceIds": ["9c1e5a40-…"] },
"events": [{
"type": "user.entered_geofence",
"geofence": { "tag": "loading-bay", "externalId": "flatiron-02" },
"confidence": 3
}]
} On each plan
| Limit | Sandbox | Starter | Pro | Enterprise |
|---|---|---|---|---|
| Geofences | 100 | 5,000 | 100,000 | Unlimited |
| Tracked users / month | 100 | 5,000 | 50,000 | Unlimited |
| Geofences synced from PostGIS | No | No | Yes | Yes |
Full limits and prices on the pricing page.
Good to know
- There's no mobile SDK yet. Your app sends locations to /v1/track itself; background location and beacon ranging are the app's job.
- An isochrone is computed once, when it's saved. It doesn't follow live traffic.
Also in every MapSocket project
- Live vector tiles Vector tiles from your PostGIS tables that update seconds after a row changes.
- Files and web services Tiles from GeoJSON, Shapefiles, GeoPackages, Esri services and WFS, rebuilt when the data changes.
- Trips and ETAs Live ETAs, approaching and arrival events for deliveries, pickups and visits.
- Places, regions and fraud checks Every location named: the place, country and state, beacons, and whether to trust the fix.
- Georeferencer Put scanned maps, site plans and drone photos on the map, under your live data.
- Elevation API Ground elevation for up to 100 points per request, anywhere on Earth, in metres or feet.
- Custom tile domains Serve tiles from tiles.yourcompany.com, with certificates handled for you.
- MCP server for AI assistants Connect Claude, ChatGPT, Groq, Cursor and other assistants to your geofences, users, trips and events.