This API finds user profiles that match specified filters but have no associated traffic events within a given time period. The API aggregates user external identifiers based on keyword filters applied to user profiles, returning only those users who exist in the system but have no events. This is useful for answering questions such as "find users interested in sports who haven't visited the site recently", where "users interested in sports" are the subject to filtering and the requested result is a set of external user identifiers that exist but have no events.
The user must be authenticated and have read permissions to the specified sites.
Request
The request object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
Array of String |
No |
The set of sites to search within. |
|
|
String |
No |
The site to search within. A more convenient alternative to |
|
|
Array of String |
No |
The set of site groups to search within. |
|
|
String |
No |
The site group to search within. A more convenient alternative to |
|
|
Array of Object |
No |
Filters to be applied. Conjunctive semantics ( |
|
|
Array of String |
Yes |
The external identifier prefixes to search for. |
|
|
String/Integer |
No |
Start time for the search period. Defaults to -1d (1 day ago). |
|
|
String/Integer |
No |
End time for the search period. Defaults to now. |
|
|
Integer |
No |
Starting offset for pagination. Defaults to 0. |
|
|
Integer |
No |
Maximum number of results to return. Defaults to 10,000. |
Response
The response object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Integer |
The number of external user identifiers returned in this response. |
|
|
Integer |
The total number of external user identifiers that match the criteria (before pagination). |
|
|
Array of Object |
Array of external identifier objects containing the users that match the criteria but have no events. |
Each object in the data array has the following structure:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The external identifier prefix. |
|
|
String |
The external user identifier. |
Examples
$ python cx.py /profile/keyword/data/no-events '{"siteIds":["12345"], "prefixes":["ada", "pxt"], "filters":[{"type":"user-external","group":"ada-yob","item":"1987"}]}'
{
"count": 2,
"totalCount": 2,
"data": [
{
"prefix": "ada",
"userId": "adabruker001"
},
{
"prefix": "pxt",
"userId": "pxtbruker002"
}
]
}
$ python cx.py /profile/keyword/data/no-events '{"siteId":"12345", "prefixes":["ada"], "start":"-7d", "stop":"-0d", "filters":[{"type":"user-external","group":"ada-interests","item":"money"}]}'
{
"count": 1,
"totalCount": 1,
"data": [
{
"prefix": "ada",
"userId": "adauser123"
}
]
}
Find users matching profile filters with pagination
$ python cx.py /profile/keyword/data/no-events '{"siteIds":["12345"], "prefixes":["ada", "pxt"], "paginationStart":0, "count":10, "filters":[{"type":"or", "filters":[{"type":"user-external","group":"ada-interests","item":"travel"},{"type":"user-external","group":"ada-interests","item":"sports"}]}]}'
{
"count": 10,
"totalCount": 25,
"data": [
{
"prefix": "ada",
"userId": "adauser001"
},
{
"prefix": "ada",
"userId": "adauser002"
},
{
"prefix": "ada",
"userId": "adauser003"
},
{
"prefix": "ada",
"userId": "adauser004"
},
{
"prefix": "ada",
"userId": "adauser005"
},
{
"prefix": "pxt",
"userId": "pxtuser001"
},
{
"prefix": "pxt",
"userId": "pxtuser002"
},
{
"prefix": "pxt",
"userId": "pxtuser003"
},
{
"prefix": "pxt",
"userId": "pxtuser004"
},
{
"prefix": "pxt",
"userId": "pxtuser005"
}
]
}