API to determine cell carrier? [closed]

此生再无相见时 提交于 2019-12-03 01:56:51

问题


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.


回答1:


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?




回答2:


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




回答3:


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.




回答4:


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




回答5:


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.




回答6:


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.




回答7:


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



回答8:


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


来源:https://stackoverflow.com/questions/322440/api-to-determine-cell-carrier

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!