Authentication
All requests to the GeoAPI must be authenticated by including your secret API key in the request header.
Header:
X-API-Key: YOUR_SECRET_API_KEY
Reverse Geocoding
Convert geographic coordinates (latitude, longitude) into a human-readable address.
Endpoint
GET https://location-app.tail87cc57.ts.net/api/v1/reverse-geocode
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| lat | float | Yes | Latitude of the location. |
| lng | float | Yes | Longitude of the location. |
| lang | string | No | Language code (e.g., en, bn). |
Request Example
curl -G "<?php echo e(url('/api/v1/reverse-geocode')); ?>" -d "lat=23.7329" -d "lng=90.3943" -H "X-API-Key: YOUR_API_KEY"
import requests\n\napi_key = "YOUR_API_KEY"\nurl = "<?php echo e(url('/api/v1/reverse-geocode')); ?>?lat=23.7329&lng=90.3943"\nheaders = {"X-API-Key": api_key}\n\nresponse = requests.get(url, headers=headers)\nprint(response.json())
const fetch = require('node-fetch');\n\nconst apiKey = 'YOUR_API_KEY';\nconst url = '<?php echo e(url('/api/v1/reverse-geocode')); ?>?lat=23.7329&lng=90.3943';\n\nfetch(url, {\n headers: { 'X-API-Key': apiKey }\n})\n.then(res => res.json())\n.then(json => console.log(json));
Response Example
{
"status": "OK",
"message": "Success",
"data": {
"results": [
{
"place_id": 1,
"name": "Curzon Hall, University of Dhaka",
"formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
"geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
}
]
}
}
Layers
Retrieve geographic data layers for visualization.
Get Landmarks
Endpoint
GET https://location-app.tail87cc57.ts.net/api/v1/layers/landmarks
Request Example
curl "<?php echo e(url('/api/v1/layers/landmarks')); ?>" -H "X-API-Key: YOUR_API_KEY"
import requests\n\napi_key = "YOUR_API_KEY"\nurl = "<?php echo e(url('/api/v1/layers/landmarks')); ?>"\nheaders = {"X-API-Key": api_key}\nresponse = requests.get(url, headers=headers)\nprint(response.json())
const fetch = require('node-fetch');\nconst apiKey = 'YOUR_API_KEY';\nconst url = '<?php echo e(url('/api/v1/layers/landmarks')); ?>';\nfetch(url, { headers: { 'X-API-Key': apiKey } }).then(res => res.json()).then(json => console.log(json));
Response Example
{
"status": "OK",
"message": "Success",
"data": {
"results": [
{
"place_id": 1,
"name": "Curzon Hall, University of Dhaka",
"formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
"geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
}
]
}
}
Get Union Boundaries
Endpoint
GET https://location-app.tail87cc57.ts.net/api/v1/layers/unions
Request Example
curl "<?php echo e(url('/api/v1/layers/unions')); ?>" -H "X-API-Key: YOUR_API_KEY"
import requests\n\napi_key = "YOUR_API_KEY"\nurl = "<?php echo e(url('/api/v1/layers/unions')); ?>"\nheaders = {"X-API-Key": api_key}\nresponse = requests.get(url, headers=headers)\nprint(response.json())
const fetch = require('node-fetch');\nconst apiKey = 'YOUR_API_KEY';\nconst url = '<?php echo e(url('/api/v1/layers/unions')); ?>';\nfetch(url, { headers: { 'X-API-Key': apiKey } }).then(res => res.json()).then(json => console.log(json));
Response Example
{
"status": "OK",
"message": "Success",
"data": {
"results": [
{
"place_id": 1,
"name": "Curzon Hall, University of Dhaka",
"formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
"geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
}
]
}
}
Geofences
Manage and test virtual geographic boundaries.
Store Geofence
Endpoint
POST https://location-app.tail87cc57.ts.net/api/v1/geofences
Request Example
curl -X POST "<?php echo e(url('/api/v1/geofences')); ?>" -H "Content-Type: application/json" -H "X-API-Key: YOUR_API_KEY" -d '{"name": "My Geofence", "polygon": "POLYGON((...))"}'
import requests\n\napi_key = "YOUR_API_KEY"\nurl = "<?php echo e(url('/api/v1/geofences')); ?>"\npayload = {"name": "My Geofence", "polygon": "POLYGON((...))"}\nheaders = {"X-API-Key": api_key, "Content-Type": "application/json"}\nresponse = requests.post(url, json=payload, headers=headers)\nprint(response.json())
const fetch = require('node-fetch');\n\nconst apiKey = 'YOUR_API_KEY';\nconst url = '<?php echo e(url('/api/v1/geofences')); ?>';\nconst data = { name: 'My Geofence', polygon: 'POLYGON((...))' };\n\nfetch(url, {\n method: 'POST',\n headers: { 'X-API-Key': apiKey, 'Content-Type': 'application/json' },\n body: JSON.stringify(data)\n})\n.then(res => res.json())\n.then(json => console.log(json));
Response Example
{
"status": "OK",
"message": "Success",
"data": {
"results": [
{
"place_id": 1,
"name": "Curzon Hall, University of Dhaka",
"formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
"geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
}
]
}
}
Check Point
Endpoint
GET https://location-app.tail87cc57.ts.net/api/v1/geofences/check
Request Example
curl -G "<?php echo e(url('/api/v1/geofences/check')); ?>" -d "lat=23.7329" -d "lng=90.3943" -H "X-API-Key: YOUR_API_KEY"
import requests\n\napi_key = "YOUR_API_KEY"\nurl = "<?php echo e(url('/api/v1/geofences/check')); ?>?lat=23.7329&lng=90.3943"\nheaders = {"X-API-Key": api_key}\nresponse = requests.get(url, headers=headers)\nprint(response.json())
const fetch = require('node-fetch');\n\nconst apiKey = 'YOUR_API_KEY';\nconst url = '<?php echo e(url('/api/v1/geofences/check')); ?>?lat=23.7329&lng=90.3943';\n\nfetch(url, {\n headers: { 'X-API-Key': apiKey }\n})\n.then(res => res.json())\n.then(json => console.log(json));
Response Example
{
"status": "OK",
"message": "Success",
"data": {
"results": [
{
"place_id": 1,
"name": "Curzon Hall, University of Dhaka",
"formatted_address": "Curzon Hall, University of Dhaka, Dhaka",
"geometry": { "location": { "lat": 23.7329, "lng": 90.3943 } }
}
]
}
}