Nearby API

get
Get Nearby Geofence API

https://api.geospark.co/v3/api/search/geofences/
Request
Response
Request
Headers
Api-key
required
string
Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f
Query Parameters
user_id
optional
string
Filters nearby geofence data for the given user_id’s last known location. E.g.- 5d9450ace47bae6d70064a9b
page_number
optional
integer
Used to go through all the pages of data. E.g.- 1
radius
optional
integer
Search in the radius provided. E.g.- 10000
location
optional
string
Origin location in [long, lat] format. E.g.- 12.98046,80.16492
Response
200: OK
{
"status": true,
"msg": "Success.",
"code": 200,
"data": {
"next_page": 2,
"pages": 4,
"prev_page": null,
"geofences": [
{
"id": "5eecc7481e621663c83ba278",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.09729,
12.92341
]
},
"is_enabled": true,
"description": "33",
"is_deleted": false,
"created_at": "2020-06-19T14:10:16.226",
"updated_at": "2020-06-19T14:10:16.226"
},
{
"id": "5eecc7471e621663c93ba2fc",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.1016,
12.92553
]
},
"is_enabled": true,
"description": "32",
"is_deleted": false,
"created_at": "2020-06-19T14:10:15.737",
"updated_at": "2020-06-19T14:10:15.737"
},
{
"id": "5eecc7471e621663c83ba277",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.10564,
12.92575
]
},
"is_enabled": true,
"description": "31",
"is_deleted": false,
"created_at": "2020-06-19T14:10:15.257",
"updated_at": "2020-06-19T14:10:15.257"
},
{
"id": "5eecc7461e621663c93ba2fb",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.10889,
12.92715
]
},
"is_enabled": true,
"description": "30",
"is_deleted": false,
"created_at": "2020-06-19T14:10:14.762",
"updated_at": "2020-06-19T14:10:14.762"
},
{
"id": "5eecc7461e621663c83ba276",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.11459,
12.93019
]
},
"is_enabled": true,
"description": "29",
"is_deleted": false,
"created_at": "2020-06-19T14:10:14.281",
"updated_at": "2020-06-19T14:10:14.281"
},
{
"id": "5eecc7451e621663c93ba2fa",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.11818,
12.93041
]
},
"is_enabled": true,
"description": "28",
"is_deleted": false,
"created_at": "2020-06-19T14:10:13.799",
"updated_at": "2020-06-19T14:10:13.799"
},
{
"id": "5eecc7451e621663c83ba275",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.12156,
12.93033
]
},
"is_enabled": true,
"description": "27",
"is_deleted": false,
"created_at": "2020-06-19T14:10:13.305",
"updated_at": "2020-06-19T14:10:13.305"
},
{
"id": "5eecc7441e621663c93ba2f9",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.12624,
12.93508
]
},
"is_enabled": true,
"description": "26",
"is_deleted": false,
"created_at": "2020-06-19T14:10:12.759",
"updated_at": "2020-06-19T14:10:12.759"
},
{
"id": "5eecc7441e621663c83ba274",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.12778,
12.93681
]
},
"is_enabled": true,
"description": "25",
"is_deleted": false,
"created_at": "2020-06-19T14:10:12.127",
"updated_at": "2020-06-19T14:10:12.127"
},
{
"id": "5eecc7431e621663c93ba2f8",
"account_id": "5c0179df6f994031158a5646",
"project_id": "5e95cbe83722794cf72ea0af",
"geometry_type": "circle",
"geometry_radius": 75,
"geometry_center": {
"type": "Point",
"coordinates": [
80.13224,
12.94162
]
},
"is_enabled": true,
"description": "24",
"is_deleted": false,
"created_at": "2020-06-19T14:10:11.643",
"updated_at": "2020-06-19T14:10:11.644"
}
]
}
}

Sample Request

curl --location --request GET 'https://api.geospark.co/v3/api/search/geofences/?radius=10000&location=12.98046,80.16492' \
--header 'Api-key: 50ccfe35a1ee409f9791cdee340e5864'

get
Get Nearby User API

https://api.geospark.co/v3/api/search/users/
Request
Response
Request
Headers
Api-key
required
string
Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f
Query Parameters
user_id
optional
string
Filters nearby user data for the given user_id’s last known location. E.g.- 5d9450ace47bae6d70064a9b
page_number
optional
integer
Used to look through all pages of data. E.g.- 1
radius
optional
integer
Search in the radius provided. E.g.- 10000
location
optional
string
Origin location in [long, lat] format. E.g.- 12.98046, 80.16492
Response
200: OK
{
"status": true,
"msg": "Success.",
"code": 200,
"data": {
"next_page": null,
"pages": 1,
"prev_page": null,
"users": [
{
"id": "5f5330d0163d9737ab23899a",
"app_id": "5ed0e627372279444054d310_2",
"coordinates": {
"type": "Point",
"coordinates": [
4.897948967438289,
52.354913586773314
]
},
"activity": "MOVING",
"battery_remaining": 87,
"created_at": "2020-09-30T07:25:55.251"
},
{
"id": "5f30d339b36114713d8b610e",
"app_id": "5ed0e627372279444054d310_2",
"coordinates": {
"type": "Point",
"coordinates": [
4.892291634692569,
52.351104736328125
]
},
"activity": "MOVING",
"battery_remaining": 19,
"created_at": "2020-08-26T07:29:41.080"
},
{
"id": "5f281dd8b3611402f3f79fe1",
"app_id": "5ed0e627372279444054d310_2",
"coordinates": {
"type": "Point",
"coordinates": [
4.891523594247752,
52.3529052734375
]
},
"activity": "STOP",
"accuracy": 31.336468528914295,
"timezone_offset": "+0200",
"net_stat": true,
"gps_stat": true,
"motion_stat": false,
"app_stat": "BACKGROUND",
"battery_remaining": 75,
"bat_stat": "Unplugged",
"created_at": "2020-08-10T04:09:13.792"
},
{
"id": "5f192614b361140ffbc21d3a",
"app_id": "5ed0e627372279444054d310_2",
"coordinates": {
"type": "Point",
"coordinates": [
4.891241524471621,
52.352149972864474
]
},
"activity": "MOVING",
"accuracy": 1414.0,
"timezone_offset": "+0200",
"net_stat": true,
"gps_stat": true,
"motion_stat": false,
"app_stat": "BACKGROUND",
"battery_remaining": 58,
"bat_stat": "Unplugged",
"created_at": "2020-07-30T18:16:23.085"
}
]
}
}

Sample Request

curl --location --request GET 'https://api.geospark.co/v3/api/search/users/?user_id=5f2bd1e9b3611421f252e36c&radius=10000' \
--header 'Api-key: 9aab5c7882df4560a3d9418cb69dddef'