Geofencing API

Real-time Location Intelligence for Your Applications

Integrate powerful geofencing capabilities into your applications with our RESTful API. Detect entry, exit, and presence within defined geographic boundaries.

Try API Demo View Documentation
API Endpoint POST /api/v1/geofence/check GET /api/v1/geofence/{id} PUT /api/v1/geofence/{id} Request lat: 28.6139 lng: 77.2090 geofence_id: "residential_001" Response status: "inside" geofence_name: "Residential Zone" distance_to_boundary: 150.5

API Features & Capabilities

Real-time Detection

Millisecond response times for detecting location within geofences with high accuracy.

Multi-layer Geofencing

Support for complex nested geofences and overlapping boundaries with priority levels.

Historical Analysis

Track movement patterns and dwell times with comprehensive historical data APIs.

Webhook Support

Receive instant notifications via webhooks when devices enter or exit geofences.

Enterprise Security

OAuth2, API keys, and IP whitelisting with comprehensive audit logging.

Analytics Dashboard

Built-in analytics for monitoring API usage, performance, and geofence effectiveness.

API Documentation

POST /api/v1/geofence/check

Check if a point is inside any geofence and retrieve relevant metadata.

Request

{
  "latitude": 28.6139,
  "longitude": 77.2090,
  "geofence_ids": ["residential_001", "commercial_005"],
  "radius": 1000,
  "include_metadata": true
}

Parameters

Parameter Type Required Description
latitude float Yes Latitude of the point to check
longitude float Yes Longitude of the point to check
geofence_ids array No Specific geofences to check against
radius integer No Search radius in meters (default: 5000)
include_metadata boolean No Include detailed geofence metadata

Response

{
  "status": "success",
  "data": {
    "inside_geofences": [
      {
        "geofence_id": "residential_001",
        "name": "Tech Park Alpha",
        "type": "residential",
        "distance_to_boundary": 150.5,
        "entry_gates": ["north_gate", "south_gate"]
      }
    ],
    "nearby_geofences": [
      {
        "geofence_id": "commercial_005",
        "name": "Shopping Complex Beta",
        "type": "commercial",
        "distance": 350.2
      }
    ]
  }
}

GET /api/v1/geofence/{id}

Retrieve detailed information about a specific geofence.

Response

{
  "status": "success",
  "data": {
    "geofence_id": "residential_001",
    "name": "Tech Park Alpha",
    "type": "residential",
    "boundary": {
      "type": "Polygon",
      "coordinates": [[[77.205,28.615],[77.215,28.615],[77.215,28.625],[77.205,28.625],[77.205,28.615]]]
    },
    "metadata": {
      "gates": [
        {"name": "north_gate", "coordinates": [77.205,28.618]},
        {"name": "south_gate", "coordinates": [77.215,28.622]}
      ],
      "buildings": ["Tower A", "Tower B"],
      "area_sq_m": 25000
    },
    "created_at": "2023-10-15T10:30:00Z",
    "updated_at": "2023-11-20T14:45:00Z"
  }
}

POST /api/v1/webhook

Register a webhook to receive real-time geofence events.

Request

{
  "url": "https://yourapp.com/webhooks/geofence",
  "events": ["enter", "exit", "dwell"],
  "geofence_ids": ["residential_001", "commercial_005"],
  "secret": "your_webhook_secret"
}

Try the API

Interactive API Demo

Click anywhere on the map to test the API

API Tester

Integration Examples

JavaScript SDK

// Install SDK
npm install @atlasgeotech/geofence-api

// Initialize
const geofence = new AtlasGeofenceAPI({
  apiKey: 'your-api-key',
  baseURL: 'https://api.atlasgeotech.com'
});

// Check location
const result = await geofence.check({
  latitude: 28.6139,
  longitude: 77.2090
});

console.log(result.inside_geofences);

Python Integration

import requests

api_key = "your-api-key"
url = "https://api.atlasgeotech.com/api/v1/geofence/check"

payload = {
    "latitude": 28.6139,
    "longitude": 77.2090,
    "include_metadata": True
}

headers = {
    "Authorization": f"Bearer {api_key}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)
data = response.json()

print(f"Inside geofences: {data['inside_geofences']}")

Pricing Plans

Starter

$49/month

  • 10,000 API calls/month
  • Up to 100 geofences
  • Basic analytics
  • Email support

Professional

$199/month

  • 100,000 API calls/month
  • Up to 1,000 geofences
  • Advanced analytics
  • Priority support
  • Webhook support

Enterprise

Custom Pricing

  • Unlimited API calls
  • Unlimited geofences
  • Custom analytics
  • 24/7 dedicated support
  • SLA guarantee

Start Building with Our Geofencing API

Join thousands of developers using our API to build location-aware applications.