User Search
Endpoints:
GET /users/search
Scope:
Retrieve a list of users filtered by the given criteria.
Query Parameters
Search
Name | Description |
---|---|
q |
List of words included in user profiles or names |
Sort
Name | Description |
---|---|
order |
One of id or relevance. Default is by relevance when a q value is set |
Filter
Name | Description |
---|---|
created_after |
ISO 8601-formatted timestamp after which users were created |
created_before |
ISO 8601-formatted timestamp before which users were created |
is_follower |
Whether to include users who follow you. Requires authentication |
is_following |
Whether to include users who you are following. Requires authentication |
locale |
Valid user locale e.g., en_US |
timezone |
Valid user timezone e.g., America/Chicago |
user_types |
Comma-separated list of user types of: human, feed, bot |
Example
curl "https://api.pnut.io/v1/users/search?q=news&user_types=feed" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of users
{
"meta": {
"more": false,
"max_id": "0",
"min_id": "0",
"code": 200
},
"data": [
{"...User Object..."},
{"...User Object..."}
]
}
GET /users/suggested
Token:
Scope:
Get a list of suggested users to follow. Effectively:
- followed by users you follow (if you are following some users)
- actively posts
- not blocked or muted
Example
curl "https://api.pnut.io/v1/users/suggested" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "X-Pretty-Json: 1"
Returns a list of users
{
"meta": {
"more": false,
"max_id": "0",
"min_id": "0",
"code": 200
},
"data": [
{"...User Object..."},
{"...User Object..."}
]
}