Skip to main content

nanpa_lookup

Look up callers in the North America Number Plan Adminstrator (NANPA) database. Useful for identifying source of robocalls.

Quickstart

$ pip install nanpa_lookup

Query the database for a number:

$ nanpa_lookup -n 9072001234 --field company
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATION

Or provide a file containing phone numbers:

$ nanpa_lookup -f numbers.txt --field company
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATION
CELLCO PARTNERSHIP DBA VERIZON WIRELESS - NC
ONVOY, LLC - TN
GCI COMMUNICATION CORP. DBA GENERAL COMMUNICATION

Pull Logs from Android

Grab call log for last 30 days from a rooted Android phone via adb:

$ nanpa_lookup -a 30 --field company | sort | uniq -c | sort -n
      3 ONVOY, LLC - TN
      3 PEERLESS NETWORK OF TENNESSEE,
      4 BELLSOUTH TELECOMM INC DBA SOU
      4 TELEPORT COMMUNICATIONS AMERIC
      5 NEW CINGULAR WIRELESS PCS, LLC
      5 ONVOY, LLC
      6 LEVEL 3 COMMUNICATIONS, LLC - 
      9 No matches found
     11 ILLINOIS BELL TEL CO
     27 BRIGHTLINK COMMUNICATIONS, LLC

Usage

usage: nanpa_lookup [-h] [-n N] [-f F] [-a A] [--field FIELD] [--query QUERY]
                    [--database DATABASE]

Look up number in NANPA database

options:
  -h, --help           show this help message and exit
  -n N                 number
  -f F                 file containing list of numbers
  -a A                 pull numbers from ADB device
  --field FIELD        print out specific field (company, npanxxy, type, ocn, email)
  --query QUERY        make arbitrary SQL query
  --database DATABASE  numbers database

Caveats

This does not work for robocalls which spoof the origin number, only for spammers making use of legitimate numbers from VOIP companies. This may eventually be addressed by STIR/SHAKEN.

Release files for nanpa-lookup 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nanpa-lookup 1.0.1
File Size Uploaded
nanpa_lookup-1.0.1.tar.gz 20.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nanpa-lookup 1.0.1
File Interpreter ABI Platform
nanpa_lookup-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.1 MB

Release files / nanpa_lookup-1.0.1.tar.gz

Download URL nanpa_lookup-1.0.1.tar.gz
Size 20.5 MB
Tags Source
SHA-256 checksum
How to use checksums
7ad7ff201bb8757906ca9f0baf81f471791044213b4259d42b3a791f88a25e35
BLAKE2b-256 checksum
How to use checksums
0fa14bb38677d026d97f23aada051011b3d9c8525096456217501a95922a3e69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.5

Release files / nanpa_lookup-1.0.1-py3-none-any.whl

Download URL nanpa_lookup-1.0.1-py3-none-any.whl
Size 20.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
982850ef395ab5742085c1a9dca0e3c4cec4193468c9b4341be39102c5c055bf
BLAKE2b-256 checksum
How to use checksums
46ea34de54b979b4e73a7aab3b8fc7a362f2276cac2d90550d526104b90baf38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.5

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page