Determining a phone line type (cellular, landline, or VOIP)

Justin Dupree -

If your application needs to know if a given number is a landline, a mobile phone, or a voip line, you can use the Whitepage Pro Phone Number Intelligence API to automatically determine line type, owner of the number, the carrier, and more.

This sample code in Ruby will log the line type, and whether it is a connected number.

require 'rest-client'
to = 'phone-number-to-check'
response = RestClient.get '', {:params => {
  'api_key' => 'your-whitepages-api-key-here'
  'phone_number' => to
result = JSON.parse(
log "%% Phone number #{$to} is #{result['results'][0]['line_type']}. Connected: #{result['results'][0]['is_connected']}"
Have more questions? Submit a request


Article is closed for comments.