---
name: wtsp
description: Look up phone numbers on WhatsApp (whether a number is registered, its business profile, its profile photo), find a number's carrier and line type, and scrape WhatsApp channels (search the directory, read a country's top channels, a channel's followers and its posts), paid per request in USDC on Base with x402 or stablecoins on Tempo with MPP, or from a prepaid wtsp API key. Use when the user asks if a number is on WhatsApp, which business is behind a number, wants WhatsApp details for leads or contacts, asks for a number's carrier, or wants data on WhatsApp channels.
---

# wtsp: WhatsApp lookups

WhatsApp data for any phone number or channel. Each call costs 0.002 to 0.03 USD, paid from a wallet the CLI creates (USDC on Base with x402, or stablecoins on Tempo with MPP) or from a prepaid API key. No account needed.

## Set up once

If the user has a wtsp API key (it starts with `wtsp_`), it pays instead of a wallet: set `WTSP_API_KEY` to it in the environment the commands run in, and skip to "Before lookups".

Otherwise, create a wallet:

    npx @wtsp/cli start

This creates a wallet at ~/.wtsp/wallet.json and prints its address. If the wallet already exists it just shows it again; it never replaces it.

If this skill was set up "with MPP", switch the payment mode before anything else:

    npx @wtsp/cli mode mpp   # pay with stablecoins on Tempo (MPP)
    npx @wtsp/cli mode x402  # pay with USDC on Base (x402, the default)

Then show the user the full wallet address and what to send it, exactly as `start` (or `balance`) words it: USDC on Base in x402 mode, a Tempo stablecoin in MPP mode. No gas token is needed. Wait until they confirm it is funded before any lookup.

## Before lookups

    npx @wtsp/cli balance

With a key, this shows the credit left on it; without one, what the wallet holds.

- Nothing to pay with: show the full address, ask the user to fund it, and stop. A key out of credit is topped up at https://wtsp.dev/pricing#keys: send the user there, and stop.
- A low-balance or low-credit line on stderr: carry on, but pass it on to the user in full.

## Lookups

    npx @wtsp/cli exists +14155550123           # 0.003 USDC: Whether a number is on WhatsApp: a plain yes or no.
    npx @wtsp/cli profile +14155550123          # 0.006 USDC: Registration, account type, about text and the full business profile.
    npx @wtsp/cli profile +14155550123 --photo  # 0.01 USDC: Everything in /v1/profile plus a permanent profile-photo URL and the WhatsApp username.
    npx @wtsp/cli carrier +447400123456         # 0.002 USDC: Carrier, line type, country, region and time zones of any number.
    npx @wtsp/cli bulk exists numbers.txt       # any lookup above on a list of numbers, one per line (API key only)
    npx @wtsp/cli endpoints                     # every endpoint with its price and description, as JSON

- Always pass the number with its country code.
- The JSON result goes to stdout; the payment receipt goes to stderr and can be ignored.
- Exit code 1 means nothing was charged, except a `bulk` list cut short: the answers it printed were charged. The stderr line says why: a malformed number, no carrier on record, WhatsApp did not answer (retry in a minute), or not enough funds or credit.
- Use `exists` when the question is only whether a number is on WhatsApp; it costs the least.
- Use `--photo` only when the photo or username is needed; it costs more. `--username` is the same request.
- For a list with an API key, use `bulk` with `exists`, `profile` (`--photo` or `--username` for full profiles) or `carrier`. It reads the numbers from a file or stdin, sends them 100 at a time at the same price per number, and prints every answer in one JSON object. Without a key, run one lookup per number.

## WhatsApp channels

    npx @wtsp/cli search football                   # 0.01 USDC: Search WhatsApp's channel directory: up to about 60 channels, best match first.
    npx @wtsp/cli top US --view trending            # 0.03 USDC: A country's channel rankings: up to 500 trending, popular, new or featured channels.
    npx @wtsp/cli channel 0029Va4K0PZ5a245NkngBA2M  # 0.004 USDC: One channel from its link: name, description, followers, green tick and state.
    npx @wtsp/cli posts 0029Va4K0PZ5a245NkngBA2M    # 0.01 USDC: Up to 300 of a channel's posts per request, with media, polls, reactions and forwards.

- `channel` and `posts` take a channel's link as the user pasted it, the code at its end, or its id.
- `top` needs a two-letter country code; `--view` is recommended, trending, popular, new, featured. `search` and `top` take an optional `--category`: business, entertainment, lifestyle, news, organizations, people, sports.
- Posts go back 30 days. `--count` sets how many; for older posts, pass the `before` of the last page as `--before`.
- Picture and media links expire within days: download what the user wants to keep.

## Reading results

- `hasWhatsApp: false` is a definitive answer: the number is not on WhatsApp.
- Personal accounts publish no name, and `business` is null for them.
- `username` (full profile only) is the account's @handle, or null when it has none; absent means it isn't known.
- `profile.aboutRestricted: true` means the about text exists but privacy settings hide it.
- Ported numbers show their original carrier.
- `channel: null` is a definitive answer too: WhatsApp has no such channel.

## Rules

- Never print or share the wallet file, its private key or the API key. Always show wallet addresses in full.
- Only pay for lookups the user asked for.

Full API reference: https://wtsp.dev/llms.txt
