WeChat Reader — Local DB Query via chatlog-bot
Query WeChat chat history, contacts, and group chats from locally decrypted databases.
Prerequisites
chatlog-bot server running at http://127.0.0.1:5030.
# Check health
curl -s http://127.0.0.1:5030/health
API Reference
| Endpoint | Description |
|---|---|
GET /api/v1/session |
List recent conversations |
GET /api/v1/chatlog?keyword=<name>&limit=50 |
Chat history (fuzzy match) |
GET /api/v1/contact?keyword=<name> |
Search contacts |
GET /api/v1/chatroom?keyword=<name> |
Search group chats |
GET /health |
Health check |
Usage Examples
# List recent sessions
curl -s "http://127.0.0.1:5030/api/v1/session"
# Get chat history by name or chatroom ID
curl -s "http://127.0.0.1:5030/api/v1/chatlog?keyword=AI生产力训练营&limit=200"
# Search contacts
curl -s "http://127.0.0.1:5030/api/v1/contact?keyword=鸭哥"
Key Re-extraction
If WeChat restarts, run: ./scripts/rekey.sh
Limitations
- Read-only (cannot send messages)
- Keys tied to WeChat session — re-extract after restart
- Binary messages (images, stickers) appear as garbled data