wtsp.dev

API 参考

每次查询都是一个返回 JSON 的 GET 请求。这里列出全部接口,附价格、可复制的代码和示例响应。

基础 URLhttps://wtsp.dev

不是真人?请读 openapi.json、llms.txt 或 skill.md。

快速开始

三步拿到第一个结果。

  1. 01

    获取密钥

    最低 US$1.00 起充值。无需账号,无需订阅,余额永不过期。

  2. 02

    发送请求

    一个 GET 请求,把密钥放在 Authorization 请求头里。这个示例查询号码是否开通了 WhatsApp。

    curl "https://wtsp.dev/v1/exists?phone=14155550123" \  -H "Authorization: Bearer $WTSP_API_KEY"
  3. 03

    读取结果

    返回的是 JSON。响应里的 wtsp-credits-remaining 头会告诉你密钥还剩多少余额。

    200 OK
    wtsp-credits-remaining: 9.997

    {
      "phone": "+14155550123",
      "hasWhatsApp": true
    }

在做 AI 智能体?它不需要密钥:每次请求由它自己付款。用 skill.md 完成设置

付费方式

三种付费方式,价格相同。400 及以上的响应一律不收费。

  • API 密钥

    为你自己的代码准备的预付余额,以 Authorization: Bearer wtsp_… 发送。每个结果按价格从余额扣除,查询失败不收费,而且只有密钥才能在一次请求里发送最多 100 个号码。

  • 按次付费

    无需密钥,无需账号。第一次请求返回 402 和价格;客户端签署一笔 USDC 付款后重新发送。专为 AI 智能体设计,支持 Base 网络上的 x402 或 Tempo 网络上的 MPP。

    设置智能体

  • 网站上免费试用

    在网站上每天 5 次查询,无需注册:付费之前先看到真实结果。

    查询号码

查询

通过 x402 按请求付费,或使用 API 密钥。

WhatsApp check

GET/v1/exists

Whether a number has a WhatsApp account, and nothing else: the cheapest way to clean a list before paying for profiles. /v1/profile gives the same answer plus the account's details.

参数

phonestring · query必填

Phone number with its country code, e.g. +14155550123. The + is optional; spaces, dashes and a leading 00 are fine.

价格

0.003USDC per request

Every answer is charged, “not on WhatsApp” included; a lookup WhatsApp does not answer is free.

# Once: npx @wtsp/cli start, then fund the wallet it prints.# Each request pays for itself and prints JSON.npx @wtsp/cli exists +14155550123

+1 415 555 0123

已开通 WhatsApp

WhatsApp profile

GET/v1/profile

Whether a number is on WhatsApp and, if so: personal or business account, about text, country, linked devices and whether it runs on the Cloud API. Businesses add their public profile: name, description, categories, email, websites, address, coordinates, hours, join date and Facebook page. No photo or username; /v1/profile/full adds them.

参数

phonestring · query必填

Phone number with its country code, e.g. +14155550123. The + is optional; spaces, dashes and a leading 00 are fine.

价格

0.006USDC per request

Every answer is charged, “not on WhatsApp” included; a lookup WhatsApp does not answer is free.

# Once: npx @wtsp/cli start, then fund the wallet it prints.# Each request pays for itself and prints JSON.npx @wtsp/cli profile +14155550123
FM

Fresh Market SF

+1 415 555 0123 US

商家Grocery StoreFood delivery

Fresh groceries, delivered daily 🍋

Neighbourhood grocery with same-day delivery across San Francisco.

  • 123 Market St, San Francisco, CA 94103
  • freshmarket.example
  • hello@freshmarket.example
  • 周一 08:00-20:00, 周六 09:00-18:00, 周日 需预约
  • Joined in March, 2021
  • Fresh Market SF · 1840 个赞
  • 通过 WhatsApp 购物车销售

含手机共 2 台设备

WhatsApp profile + photo

GET/v1/profile/full

Everything /v1/profile returns, plus the profile photo as a permanent URL and a content hash (an unchanged hash means an unchanged photo), and the account's WhatsApp username (@handle). The URL is null when the account has no photo or hides it, and the username is null when it has none.

参数

phonestring · query必填

Phone number with its country code, e.g. +14155550123. The + is optional; spaces, dashes and a leading 00 are fine.

价格

0.01USDC per request

Every answer is charged, “not on WhatsApp” included; a lookup WhatsApp does not answer is free.

# Once: npx @wtsp/cli start, then fund the wallet it prints.# Each request pays for itself and prints JSON.npx @wtsp/cli profile +14155550123 --photo
FM

Fresh Market SF

+1 415 555 0123 US

商家@freshmarketsfGrocery StoreFood delivery

Fresh groceries, delivered daily 🍋

Neighbourhood grocery with same-day delivery across San Francisco.

  • 123 Market St, San Francisco, CA 94103
  • freshmarket.example
  • hello@freshmarket.example
  • 周一 08:00-20:00, 周六 09:00-18:00, 周日 需预约
  • Joined in March, 2021
  • Fresh Market SF · 1840 个赞
  • 通过 WhatsApp 购物车销售

含手机共 2 台设备

Carrier lookup

GET/v1/carrier

The carrier and line type of any number (mobile, fixed line or VoIP), plus its country, region, time zones and national and international formats. Works whether or not the number is on WhatsApp. Ported numbers report their original carrier.

参数

phonestring · query必填

Phone number with its country code, e.g. +14155550123. The + is optional; spaces, dashes and a leading 00 are fine.

价格

0.002USDC per request

Only charged when a carrier is on record; numbers without one (the US and Canada among them) get a free 404.

# Once: npx @wtsp/cli start, then fund the wallet it prints.# Each request pays for itself and prints JSON.npx @wtsp/cli carrier +447400123456

United Kingdom +44

Three

+44 7400 123456

mobileEurope/London

频道

搜索、排行榜、详情和帖子。付费方式相同。

Channel search

GET/v1/channels/search

Searches WhatsApp's channel directory the way its Channels tab does, and returns every match it gives, best first (45 to 60 for a common word): each channel's id, link code, name, description, exact follower count, green tick, creation date and picture.

参数

qstring · query必填

What to search for, as typed in WhatsApp's channel search: a name, a topic, a brand.

categorystring · query可选

Only channels in this category: `business`, `entertainment`, `lifestyle`, `news`, `organizations`, `people`, `sports`. One at a time.

价格

0.01USDC per request

Every answer is charged, an empty result or “no such channel” included; a request WhatsApp does not answer is free.

# Once: npx @wtsp/cli start, then fund the wallet it prints.# Each request pays for itself and prints JSON.npx @wtsp/cli search football
{
  "channels": [
    {
      "id": "120363421468257352@newsletter",
      "invite": "0029Vb6tXGL90x2oSNph2y19",
      "handle": null,
      "name": "Matchday Football",
      "description": "Scores, transfers and highlights from every league, every day ⚽",
      "followers": 1482907,
      "verified": true,
      "createdAt": "2024-02-18T09:12:44.000Z",
      "picture": "https://pps.whatsapp.net/m1/v/t24/AQN95N4DAkX_lpUAe9-IAUmr6bn-j2KMBUeOPVPNEflRM9PV2LIVeLotHAl9rlGnVrlPMDRbX?stp=dst-jpg_s192x192&oe=6AFADC18"
    },
    {
      "id": "120363302218843175@newsletter",
      "invite": "0029VaeWKs9I7BeMxk4QOV2s",
      "handle": "transferwatch",
      "name": "Transfer Watch",
      "description": "Confirmed deals and rumours, the minute they land.",
      "followers": 386114,
      "verified": false,
      "createdAt": "2024-05-30T17:40:02.000Z",
      "picture": "https://pps.whatsapp.net/m1/v/t24/AQN95N4DAkX_lpUAe9-IAUmr6bn-j2KMBUeOPVPNEflRM9PV2LIVeLotHAl9rlGnVrlPMDRbX?stp=dst-jpg_s192x192&oe=6AFADC18"
    }
  ]
}

Top channels

GET/v1/channels/top

One of the channel lists WhatsApp keeps per country (trending, popular, new, featured or recommended), whole, in its order: up to 500 channels (about 250 for recommended), with the same details as a search.

参数

countrystring · query必填

Whose list to read, as a two-letter country code (ISO 3166-1 alpha-2), e.g. US. WhatsApp keeps no worldwide list.

viewstring · query可选

Which list: `recommended`, `trending`, `popular`, `new`, `featured`. Defaults to `recommended`.

categorystring · query可选

Only channels in this category: `business`, `entertainment`, `lifestyle`, `news`, `organizations`, `people`, `sports`. One at a time.

价格

0.03USDC per request

Every answer is charged, an empty result or “no such channel” included; a request WhatsApp does not answer is free.

# Once: npx @wtsp/cli start, then fund the wallet it prints.# Each request pays for itself and prints JSON.npx @wtsp/cli top US --view trending
{
  "channels": [
    {
      "id": "120363421468257352@newsletter",
      "invite": "0029Vb6tXGL90x2oSNph2y19",
      "handle": null,
      "name": "Matchday Football",
      "description": "Scores, transfers and highlights from every league, every day ⚽",
      "followers": 1482907,
      "verified": true,
      "createdAt": "2024-02-18T09:12:44.000Z",
      "picture": "https://pps.whatsapp.net/m1/v/t24/AQN95N4DAkX_lpUAe9-IAUmr6bn-j2KMBUeOPVPNEflRM9PV2LIVeLotHAl9rlGnVrlPMDRbX?stp=dst-jpg_s192x192&oe=6AFADC18"
    },
    {
      "id": "120363302218843175@newsletter",
      "invite": "0029VaeWKs9I7BeMxk4QOV2s",
      "handle": "transferwatch",
      "name": "Transfer Watch",
      "description": "Confirmed deals and rumours, the minute they land.",
      "followers": 386114,
      "verified": false,
      "createdAt": "2024-05-30T17:40:02.000Z",
      "picture": "https://pps.whatsapp.net/m1/v/t24/AQN95N4DAkX_lpUAe9-IAUmr6bn-j2KMBUeOPVPNEflRM9PV2LIVeLotHAl9rlGnVrlPMDRbX?stp=dst-jpg_s192x192&oe=6AFADC18"
    }
  ]
}

Channel details

GET/v1/channels/info

A channel's details from its link, link code or id: name, description, exact follower count, green tick, creation date, picture, and whether it is active or suspended. A channel WhatsApp doesn't have comes back as null.

参数

channelstring · query必填

The channel: its link (https://whatsapp.com/channel/…), the code at the end of the link, or its id (<digits>@newsletter).

价格

0.004USDC per request

Every answer is charged, an empty result or “no such channel” included; a request WhatsApp does not answer is free.

# Once: npx @wtsp/cli start, then fund the wallet it prints.# Each request pays for itself and prints JSON.npx @wtsp/cli channel 0029Va4K0PZ5a245NkngBA2M
{
  "channel": {
    "id": "120363144038483540@newsletter",
    "invite": "0029Va4K0PZ5a245NkngBA2M",
    "handle": null,
    "name": "WhatsApp",
    "description": "WhatsApp’s official channel. Follow for our latest feature launches, updates, exclusive drops and more.",
    "followers": 233827056,
    "verified": true,
    "createdAt": "2023-07-07T16:21:35.000Z",
    "picture": "https://pps.whatsapp.net/m1/v/t24/AQN95N4DAkX_lpUAe9-IAUmr6bn-j2KMBUeOPVPNEflRM9PV2LIVeLotHAl9rlGnVrlPMDRbX?stp=dst-jpg_s192x192&oe=6AFADC18",
    "state": "active"
  }
}

Channel posts

GET/v1/channels/posts

A channel's posts, newest first, up to 300 a request and back 30 days (all WhatsApp keeps): text, media links, link previews, poll votes, reaction counts and forwards. Send a page's before back for the posts before it.

参数

channelstring · query必填

The channel: its link (https://whatsapp.com/channel/…), the code at the end of the link, or its id (<digits>@newsletter).

countinteger · query可选

How many posts, from 1 to 300 (the default).

beforeinteger · query可选

The `before` of an earlier page, for the posts before it. Leave it out for the latest posts.

价格

0.01USDC per request

Every answer is charged, an empty result or “no such channel” included; a request WhatsApp does not answer is free.

# Once: npx @wtsp/cli start, then fund the wallet it prints.# Each request pays for itself and prints JSON.npx @wtsp/cli posts 0029Va4K0PZ5a245NkngBA2M
{
  "channel": "120363144038483540@newsletter",
  "posts": [
    {
      "id": 801,
      "postedAt": "2026-11-12T21:58:41.000Z",
      "editedAt": null,
      "type": "image",
      "text": "*What We’re Channeling: Latin Pop* Big hooks, bigger energy, and choruses you play five times in a row.",
      "media": {
        "url": "https://mmg.whatsapp.net/m1/v/t24/AQMN9nbOMn8pcmJwYklDm9UfET3mYYYp_8MWgq309F47l8WjLFiISmDFtq5KSa2C7P87L?oe=6B1D9FFE",
        "mimetype": "image/jpeg",
        "bytes": 109901,
        "width": 1600,
        "height": 675,
        "seconds": null,
        "fileName": null
      },
      "linkPreview": null,
      "poll": null,
      "reactionCount": 12753,
      "reactions": [
        {
          "emoji": "👍",
          "count": 3885
        },
        {
          "emoji": "❤️",
          "count": 1725
        },
        {
          "emoji": "🙏",
          "count": 774
        }
      ],
      "forwards": 1322
    }
  ],
  "before": 801
}

API 密钥

预付一次,之后每次查询带上密钥即可。

Buy API credit

POST/v1/credits

Buy prepaid credit in whole USDC, paid with x402. Without an Authorization header a new API key is issued and returned once; with one, that key is topped up. The payment settles before any credit is written.

参数

amountinteger · query必填

Whole USDC to pay, from 1 to 5000. Every full 50 adds 2% bonus credit, up to 30%.

AuthorizationBearer wtsp_… · header可选

The key to top up. Leave it out to get a new key.

价格

1–5000USDC, the amount you pay

You pay the amount you choose, and it becomes credit at the same prices, with 2% more for every full 50 USDC, up to 30%. Credit never expires; failed lookups go back on it.

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";import { ExactEvmScheme } from "@x402/evm/exact/client";import { privateKeyToAccount } from "viem/accounts";
const wallet = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);const client = new x402Client().register("eip155:*", new ExactEvmScheme(wallet))  // x402 refuses payments above $1 unless told otherwise.  .setSpendControls({ maxAmountPerPayment: "$10" });const fetchWithPayment = wrapFetchWithPayment(fetch, client);
// A new key, holding 10 USDC. It is shown this once: save it.const res = await fetchWithPayment("https://wtsp.dev/v1/credits?amount=10", { method: "POST" });console.log(await res.json());
{
  "key": "wtsp_7Kq2xLmN4pR8sT1vW6yZ0aB3cD5eF9gH",
  "keyPrefix": "wtsp_7Kq2xLm",
  "added": "10",
  "balance": "10"
}

API key balance

GET/v1/credits

The credit left on an API key, and when it was last used. Free.

参数

AuthorizationBearer wtsp_… · header必填

Your API key.

价格

Free

Every paid response also carries the credit left in the wtsp-credits-remaining header.

curl "https://wtsp.dev/v1/credits" \  -H "Authorization: Bearer $WTSP_API_KEY"
{
  "keyPrefix": "wtsp_7Kq2xLm",
  "balance": "9.986",
  "createdAt": "2026-10-02T14:05:11.000Z",
  "lastUsedAt": "2026-10-09T18:24:03.000Z"
}

Bulk lookup

POST/v1/bulk

Runs one lookup (exists, profile, profileFull or carrier) on up to 100 numbers and answers each one, in the order sent, with the same JSON the single lookup returns. Same prices. API keys only: an x402 or MPP payment covers one number.

参数

AuthorizationBearer wtsp_… · header必填

Your API key.

lookupstring · body必填

Which lookup to run on every number: `exists`, `profile`, `profileFull` or `carrier`.

phonesstring[] · body必填

1 to 100 numbers with their country codes, written any way a single lookup accepts.

价格

Sameprice per answer

Each distinct number answered is charged once at its lookup's price. Typos, lookups WhatsApp did not answer and numbers without a carrier are free. The full price is held when the request starts; the unused part goes straight back on the key.

# Reads the key from WTSP_API_KEY and the numbers from a file, one per line.# A longer list goes out 100 numbers at a time.npx @wtsp/cli bulk exists numbers.txt
{
  "results": [
    {
      "input": "+14155550123",
      "answer": {
        "phone": "+14155550123",
        "hasWhatsApp": true
      }
    },
    {
      "input": "+44 7400 123456",
      "answer": {
        "phone": "+447400123456",
        "hasWhatsApp": false
      }
    },
    {
      "input": "+1415",
      "error": {
        "code": "invalid_phone",
        "message": "Wrong number of digits for its country. Include the country code, like +14155550123."
      }
    }
  ],
  "charged": "0.006",
  "balance": "9.98"
}

错误

所有错误都是同一种结构的 JSON:给程序读的代码,和给人读的说明。

状态码含义
200The answer, “not on WhatsApp” and “no such channel” included.
400A malformed number, channel link or parameter, rejected before any payment is asked for.
401The API key sent does not exist.
402Payment required, or the payment sent was invalid.
404no_carrierCarrier lookup only: no carrier on record for the number.
503lookup_failedWhatsApp did not answer. The payment is cancelled, never settled.

400 Bad Request

{
  "error": {
    "code": "invalid_phone",
    "message": "Wrong number of digits for its country. Include the country code, like +14155550123."
  }
}