Lookup: Carrier and Caller Name

Given a phone number, Twilio Lookup can identify the number's carrier and what type of phone it is (landline,  mobile, or VoIP). In the U.S., Lookup can also retrieve the name of the person or business associated with a phone number (if available).

Lookup can show you even more information about a phone number using Twilio Add-ons. See the Add-ons guide to learn more.

Identify a phone number's carrier and type

To discover a phone number's carrier and what type of phone it is, pass an extra argument to your lookup requesting carrier information.

Loading Code Samples...
Language
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const LookupsClient = require('twilio').LookupsClient;
const client = new LookupsClient(accountSid, authToken);

client.phoneNumbers('+15108675310').get({
  type: 'carrier',
}, (error, number) => {
  console.log(number.carrier.type);
  console.log(number.carrier.name);
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.lookups.v1
  .phoneNumbers('+15108675310')
  .fetch({type: 'carrier'})
  .then(response => console.log(response.carrier))
  .catch(error => {
    if (error.status === 404) {
      console.log('No carrier information');
    } else {
      console.log(error.message);
    }
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Lookups;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    const string authToken = "your_auth_token";
    var lookupsClient = new LookupsClient(accountSid, authToken);

    // Look up a phone number in E.164 format
    var phoneNumber = lookupsClient.GetPhoneNumber("+15108675310", true);
    Console.WriteLine(phoneNumber.Carrier.Type);
    Console.WriteLine(phoneNumber.Carrier.Name);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Lookups_Services_Twilio($sid, $token);

$number = $client->phone_numbers->get("+15108675310", array("Type" => "carrier"));

echo $number->carrier->type . "\r\n";
echo $number->carrier->name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::LookupsClient.new account_sid, auth_token

number = @client.phone_numbers.get('+15108675310', type: 'carrier')

puts number.carrier['type']
puts number.carrier['name']
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Lookups.V1;
using Twilio.Types;
using Twilio.Exceptions;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        try {
          // Look up a phone number in E.164 format
          var phoneNumber = PhoneNumberResource.Fetch(
              new PhoneNumber("+15108675310"),
              type: new List<string> { "carrier" });

          Console.WriteLine(phoneNumber.Carrier["name"]);
          Console.WriteLine(phoneNumber.Carrier["type"]);
        } catch (ApiException e) {
          if (e.Status == 404) {
            Console.WriteLine("No carrier information");
          } else {
            Console.WriteLine(e.ToString());
          }
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;
use Twilio\Exceptions\RestException;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

try {
  $number = $client->lookups
      ->phoneNumbers("+15108675310")
      ->fetch(
          array("type" => "carrier")
      );

  echo $number->carrier["type"] . "\r\n";
  echo $number->carrier["name"];
} catch (RestException $e) {
    if ($e->getStatusCode() == "404") {
        echo "No carrier information.\n";
    } else {
        throw $e;
    }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest.lookups import TwilioLookupsClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioLookupsClient(account_sid, auth_token)

number = client.phone_numbers.get("+15108675310", include_carrier_info=True)
print(number.carrier['type'])
print(number.carrier['name'])
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

begin
  number = @client.lookups.v1.phone_numbers('+15108675310').fetch(type: 'carrier')

  puts number.carrier['type']
  puts number.carrier['name']
rescue Twilio::REST::RestError => err
  if err.status_code === 404
    puts 'No carrier information'
  else
    puts err.message
  end
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.LookupsClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.lookups.PhoneNumber;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    LookupsClient client = new LookupsClient(ACCOUNT_SID, AUTH_TOKEN);

    PhoneNumber number = client.getPhoneNumber("+15108675310", true);

    System.out.println(number.getType());
    System.out.println(number.getCarrierName());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)


try:
    number = client.lookups.phone_numbers("+15108675310").fetch(type="carrier")

    print(number.carrier['type'])
    print(number.carrier['name'])
except TwilioRestException as error:
    if error.status == 404:
        print('No carrier information')
    else:
        raise error
// Install the Java helper library from twilio.com/docs/java/install
import java.util.HashMap;
import java.util.Map;

import com.twilio.Twilio;
import com.twilio.rest.lookups.v1.PhoneNumber;
import com.twilio.exception.ApiException;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    try {
      PhoneNumber number = PhoneNumber
          .fetcher(new com.twilio.type.PhoneNumber("+15108675310"))
          .setType("carrier")
          .fetch();

      System.out.println(number.getCarrier().get("name"));
      System.out.println(number.getCarrier().get("type"));
    } catch (ApiException e) {
      if (e.getStatusCode() == 404) {
        System.out.println("No carrier information");
      } else {
        System.out.println(e.getMessage());
      }
    }
  }
}
curl -XGET https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=carrier \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=carrier",
    "carrier": {
        "error_code": null,
        "type": "mobile",
        "name": "T-Mobile USA, Inc.",
        "mobile_network_code": "160",
        "mobile_country_code": "310"
    },
    "national_format": "(510) 867-5310",
    "phone_number": "+15108675310",
    "country_code": "US"
}
Look up a phone number in the E.164 format
Lookup with E.164 Formatted Number

Look up a phone number in the E.164 format

The response will contain two additional fields:

  • Type specifies whether the phone is a landline, mobile, or voip phone
  • Carrier is the name of the phone's carrier, like Verizon Wireless. Note that carriers rebrand frequently

If your phone number was invalid or incorrectly formatted, Twilio will return a 404 error.

Get a name associated with a phone number

Note: Caller name lookup is available for U.S. numbers only

Lookup can also retrieve the name of the individual or business associated with a phone number. Simply pass a caller-name argument to your lookup request.

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.lookups.v1
  .phoneNumbers('+16502530000')
  .fetch({ type: 'caller-name' })
  .then(number => console.log(number));
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Lookups.V1;
using Twilio.Types;

public class Example
{
	public static void Main(string[] args)
	{
		// Find your Account SID and Auth Token at twilio.com/console
		const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
		const string authToken = "your_auth_token";

		TwilioClient.Init(accountSid, authToken);

		var phoneNumber = PhoneNumberResource.Fetch(
		    new PhoneNumber("+16502530000"),
		    type: new List<string> { "caller-name" });

		Console.WriteLine(phoneNumber.CallerName["caller_name"]);
	}
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$number = $client->lookups
    ->phoneNumbers("+16502530000")
    ->fetch(
        array("type" => "caller-name")
    );

echo $number->callerName['caller_type'] . "\r\n";
echo $number->callerName['caller_name'];
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

encoded_phone_number = CGI.escape('+16502530000')
number = @client.lookups.v1
                .phone_numbers(encoded_phone_number)
                .fetch(type: 'caller-name')

puts number.carrier['type']
puts number.carrier['name']
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

number = client.lookups.phone_numbers("+16502530000").fetch(
    type="caller-name",
)

print(number.carrier['type'])
print(number.carrier['name'])
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.lookups.v1.PhoneNumber;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    PhoneNumber number = PhoneNumber
        .fetcher(new com.twilio.type.PhoneNumber("+16502530000"))
        .setType("caller-name")
        .fetch();

    System.out.println(number.getCallerName());
  }
}
$ curl -XGET https://lookups.twilio.com/v1/PhoneNumbers/+16502530000/?Type=caller-name \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "caller_name": {
    "caller_name": "YOU TUBE",
    "caller_type": "BUSINESS",
    "error_code": null
  },
  "country_code": "US",
  "phone_number": "+16502530000",
  "national_format": "(650) 253-0000",
  "carrier": null,
  "url": "https://lookups.twilio.com/v1/PhoneNumbers/+16502530000"
}
Lookup with Caller Name

Caller name lookup is not yet available in the Twilio SDKs. You must use the HTTP API directly.

If available, the response will include a name for the phone number and whether the name is for a business or consumer.

Keep in mind that not all numbers will have names available.

Want even more information about a phone number? See the Twilio Add-ons guide to learn more and check out the available Lookup add-ons in the console.

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

Loading Code Samples...
SDK Version:
  • 4.x
  • 5.x
Response Format:
  • json
SDK Version:
  • 6.x
  • 7.x
SDK Version:
  • 2.x
  • 3.x
SDK Version:
  • 4.x
  • 5.x
SDK Version:
  • 5.x
  • 6.x
SDK Version:
  • 4.x
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These vars are your accountSid and authToken from twilio.com/user/account
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const LookupsClient = require('twilio').LookupsClient;
const client = new LookupsClient(accountSid, authToken);

client.phoneNumbers('+15108675310').get({
  type: 'carrier',
}, (error, number) => {
  console.log(number.carrier.type);
  console.log(number.carrier.name);
});
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.lookups.v1
  .phoneNumbers('+15108675310')
  .fetch({type: 'carrier'})
  .then(response => console.log(response.carrier))
  .catch(error => {
    if (error.status === 404) {
      console.log('No carrier information');
    } else {
      console.log(error.message);
    }
  });
// Download the twilio-csharp library from twilio.com/docs/csharp/install
using System;
using Twilio.Lookups;

class Example
{
  static void Main(string[] args)
  {
    // Find your Account Sid and Auth Token at twilio.com/user/account
    const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    const string authToken = "your_auth_token";
    var lookupsClient = new LookupsClient(accountSid, authToken);

    // Look up a phone number in E.164 format
    var phoneNumber = lookupsClient.GetPhoneNumber("+15108675310", true);
    Console.WriteLine(phoneNumber.Carrier.Type);
    Console.WriteLine(phoneNumber.Carrier.Name);
  }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once('/path/to/twilio-php/Services/Twilio.php'); // Loads the library

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";
$client = new Lookups_Services_Twilio($sid, $token);

$number = $client->phone_numbers->get("+15108675310", array("Type" => "carrier"));

echo $number->carrier->type . "\r\n";
echo $number->carrier->name;
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::LookupsClient.new account_sid, auth_token

number = @client.phone_numbers.get('+15108675310', type: 'carrier')

puts number.carrier['type']
puts number.carrier['name']
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Lookups.V1;
using Twilio.Types;
using Twilio.Exceptions;

public class Example
{
    public static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        try {
          // Look up a phone number in E.164 format
          var phoneNumber = PhoneNumberResource.Fetch(
              new PhoneNumber("+15108675310"),
              type: new List<string> { "carrier" });

          Console.WriteLine(phoneNumber.Carrier["name"]);
          Console.WriteLine(phoneNumber.Carrier["type"]);
        } catch (ApiException e) {
          if (e.Status == 404) {
            Console.WriteLine("No carrier information");
          } else {
            Console.WriteLine(e.ToString());
          }
        }
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;
use Twilio\Exceptions\RestException;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

try {
  $number = $client->lookups
      ->phoneNumbers("+15108675310")
      ->fetch(
          array("type" => "carrier")
      );

  echo $number->carrier["type"] . "\r\n";
  echo $number->carrier["name"];
} catch (RestException $e) {
    if ($e->getStatusCode() == "404") {
        echo "No carrier information.\n";
    } else {
        throw $e;
    }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest.lookups import TwilioLookupsClient

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = TwilioLookupsClient(account_sid, auth_token)

number = client.phone_numbers.get("+15108675310", include_carrier_info=True)
print(number.carrier['type'])
print(number.carrier['name'])
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

begin
  number = @client.lookups.v1.phone_numbers('+15108675310').fetch(type: 'carrier')

  puts number.carrier['type']
  puts number.carrier['name']
rescue Twilio::REST::RestError => err
  if err.status_code === 404
    puts 'No carrier information'
  else
    puts err.message
  end
end
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.sdk.LookupsClient;
import com.twilio.sdk.TwilioRestException;
import com.twilio.sdk.resource.instance.lookups.PhoneNumber;

public class Example {

  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) throws TwilioRestException {
    LookupsClient client = new LookupsClient(ACCOUNT_SID, AUTH_TOKEN);

    PhoneNumber number = client.getPhoneNumber("+15108675310", true);

    System.out.println(number.getType());
    System.out.println(number.getCarrierName());
  }
}
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)


try:
    number = client.lookups.phone_numbers("+15108675310").fetch(type="carrier")

    print(number.carrier['type'])
    print(number.carrier['name'])
except TwilioRestException as error:
    if error.status == 404:
        print('No carrier information')
    else:
        raise error
// Install the Java helper library from twilio.com/docs/java/install
import java.util.HashMap;
import java.util.Map;

import com.twilio.Twilio;
import com.twilio.rest.lookups.v1.PhoneNumber;
import com.twilio.exception.ApiException;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    try {
      PhoneNumber number = PhoneNumber
          .fetcher(new com.twilio.type.PhoneNumber("+15108675310"))
          .setType("carrier")
          .fetch();

      System.out.println(number.getCarrier().get("name"));
      System.out.println(number.getCarrier().get("type"));
    } catch (ApiException e) {
      if (e.getStatusCode() == 404) {
        System.out.println("No carrier information");
      } else {
        System.out.println(e.getMessage());
      }
    }
  }
}
curl -XGET https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=carrier \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
    "url": "https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=carrier",
    "carrier": {
        "error_code": null,
        "type": "mobile",
        "name": "T-Mobile USA, Inc.",
        "mobile_network_code": "160",
        "mobile_country_code": "310"
    },
    "national_format": "(510) 867-5310",
    "phone_number": "+15108675310",
    "country_code": "US"
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// Download the Node helper library from twilio.com/docs/node/install
// These are your accountSid and authToken from https://www.twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';

const client = require('twilio')(accountSid, authToken);

client.lookups.v1
  .phoneNumbers('+16502530000')
  .fetch({ type: 'caller-name' })
  .then(number => console.log(number));
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Lookups.V1;
using Twilio.Types;

public class Example
{
	public static void Main(string[] args)
	{
		// Find your Account SID and Auth Token at twilio.com/console
		const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
		const string authToken = "your_auth_token";

		TwilioClient.Init(accountSid, authToken);

		var phoneNumber = PhoneNumberResource.Fetch(
		    new PhoneNumber("+16502530000"),
		    type: new List<string> { "caller-name" });

		Console.WriteLine(phoneNumber.CallerName["caller_name"]);
	}
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
require_once '/path/to/vendor/autoload.php'; // Loads the library

use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/user/account
$sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token = "your_auth_token";

$client = new Client($sid, $token);

$number = $client->lookups
    ->phoneNumbers("+16502530000")
    ->fetch(
        array("type" => "caller-name")
    );

echo $number->callerName['caller_type'] . "\r\n";
echo $number->callerName['caller_name'];
# Get twilio-ruby from twilio.com/docs/ruby/install
require 'twilio-ruby'

# Get your Account SID and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

encoded_phone_number = CGI.escape('+16502530000')
number = @client.lookups.v1
                .phone_numbers(encoded_phone_number)
                .fetch(type: 'caller-name')

puts number.carrier['type']
puts number.carrier['name']
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACCOUNT_SID"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)

number = client.lookups.phone_numbers("+16502530000").fetch(
    type="caller-name",
)

print(number.carrier['type'])
print(number.carrier['name'])
// Install the Java helper library from twilio.com/docs/java/install
import com.twilio.Twilio;
import com.twilio.rest.lookups.v1.PhoneNumber;

public class Example {
  // Find your Account Sid and Token at twilio.com/user/account
  public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  public static final String AUTH_TOKEN = "your_auth_token";

  public static void main(String[] args) {
    Twilio.init(ACCOUNT_SID, AUTH_TOKEN);

    PhoneNumber number = PhoneNumber
        .fetcher(new com.twilio.type.PhoneNumber("+16502530000"))
        .setType("caller-name")
        .fetch();

    System.out.println(number.getCallerName());
  }
}
$ curl -XGET https://lookups.twilio.com/v1/PhoneNumbers/+16502530000/?Type=caller-name \
    -u 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token'
{
  "caller_name": {
    "caller_name": "YOU TUBE",
    "caller_type": "BUSINESS",
    "error_code": null
  },
  "country_code": "US",
  "phone_number": "+16502530000",
  "national_format": "(650) 253-0000",
  "carrier": null,
  "url": "https://lookups.twilio.com/v1/PhoneNumbers/+16502530000"
}