export_contacts
Export WhatsApp contacts to CSV or JSON with sorted, deduplicated results; choose fields, filter saved contacts, and exclude non-dialable @lid IDs.
Instructions
Export all WhatsApp contacts as CSV (RFC 4180) or JSON. Deduped, sorted alphabetically by display name. Default format is CSV. JSON projects the requested fields. Available fields: jid, phone, name, pushname, is_my_contact, is_business. WhatsApp "@lid" privacy identifiers (opaque, non-dialable) are always excluded — only real phone-backed contacts are returned.
Examples: CSV all fields: { format: "csv" } JSON name + phone: { format: "json", fields: ["name", "phone"] } Filtered CSV: { format: "csv", query: "Argentina" } Saved contacts only: { format: "csv", is_my_contact: true }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Optional case-insensitive substring filter (matches name, pushname, phone, JID) | |
| fields | No | Whitelist of fields to include. Defaults to all six: jid, phone, name, pushname, is_my_contact, is_business | |
| format | No | Output format. Default "csv" | |
| is_my_contact | No | If true, only contacts saved in the user address book. If false, only un-saved. Omit to include both. |