Get Nearby User API

The Get Nearby User API provides the list of users who are currently present within the given radius.

Get Nearby User API

GET https://api.roam.ai/v1/api/search/users/

Query Parameters

Name
Type
Description

user_id

string

Filters nearby user data for the given user_id’s last known location. E.g.- 5d9450ace47bae6d70064a9b

page_number

integer

Used to look through all pages of data. E.g.- 1

radius

integer

Search in the radius provided. E.g.- 10000

location

string

Origin location in [long, lat] format. E.g.- 12.98046, 80.16492

page_limit

integer

Number of objects to be returned in a page

Default: 10

Accepts: 10-100

Headers

Name
Type
Description

Api-key

string

Auth-key E.g.- 33223kjhdcscijhb5sdbsdmjsdcbj5f

{
    "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.roam.ai/v1/api/search/users/?user_id=5f2bd1e9b3611421f252e36c&radius=10000' \
--header 'Api-key: 9aab5c7882df4560a3d9418cb69dddef'

Last updated