How to Check if a Phone Number Is on WhatsApp (API)
If you collect phone numbers from sign-up forms, CRM imports, ad leads or purchased lists, a surprising share of them will not be reachable on WhatsApp. Sending campaigns or onboarding flows to numbers that were never registered wastes budget and hurts delivery rates. A WhatsApp number checker solves this by telling you, before you send anything, whether a number is actually registered.
This guide shows how to check a single number, how to read the three possible answers, and how to check numbers in batches, with copy-paste Python.
What "checking a number" returns
A registration check takes a phone number and tells you whether it is linked to an active WhatsApp account. For registered numbers the full check also hands back a userHash and a hasExtra summary, which let you pull public profile data (photo, About text, business profile) in a second, separate step. If all you need is the yes or no, you never have to make that second step.
Step 1: Get an API key
All requests are authenticated with an API key:
Every new account includes free credits, so you can test the API without paying anything.
Step 2: Check a single number
Call check-exist-by-phone with the full international number. The number can be written with or without a leading +, and spaces, dashes or a 00 prefix are accepted, because the country code and national number are parsed automatically:
curl "https://api.opendata-api.com/api/project/whatsapp/check-exist-by-phone?key=YOUR_API_KEY&phoneNumber=15551234567"
The answer is in isExist, and it has three states:
true: the number is registered on WhatsApp. The response also carries auserHash(valid for 24 hours) andhasExtra.false: the number is not registered.null: indeterminate. Retry after a short backoff; do not mark the number as unreachable.
If you already keep the country code and the national number in separate columns, check-exist-by-cc-phone takes them as cc and phone. And when you just want a fast active or not answer inside a sign-up flow, check-active returns a direct active flag for the full number, with no userHash involved.
Cleaning your input is still good practice. Keep digits and the country code, drop obviously broken values before you spend a request on them, and store one canonical form per contact so duplicates collapse.
Step 3: Check numbers in bulk
Checking thousands of leads one request at a time is slow. batch-check-10 checks up to 10 numbers per request. Pass them as a comma-separated list in accounts, and the reply reports for each number whether it is on WhatsApp and whether it is a business account:
curl "https://api.opendata-api.com/api/project/whatsapp/batch-check-10?key=YOUR_API_KEY&accounts=15551234567,15557654321,442071234567"
For longer lists, loop in groups of 10. The full strategy, including retries and storing results, is in how to bulk-verify WhatsApp numbers.
A reusable Python function
import requests
API_KEY = "YOUR_API_KEY"
BASE = "https://api.opendata-api.com/api/project/whatsapp"
def is_on_whatsapp(number, retries=2):
"""Return True, False, or None when the answer stays indeterminate."""
for attempt in range(retries + 1):
resp = requests.get(
f"{BASE}/check-exist-by-phone",
params={"key": API_KEY, "phoneNumber": number},
timeout=30,
)
resp.raise_for_status()
data = resp.json()
# A reply can be wrapped more than once as {"code": ..., "data": {...}}
while isinstance(data, dict) and "code" in data and isinstance(data.get("data"), (dict, list)):
data = data["data"]
if isinstance(data, dict) and data.get("isExist") is not None:
return bool(data["isExist"])
return None
for n in ["15551234567", "442071234567"]:
print(n, is_on_whatsapp(n))
Calling the check inside a sign-up form works the same way. Treat None as "could not verify right now", let the user continue, and re-check in the background.
Reading the result correctly
A positive result means the number has an active WhatsApp account. It does not tell you that the person wants your messages, that a message will be read, or that the number belongs to the contact you think it does. Keep these limits in mind:
- Registered is not consented. Opt-in is a separate requirement, and WhatsApp's rules on unwanted messages still apply.
- A negative result is useful, not final. People install WhatsApp later, so re-check on a schedule.
- A business indicator is a hint. It helps you decide how to address a contact, not whether to trust it.
When one channel says no, the right next step is often another channel. The lead verification workflow shows how to combine WhatsApp with Telegram, Viber and Signal checks, and the WhatsApp number lookup guide covers enrichment for the numbers that pass.
Common use cases
- Lead list cleaning: drop numbers that are not on WhatsApp before a campaign so you only pay to message reachable contacts.
- Sign-up verification: confirm a number is WhatsApp-enabled before routing OTP or support to it.
- CRM enrichment: attach avatar, About text and business-profile data to registered contacts.
- Fraud screening: flag throwaway or never-registered numbers during onboarding.
Best practices
- Normalize first. Keep digits and the country code, and store a single canonical form.
- Deduplicate your list before checking so you do not spend credits twice on the same number.
- Cache results. Store each result with a timestamp and re-check on a schedule, for example every few weeks, rather than before every send.
- Retry
nullresults. They are transient, not negative. - Respect the platform. Only check numbers you have a legitimate basis to process, and follow WhatsApp's terms and the privacy laws that apply to you.
FAQ
How can I check if a number is on WhatsApp without messaging it?
Call check-exist-by-phone with the full international number. The isExist field tells you whether the number is registered, and nobody receives a message. If you need only a yes or no, check-active returns a direct active flag.
What phone number format does the checker accept?
A full international number including the country code. It can be written with or without a leading plus sign, and spaces, dashes or a 00 prefix are parsed automatically. If your data keeps the country code separately, use check-exist-by-cc-phone.
What if the result is null?
It means the answer was indeterminate at that moment. Retry after a short backoff. Do not treat null as "not on WhatsApp".
How many numbers can I check at once?
Up to 10 per request with batch-check-10. For a longer list, split it into groups of 10 and loop.
Does a positive result mean I can message the number? It means the number has an active account. You still need the person's consent, and WhatsApp's rules on automated and bulk messaging apply.
Try it now
Test the checker interactively on the WhatsApp Number Validation page, or read the endpoint reference for check-exist-by-phone, check-active and batch-check-10. When you are ready to integrate, grab an API key and start with the free credits on your account.