Search chats by title/network or participants using Beeper Desktop’s renderer algorithm.
Parameters
account_ids: Optional[Sequence[str]]
Provide an array of account IDs to filter chats from specific messaging accounts only
include_muted: Optional[bool]
Include chats marked as Muted by the user, which are usually less important. Default: true. Set to false if the user wants a more refined search.
last_activity_after: Optional[Union[str, datetime]]
Provide an ISO datetime string to only retrieve chats with last activity after this time
formatdate-time
last_activity_before: Optional[Union[str, datetime]]
Provide an ISO datetime string to only retrieve chats with last activity before this time
formatdate-time
limit: Optional[int]
Set the maximum number of chats to retrieve. Valid range: 1-200, default is 50
minimum1
maximum200
Search chats
import os
from beeper_desktop_api import BeeperDesktop
client = BeeperDesktop(
access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted
)
page = client.chats.search()
page = page.items[0]
print(page.id){
"hasMore": true,
"items": [
{
"id": "!KPFTtZYWuERwib8T702N9IfqiCc:ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc.local-whatsapp.localhost",
"accountID": "local-whatsapp_ba_EvYDBBsZbRQAy3UOSWqG0LuTVkc",
"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",
"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",
"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",
"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",
"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",
"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"
}