Scan your whole stack
From OX Research Newsroom
Are you using checkthatphone?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.0.0
checkthatphone was last scanned on 28 Nov 2026 at version 1.0.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.0.0 LATEST | 28 Nov 2026 | No rules fired |
| 0.2.1 | 22 Nov 2026 | No rules fired |
Findings for v1.0.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.0.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Official Python client for the CheckThatPhone phone validation API. Look up US and Canadian phone numbers in real time: carrier, line type, whether the number was ported, and whether the line can receive texts. Add a TCPA litigator check, a landline SMS check, and free state do-not-call and complainer checks when you need them.
Version 1.0 calls API v2 and returns a new record. API v1 keeps working: to stay on it, stay on the 0.2.x releases of this package. See Upgrading from 0.x.
Zero dependencies (standard library only). Python 3.9+. Type hints included.
pip install checkthatphone
import os
from checkthatphone import CheckThatPhone
client = CheckThatPhone(api_key=os.environ["CHECKTHATPHONE_API_KEY"])
result = client.lookup("(212) 555-0100")
data = result.data
data["number"]["valid"] # True
data["number"]["line_type"] # "mobile"
data["carrier"]["name"] # "Test Wireless"
data["sms"]["line_can_receive"] # True
result.credits_used # 0, because 555-0100 is a test number
Get an API key at checkthatphone.com. The Free plan includes 500 credits a month. A lookup costs 1 credit, plus 1 for each paid check you add.
Write the number any common way: 10 digits, or 11 digits starting with 1. Other characters are ignored.
result.data is a plain dictionary. Three rules make it easy to read:
None means "not known".True and False, not "true" and "false".A lookup runs no optional check unless you name it. Pass the names in checks:
result = client.lookup("2125550104", checks=["litigator", "dnc_state", "dnc_complainer"])
| Check | Cost | What it does |
|---|---|---|
litigator |
1 credit, charged whenever it is requested | Checks the number against our TCPA litigator database. |
landline_sms |
1 credit, charged only when the check ran (it does not run on mobile lines) | For a landline, checks whether the line is text-enabled. |
dnc_state |
Free | Checks the number against state do-not-call lists. It covers 38 states plus DC. It does not look at the federal Do Not Call registry. |
dnc_complainer |
Free | Checks the number against our list of people who have lodged complaints against telemarketers. |
The API refuses a name it does not know with the error code unknown_check. Nothing is looked up, so a typo can never skip a check silently.
The record has seven groups:
| Group | What it holds |
|---|---|
number |
The number itself: how to write it, whether it exists, what kind of line it is. |
carrier |
The carrier that serves the number now. None for a number that is not assigned. |
sms |
Whether the line can take a text message. |
compliance |
The checks you asked for, each with its own status. |
location |
Where the number was issued. Not where the person is now. |
ip_location |
Where the IP address you sent is. None when you sent no ip. |
meta |
About the lookup: time, credits, request id. |
This is the full record for the lookup above, a litigator match on a mobile line:
{
"number": {
"e164": "+12125550104",
"national": "(212) 555-0104",
"international": "+1 212-555-0104",
"rfc3966": "tel:+1-212-555-0104",
"valid": true,
"invalid_reason": null,
"line_type": "mobile",
"ported": false,
"deactivation_date": null,
"original_carrier": null,
"test_number": true
},
"carrier": {
"name": "Test Wireless",
"brand": "Test Wireless",
"voip_wholesale": false,
"ocn": "TEST",
"lrn": "2125550104",
"category": "WIRELESS"
},
"sms": {
"line_can_receive": true,
"reasons": [],
"landline": { "status": "not_requested" }
},
"compliance": {
"litigator": { "status": "checked", "match": true, "type": "litigator", "name": "Test Litigator" },
"dnc_state": { "status": "checked", "listed": false },
"dnc_complainer": { "status": "checked", "listed": false }
},
"location": {
"country": "US",
"region": "NY",
"regions": ["NY"],
"city": null,
"rate_center": null,
"time_zones": [{ "name": "America/New_York", "utc_offset": "-05:00" }]
},
"ip_location": null,
"meta": {
"checked_at": "2026-11-23T15:04:05Z",
"credits": { "total": 0, "lookup": 0, "litigator": 0, "landline_sms": 0 },
"request_id": "req_3f9c2a71b04e4d5a9c1e"
}
}
sms.line_can_receive is a fact about the line. It is True when the number is valid, the line takes texts (a mobile line, or a landline the landline_sms check found to be text-enabled) and the number has not been deactivated recently.
It is not advice to send. Litigator and do-not-call results never change it: in the record above the line can receive a text and the number is a litigator match. Check the compliance results and your own consent records before you message anyone.
When it is False, sms.reasons says why. More than one reason can apply.
| Reason | Meaning |
|---|---|
invalid_number |
The number is not assigned to anyone, or cannot exist. See number.invalid_reason. |
not_sms_capable |
The line is a landline, and the landline SMS check has not shown it to be text-enabled. |
recently_deactivated |
The carrier deactivated the number recently. See number.deactivation_date. |
unspecified |
The lookup found the line cannot receive texts and gave no cause we can name. |
sms = result.data["sms"]
if not sms["line_can_receive"]:
print("Cannot receive texts:", ", ".join(sms["reasons"]))
Every check is an object with a status. Read the status first. The result fields (match, listed, enabled) are present only when the status is checked.
| Status | Meaning |
|---|---|
checked |
The check ran. Its result fields are present. |
not_requested |
The request did not ask for this check. Nothing is known either way. |
not_applicable |
The check cannot apply to this number, for example the landline SMS check on a mobile line. |
not_covered |
We have no data for this number's state or country, so a "clear" result would mean nothing. |
skipped |
The check was requested and applies, but did not run for this lookup. Nothing is known either way. |
error |
The check ran and failed. Treat the result as unavailable, never as clear. |
Only checked with a negative result means "clear". Every other status means you do not know.
compliance = result.data["compliance"]
litigator = compliance["litigator"]
if litigator["status"] == "checked" and litigator["match"]:
print("Litigator match:", litigator["type"]) # "litigator", "plaintiff" or "agitator"
dnc = compliance["dnc_state"]
if dnc["status"] == "checked":
print("On a state do-not-call list:", dnc["listed"])
elif dnc["status"] == "not_covered":
print("No state do-not-call data for this number")
else:
print("State do-not-call result unknown:", dnc["status"])
dnc_state reports not_covered for a number from one of the 12 states the check does not cover (Colorado, Florida, Indiana, Louisiana, Massachusetts, Mississippi, Missouri, Oklahoma, Pennsylvania, Tennessee, Texas, Wyoming) and for numbers outside the US.
A litigator match can carry a name in compliance.litigator.name. Handle it with care and do not log it without need.
Some landlines can receive texts. The landline_sms check finds them:
result = client.lookup("2125550102", checks=["landline_sms"])
landline = result.data["sms"]["landline"]
if landline["status"] == "checked" and landline["enabled"]:
print("Text-enabled landline, served by", landline["provider"])
On a mobile line the status is not_applicable and the check costs nothing.
location is where the number was issued: the country and the state or province of its area code, and the city and rate centre of its exchange. It is not where the person is now. People keep their numbers when they move, so someone with a California number may live anywhere.
location.time_zones lists every time zone the area code covers, with its current offset from UTC. An area code that spans two zones lists both.
Send an IP address and the record also says where that address is, in ip_location. It describes the address, which can be a home connection, a mobile network, an office or a VPN.
result = client.lookup("8182925409", ip="203.0.113.7")
ip = result.data["ip_location"]
if ip and ip["located"]:
print(ip["region"], ip["time_zone"], ip["in_number_region"])
in_number_region is True when the IP address is in the same state or province as the number's area code. For a test number located is always False, because no lookup is made.
result.credits_used # credits this lookup cost
result.data["meta"]["credits"] # {"total": 2, "lookup": 1, "litigator": 1, "landline_sms": 0}
result.request_id # quote it when you contact support
total is always a number. The parts (lookup, litigator, landline_sms) can be None.
Any area code followed by 555-0100 to 555-0199 is a test number. Looking one up costs 0 credits and returns a fixed record, with number.test_number set to True. The last two digits pick the answer:
| Last two digits | Answer |
|---|---|
00 |
A mobile line that can take texts. |
01 |
A landline. |
02 |
A text-enabled landline. Shown when landline_sms is requested; without it the record is a plain landline. |
03 |
A mobile number the carrier deactivated 14 days ago. |
04 |
A litigator match. Shown when litigator is requested. |
05 |
Listed on a state do-not-call list and on the complainer list. Shown when those checks are requested. |
06 |
A number that is not assigned. |
07 to 99 |
The same as 00. |
The area code is yours to choose, and location, time zones and state do-not-call coverage follow it. 6155550100 with checks=["dnc_state"] reports not_covered, because 615 is a Tennessee area code and Tennessee is one of the 12 states the check does not cover.
result = client.lookup("2125550106")
result.data["number"]["valid"] # False
result.data["number"]["invalid_reason"] # "not_assigned"
result.data["carrier"] # None
A number that breaks the fixed rules of North American numbering is not an error. The lookup returns a record, costs 0 credits, and says which rule the number breaks:
result = client.lookup("212-055-1234")
result.data["number"]["valid"] # False
result.data["number"]["invalid_reason"] # "exchange_starts_0_or_1"
result.data["sms"]["reasons"] # ["invalid_number"]
result.credits_used # 0
number.invalid_reason |
Meaning |
|---|---|
not_assigned |
The carrier lookup did not find the number. |
wrong_length |
Not 10 digits, or 11 digits that do not start with 1. |
area_code_starts_0_or_1 |
Area codes start with 2 to 9. |
area_code_is_service_code |
211, 311 and the like are service codes, never area codes. |
exchange_starts_0_or_1 |
The three digits after the area code start with 2 to 9. |
not_assigned comes from a carrier lookup. The other four are the fixed rules.
number_info returns what the number alone tells you: whether it can exist, how to write it, and the country, region, kind and time zones of its area code. It makes no carrier lookup, so it does not say whether the number is assigned to anyone. It costs 0 credits.
info = client.number_info("416-555-0100").data
info["number"]["possible"] # True
info["number"]["e164"] # "+14165550100"
info["area_code"]["kind"] # "geographic"
info["area_code"]["country"] # "CA"
info["area_code"]["region"] # "ON"
info["time_zones"][0]["name"] # "America/Toronto"
area_code is None when the number cannot exist. area_code.known is False when the area code is not in the API's numbering data yet; it may be new.
Any active API key works, including a key on the Free plan. Note that the number is part of the URL here, while lookup sends it in the request body.
A non-2xx response raises CheckThatPhoneError. Branch on code and status. title and detail are written for people and can be reworded.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.