Searching users

You can use the REST API to search for visitors in your project using the POST call.

Searching for visitors

To search for visitors in your project using the REST API, you need to create a filters array.

Filters format

Objects in the filters array must contain a name and value parameter. An operator parameter is optional (default value is is):

POST https://api.eu.smartlook.cloud/api/v1/visitors/search
{
  "filters": [
    {
      "name": "uid",
      "value": "some-uid"
    }
  ]
}

You can also use an operator:

POST https://api.eu.smartlook.cloud/api/v1/visitors/search
{
  "filters": [
        {
            "name": "recording_date",
            "operator": "is",
            "value": "2023-05-18"
        }
    ]
}

The following table contains all possible combinations of operators and values for each possible filter.

Filter nameDescriptionAllowed operatorAllowed valueNotes
uidUnique user IDis<string>, [<string>,<string>,...]value can be an array
recording_dateDate of the session recordingbefore, after, is, in_range<string>,
[<string>,<string>,...]

[<string>,<string>]
Must be a date. When using in_range, must be an array with ["from date", "to date"]

For more information, see the Search visitors in the API reference.