Skip to content

WhatsApp

MetadataValue
Categorycomms
Capabilitiessql
Websitehttps://www.whatsapp.com/
  • db

Read WhatsApp messages from the local macOS database. Read-only access to message history.

  • macOS only — Reads from local WhatsApp database
  • WhatsApp desktop app — Must be installed and logged in

Conversations use numeric IDs (SQLite primary keys like 880, 899). Always use the id returned by list_conversations — these are not JIDs.

  • Get active chats: list_conversations (default — non-archived only)
  • Get archived chats: list_conversations with archived: true
  • Get unread messages: list_messages with unread: true (no conversation_id needed)
  • Get group participants: list_persons with conversation_id param
  • Search messages: search_messages with query param

WhatsApp uses two identifier formats:

  • JID: 12125551234@s.whatsapp.net (phone-based, used for DMs)
  • LID: opaque_id@lid (server-assigned, newer format)

The list_persons operation resolves both formats to phone numbers when available via the contacts database.

  • person — the human, with phone number and name from contacts
  • account — their WhatsApp identity (JID/LID), linked to person via claim relationship
  • conversation — a chat thread, with participant → account reference for the DM partner
  • message — a text message, with from → account reference for the sender

This means: person → claims → account → sends → message. Traverse the graph to connect messages to people.

  • is_outgoing: true indicates messages you sent
  • Incoming messages include a from account reference for the sender’s WhatsApp identity
  • Media-only messages (images, voice notes) without text are excluded from message queries
  • All timestamps are ISO 8601 format