Channel Search

Endpoints:

Scope: none

Retrieve a list of channels filtered by the given criteria.

Query Parameters

Sort

Name Description
order One of activity (most recent message), id (most recently created), or popularity (how many messages have been made). Default is by activity.

Filter

Name Description
q Basic text string searched for in names and descriptions in a channel's io.pnut.core.chat-settings raw.
categories Comma-separated list of: fun, lifestyle, profession, language, community, tech, event, general. Taken from io.pnut.core.chat-settings raw.
channel_types Comma-separated list of channel types to include
raw_types Comma-separated list of attached raw types. Any matches returned
exclude_channel_types Comma-separated list of channel types to exclude
is_private If true, only include private channels
is_public If true, only include public-readable channels
owner_id Channels owned by the included user ID
Example
curl "https://api.pnut.io/v0/channels/search?is_public=1&channel_types=io.pnut.core.chat&categories=fun" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns a list of channels

{
    "meta": {
        "more": false,
        "max_id": "0",
        "min_id": "0",
        "code": 200
    },
    "data": [
        {"...Channel Object..."}
    ]
}