Skip to main content
GET/users/search/?custom_attr__gte=:10

Filter users by custom attribute

You can return users based on their custom attributes.

AttributesTypeRequiredDescription
custom_attrstringyesA name of your custom attribute.
LookupsWorks withDescription
__ltintegerless than
__lteintegerless than or equal
__gtintegergreater than
__gteintegergreater than or equal
__startswithstringvalue of given attribute starts with (case sensitive)
__istartswithstringvalue of given attribute starts with (case insensitive)
__endswithstringvalue of given attribute ends with (case sensitive)
__iendswithstringvalue of given attribute ends with (case insensitive)
__containsstringvalue of given attribute contains string (case insensitive)
__icontainsstringvalue of given attribute contains string (case insensitive)

Request​

curl -X GET -H "Authorization: Token <your_64_char_api_key>"
-H "Accept: */*; version=2"
"https://<your_app_subdomain>.user.com/api/public/users/search/?custom_attr__gte=10"

Response​

{
"count": 3,
"next": null,
"previous": null,
"results": [
{
"id": 41762938,
"key": "KSkZrYtUZ0PW",
"name": John,
"email": Doe,
"gender": "unknown",
"status": "vistor",
"phone_number": null,
"first_seen": "2017-09-22T12:08:28.490534Z",
"last_seen": "2017-09-22T12:08:28.500483Z",
"page_views": 1,
"last_ip": "213.216.69.162",
"timezone": "Europe/Kaliningrad",
"city": null,
"region": null,
"country": "Poland",
"unsubscribed": false,
"browser_language": "pl",
"score": 0,
"browser": "Opera",
"os_type": "Linux",
"resolution": "1920x1080",
"created_at": "2017-09-22T12:08:28.502834Z",
"updated_at": "2017-09-25T13:10:34.616559Z",
"attributes": [
{
"name_std": "ordered_items",
"name": "ordered_items",
"value": 11,
"id": 248806
}
],
"gravatar_url": null,
"lists": [],
"tags": [],
"notifications": true,
"facebook_url": null,
"linkedin_url": null,
"twitter_url": null,
"google_url": null,
"chat_id": "Chat ID is deprecated and will be removed in future",
"last_contacted": null,
"user_id": null
},
{
"id": 41757460,
"key": "4oiw2fRWyVSs",
"name": Jane,
"email": Doe,
"gender": "unknown",
"status": "vistor",
"phone_number": null,
"first_seen": "2017-09-22T11:41:25.312941Z",
"last_seen": "2017-09-22T11:41:25.331167Z",
"page_views": 1,
"last_ip": "213.216.69.162",
"timezone": "Europe/Kaliningrad",
"city": null,
"region": null,
"country": "Poland",
"unsubscribed": false,
"browser_language": "pl",
"score": 0,
"browser": "Opera",
"os_type": "Linux",
"resolution": "1920x1080",
"created_at": "2017-09-22T11:41:25.334508Z",
"updated_at": "2017-09-25T13:10:49.155165Z",
"attributes": [
{
"name_std": "ordered_items",
"name": "ordered_items",
"value": 17,
"id": 248806
}
],
"gravatar_url": null,
"lists": [],
"tags": [],
"notifications": true,
"facebook_url": null,
"linkedin_url": null,
"twitter_url": null,
"google_url": null,
"chat_id": "Chat ID is deprecated and will be removed in future",
"last_contacted": null,
"user_id": null
},
{
"id": 41742710,
"key": "SvepkkkqXykw",
"name": John Junior,
"email": Doe,
"gender": "unknown",
"status": "vistor",
"phone_number": null,
"first_seen": "2017-09-22T10:31:39.473347Z",
"last_seen": "2017-09-22T10:31:39.495327Z",
"page_views": 1,
"last_ip": "213.216.69.162",
"timezone": "Europe/Kaliningrad",
"city": null,
"region": null,
"country": "Poland",
"unsubscribed": false,
"browser_language": "pl",
"score": 0,
"browser": "Opera",
"os_type": "Linux",
"resolution": "1920x1080",
"created_at": "2017-09-22T10:31:39.498994Z",
"updated_at": "2017-09-25T13:10:59.566249Z",
"attributes": [
{
"name_std": "ordered_items",
"name": "ordered_items",
"value": 10,
"id": 248806
}
],
"gravatar_url": null,
"lists": [],
"tags": [],
"notifications": true,
"facebook_url": null,
"linkedin_url": null,
"twitter_url": null,
"google_url": null,
"chat_id": "Chat ID is deprecated and will be removed in future",
"last_contacted": null,
"user_id": null
}
]
}