Question

Is there a free API or some other way to determine what carrier a cell phone number is registered with?

I'd like my application to broadcast text messages without them picking their carrier from a list.

UPDATE: Interestingly, a coworker found the answer: http://developer.whitepages.com/

UPDATE2: Well the whitepages license agreement is so restrictive that you can't build an app for it. Any other ideas?

UPDATE3:
At some point, someone removed my Update 2. This puts it back. More importantly as of 10/19/2015 the Terms of Service is still in a state that it should be impossible to legally utilize their services.

Was it helpful?

Solution

You should note that the way to figure out which carrier a number belongs to will be country-specific (though, some countries might use the same scheme, but I'm not sure - I've worked with both the norwegian and swedish portability databases and they're quite different api-wize - and require vpn + authentication).

The information is, at least here, not available to the public - I've seen service providers, network operators and information providers (as in yellow pages) that have access.

But otoh, wouldn't a proper sms gateway service do this for you?

OTHER TIPS

Data24-7 offers an API for looking up the carrier for wireless phone numbers. It also returns the email addresses to send SMS and MMS messages to the phone. It's not free, it's $12 per month and $0.006 per lookup.

The link is: http://www.data24-7.com

I know this question is 5 years old already but for those still looking for something, PacificEast (who I work for) offers a Line Identification Append service for US and Canadian numbers that handles local number portability. The service is available as a SOAP API or as a batch service (you send PacificEast your file, they process it and send it back). Besides the carrier, the service will also identify line type (wireless, landline, etc.), whether the number has been ported or not, and some geographic information.

Neustar would be your best bet, they handle lookups, number portability, Do Not Call list, etc... The service is not free but they are the most reliable in the business. Another option might be Twilio

If you are looking for what I was (a way to easily email -> SMS people for a program), I believe the best is going to be to send an email phonenumber@sms-gateway to each carrier for the country. In doing so, the number will only work with one carrier where the number is active at this moment. The other emails will be returned. If you try to look it up, you are now relying upon how current their database is.

Your biggest problem is that people can now take their numbers with them. So while in the past cell phone carriers had blocks of phone numbers, and probably still do, there's no reliable way to map a specific cell number to a certain carrier.

You can try to screenscrape from a website like http://www.fonefinder.net that does a 'whois' on the number

Here is an example url to scrape. (I verified its really sprint, so that is correct)

http://www.fonefinder.net/findome.php?npa=817&nxx=683&thoublock=2926

I recently wrote one in Ruby that interfaces with the aforementioned FoneFinder.net

https://rubygems.org/gems/FoneFinder --> Ruby Gem page
https://github.com/evinugur/FoneFinder.rb/ --> Github Source

You can use it to get a few fields of data that relate to a cell phone number, but to determine carrier, do this.

require 'FoneFinder'
myPhoneNumber = FoneFinder.new("123-456-7890")
puts myPhoneNumber.carrier
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top