Search
Search chats
client.chats.search(ChatSearchParams { accountIDs, cursor, direction, 9 more } query?, RequestOptionsoptions?): CursorSearch<Chat { id, accountID, network, 10 more } >
/v1/chats/search
Search chats by title/network or participants using Beeper Desktop's renderer algorithm.
Parameters
Returns
Search chats
import BeeperDesktop from '@beeper/desktop-api';
const client = new BeeperDesktop({
accessToken: 'My Access Token',
});
// Automatically fetches more pages as needed.
for await (const chat of client.chats.search()) {
console.log(chat.id);
}
{
"hasMore": true,
"items": [
{
"id": "!KPFTtZYWuERwib8T702N9IfqiCc:ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc.local-whatsapp.localhost",
"accountID": "local-whatsapp_ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc",
"network": "WhatsApp",
"participants": {
"hasMore": false,
"items": [
{
"id": "@kishanbagaria:local-whatsapp.localhost",
"cannotMessage": false,
"email": "email",
"fullName": "Kishan Bagaria",
"imgURL": "imgURL",
"isSelf": false,
"phoneNumber": "+15551112222",
"username": "username"
}
],
"total": 2
},
"title": "Kishan Bagaria",
"type": "single",
"unreadCount": 3,
"isArchived": false,
"isMuted": false,
"isPinned": true,
"lastActivity": "2025-08-31T19:41:41.000Z",
"lastReadMessageSortKey": "449706228480",
"localChatID": "1229391"
},
{
"id": "!nZeX7dh67_RaPnmWGJIjUkV2svE:ba_sXf0adnbr287.local-telegram.localhost",
"accountID": "local-telegram_ba_sXf0adnbr287_pRup35Tgl-lsIg",
"network": "Telegram",
"participants": {
"hasMore": false,
"items": [
{
"id": "@bradmurray:local-telegram.localhost",
"cannotMessage": false,
"email": "email",
"fullName": "Brad Murray",
"imgURL": "imgURL",
"isSelf": false,
"phoneNumber": "+15553334444",
"username": "username"
}
],
"total": 2
},
"title": "Brad Murray",
"type": "single",
"unreadCount": 0,
"isArchived": true,
"isMuted": false,
"isPinned": false,
"lastActivity": "2025-08-31T18:05:20.648Z",
"lastReadMessageSortKey": "449706782720",
"localChatID": "1229078"
},
{
"id": "!twitter_dm_photomatt:local-twitter.localhost",
"accountID": "local-twitter_ba_gUU1IHNGo_CsTZLp0vDFUYk9EuE",
"network": "Twitter/X",
"participants": {
"hasMore": false,
"items": [
{
"id": "@photomatt:local-twitter.localhost",
"cannotMessage": false,
"email": "email",
"fullName": "Matt Mullenweg",
"imgURL": "imgURL",
"isSelf": false,
"phoneNumber": "phoneNumber",
"username": "photomatt"
}
],
"total": 2
},
"title": "Matt Mullenweg",
"type": "single",
"unreadCount": 1,
"isArchived": false,
"isMuted": true,
"isPinned": false,
"lastActivity": "2025-08-31T12:30:15.123Z",
"lastReadMessageSortKey": "449705982340",
"localChatID": "1228956"
}
],
"newestCursor": "eyJ0cyI6MTc1NjY2OTMwMTAwMCwiaWQiOiIhblplWDdkZDY3X1JhUG5tV0dKSWpVa1Yyc3ZFOmJhX3NYZjBhZG5icjI4Ny5sb2NhbC10ZWxlZ3JhbS5sb2NhbGhvc3QiLCJzY29yZSI6MTAuNX0=",
"oldestCursor": "eyJ0cyI6MTc1NjY2NzEyMDY0OCwiaWQiOiIhS1BGVHRaWVd1RVJ3aWI4VDcwMjlOSWZxaUNjOmJhX0V2WURCQnNamlFSd0F5M1VPU1dxRzBMdVRWa2MiLCJzY29yZSI6MTJ9"
}
Returns Examples
{
"hasMore": true,
"items": [
{
"id": "!KPFTtZYWuERwib8T702N9IfqiCc:ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc.local-whatsapp.localhost",
"accountID": "local-whatsapp_ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc",
"network": "WhatsApp",
"participants": {
"hasMore": false,
"items": [
{
"id": "@kishanbagaria:local-whatsapp.localhost",
"cannotMessage": false,
"email": "email",
"fullName": "Kishan Bagaria",
"imgURL": "imgURL",
"isSelf": false,
"phoneNumber": "+15551112222",
"username": "username"
}
],
"total": 2
},
"title": "Kishan Bagaria",
"type": "single",
"unreadCount": 3,
"isArchived": false,
"isMuted": false,
"isPinned": true,
"lastActivity": "2025-08-31T19:41:41.000Z",
"lastReadMessageSortKey": "449706228480",
"localChatID": "1229391"
},
{
"id": "!nZeX7dh67_RaPnmWGJIjUkV2svE:ba_sXf0adnbr287.local-telegram.localhost",
"accountID": "local-telegram_ba_sXf0adnbr287_pRup35Tgl-lsIg",
"network": "Telegram",
"participants": {
"hasMore": false,
"items": [
{
"id": "@bradmurray:local-telegram.localhost",
"cannotMessage": false,
"email": "email",
"fullName": "Brad Murray",
"imgURL": "imgURL",
"isSelf": false,
"phoneNumber": "+15553334444",
"username": "username"
}
],
"total": 2
},
"title": "Brad Murray",
"type": "single",
"unreadCount": 0,
"isArchived": true,
"isMuted": false,
"isPinned": false,
"lastActivity": "2025-08-31T18:05:20.648Z",
"lastReadMessageSortKey": "449706782720",
"localChatID": "1229078"
},
{
"id": "!twitter_dm_photomatt:local-twitter.localhost",
"accountID": "local-twitter_ba_gUU1IHNGo_CsTZLp0vDFUYk9EuE",
"network": "Twitter/X",
"participants": {
"hasMore": false,
"items": [
{
"id": "@photomatt:local-twitter.localhost",
"cannotMessage": false,
"email": "email",
"fullName": "Matt Mullenweg",
"imgURL": "imgURL",
"isSelf": false,
"phoneNumber": "phoneNumber",
"username": "photomatt"
}
],
"total": 2
},
"title": "Matt Mullenweg",
"type": "single",
"unreadCount": 1,
"isArchived": false,
"isMuted": true,
"isPinned": false,
"lastActivity": "2025-08-31T12:30:15.123Z",
"lastReadMessageSortKey": "449705982340",
"localChatID": "1228956"
}
],
"newestCursor": "eyJ0cyI6MTc1NjY2OTMwMTAwMCwiaWQiOiIhblplWDdkZDY3X1JhUG5tV0dKSWpVa1Yyc3ZFOmJhX3NYZjBhZG5icjI4Ny5sb2NhbC10ZWxlZ3JhbS5sb2NhbGhvc3QiLCJzY29yZSI6MTAuNX0=",
"oldestCursor": "eyJ0cyI6MTc1NjY2NzEyMDY0OCwiaWQiOiIhS1BGVHRaWVd1RVJ3aWI4VDcwMjlOSWZxaUNjOmJhX0V2WURCQnNamlFSd0F5M1VPU1dxRzBMdVRWa2MiLCJzY29yZSI6MTJ9"
}