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 helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.lookups.phoneNumbers('+15108675310')
              .fetch({type: 'carrier'})
              .then(phone_number => console.log(phone_number.callerName))
              .done();
// 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']
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Lookups.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var type = new List<string> {
            "carrier"
        };

        var phoneNumber = PhoneNumberResource.Fetch(
            type: type,
            pathPhoneNumber: new Twilio.Types.PhoneNumber("+15108675310")
        );

        Console.WriteLine(phoneNumber.CallerName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$phone_number = $twilio->lookups->v1->phoneNumbers("+15108675310")
                                    ->fetch(array("type" => "carrier"));

print($phone_number->callerName);
# 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'])
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

phone_number = @client.lookups.phone_numbers('+15108675310').fetch(
                                                               type: 'carrier'
                                                             )

puts phone_number.caller_name
// 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 helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

phone_number = client.lookups.phone_numbers('+15108675310').fetch(
                                                                type='carrier'
                                                            )

print(phone_number.caller_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.converter.Promoter;
import com.twilio.rest.lookups.v1.PhoneNumber;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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 phoneNumber = PhoneNumber.fetcher(
                new com.twilio.type.PhoneNumber("+15108675310"))
            .setType(Promoter.listOfOne("carrier")).fetch();

        System.out.println(phoneNumber.getCallerName());
    }
}
curl -X GET 'https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=carrier' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "caller_name": {
    "caller_name": "Delicious Cheese Cake",
    "caller_type": "CONSUMER",
    "error_code": null
  },
  "carrier": {
    "error_code": null,
    "mobile_country_code": "310",
    "mobile_network_code": "456",
    "name": "verizon",
    "type": "mobile"
  },
  "fraud": {
    "error_code": null,
    "mobile_country_code": "310",
    "mobile_network_code": "456",
    "advanced_line_type": "voip",
    "caller_name": "Delicious Cheese Cake",
    "is_ported": false,
    "last_ported_date": "2018-05-01 04:05:11"
  },
  "country_code": "US",
  "national_format": "(510) 867-5309",
  "phone_number": "+15108675310",
  "add_ons": {
    "status": "successful",
    "message": null,
    "code": null,
    "results": {}
  },
  "url": "https://lookups.twilio.com/v1/PhoneNumbers/phone_number",
  "type": "carrier"
}
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 helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.lookups.phoneNumbers('+16502530000')
              .fetch({type: 'caller-name'})
              .then(phone_number => console.log(phone_number.callerName))
              .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Lookups.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var type = new List<string> {
            "caller-name"
        };

        var phoneNumber = PhoneNumberResource.Fetch(
            type: type,
            pathPhoneNumber: new Twilio.Types.PhoneNumber("+16502530000")
        );

        Console.WriteLine(phoneNumber.CallerName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$phone_number = $twilio->lookups->v1->phoneNumbers("+16502530000")
                                    ->fetch(array("type" => "caller-name"));

print($phone_number->callerName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

phone_number = @client.lookups
                      .phone_numbers('+16502530000')
                      .fetch(type: 'caller-name')

puts phone_number.caller_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

phone_number = client.lookups \
                     .phone_numbers('+16502530000') \
                     .fetch(type='caller-name')

print(phone_number.caller_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.converter.Promoter;
import com.twilio.rest.lookups.v1.PhoneNumber;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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 phoneNumber = PhoneNumber.fetcher(
                new com.twilio.type.PhoneNumber("+16502530000"))
            .setType(Promoter.listOfOne("caller-name")).fetch();

        System.out.println(phoneNumber.getCallerName());
    }
}
curl -X GET 'https://lookups.twilio.com/v1/PhoneNumbers/+16502530000?Type=caller-name' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "caller_name": {
    "caller_name": "Delicious Cheese Cake",
    "caller_type": "CONSUMER",
    "error_code": null
  },
  "carrier": {
    "error_code": null,
    "mobile_country_code": "310",
    "mobile_network_code": "456",
    "name": "verizon",
    "type": "mobile"
  },
  "fraud": {
    "error_code": null,
    "mobile_country_code": "310",
    "mobile_network_code": "456",
    "advanced_line_type": "voip",
    "caller_name": "Delicious Cheese Cake",
    "is_ported": false,
    "last_ported_date": "2018-05-01 04:05:11"
  },
  "country_code": "US",
  "national_format": "(510) 867-5309",
  "phone_number": "+16502530000",
  "add_ons": {
    "status": "successful",
    "message": null,
    "code": null,
    "results": {}
  },
  "url": "https://lookups.twilio.com/v1/PhoneNumbers/phone_number",
  "type": "caller-name"
}
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.

Andrew Baker
Kat King
Paul Kamp

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 helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.lookups.phoneNumbers('+15108675310')
              .fetch({type: 'carrier'})
              .then(phone_number => console.log(phone_number.callerName))
              .done();
// 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']
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Lookups.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var type = new List<string> {
            "carrier"
        };

        var phoneNumber = PhoneNumberResource.Fetch(
            type: type,
            pathPhoneNumber: new Twilio.Types.PhoneNumber("+15108675310")
        );

        Console.WriteLine(phoneNumber.CallerName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$phone_number = $twilio->lookups->v1->phoneNumbers("+15108675310")
                                    ->fetch(array("type" => "carrier"));

print($phone_number->callerName);
# 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'])
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

phone_number = @client.lookups.phone_numbers('+15108675310').fetch(
                                                               type: 'carrier'
                                                             )

puts phone_number.caller_name
// 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 helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

phone_number = client.lookups.phone_numbers('+15108675310').fetch(
                                                                type='carrier'
                                                            )

print(phone_number.caller_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.converter.Promoter;
import com.twilio.rest.lookups.v1.PhoneNumber;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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 phoneNumber = PhoneNumber.fetcher(
                new com.twilio.type.PhoneNumber("+15108675310"))
            .setType(Promoter.listOfOne("carrier")).fetch();

        System.out.println(phoneNumber.getCallerName());
    }
}
curl -X GET 'https://lookups.twilio.com/v1/PhoneNumbers/+15108675310?Type=carrier' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "caller_name": {
    "caller_name": "Delicious Cheese Cake",
    "caller_type": "CONSUMER",
    "error_code": null
  },
  "carrier": {
    "error_code": null,
    "mobile_country_code": "310",
    "mobile_network_code": "456",
    "name": "verizon",
    "type": "mobile"
  },
  "fraud": {
    "error_code": null,
    "mobile_country_code": "310",
    "mobile_network_code": "456",
    "advanced_line_type": "voip",
    "caller_name": "Delicious Cheese Cake",
    "is_ported": false,
    "last_ported_date": "2018-05-01 04:05:11"
  },
  "country_code": "US",
  "national_format": "(510) 867-5309",
  "phone_number": "+15108675310",
  "add_ons": {
    "status": "successful",
    "message": null,
    "code": null,
    "results": {}
  },
  "url": "https://lookups.twilio.com/v1/PhoneNumbers/phone_number",
  "type": "carrier"
}
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 helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.lookups.phoneNumbers('+16502530000')
              .fetch({type: 'caller-name'})
              .then(phone_number => console.log(phone_number.callerName))
              .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Lookups.V1;


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

        TwilioClient.Init(accountSid, authToken);

        var type = new List<string> {
            "caller-name"
        };

        var phoneNumber = PhoneNumberResource.Fetch(
            type: type,
            pathPhoneNumber: new Twilio.Types.PhoneNumber("+16502530000")
        );

        Console.WriteLine(phoneNumber.CallerName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$phone_number = $twilio->lookups->v1->phoneNumbers("+16502530000")
                                    ->fetch(array("type" => "caller-name"));

print($phone_number->callerName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# 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)

phone_number = @client.lookups
                      .phone_numbers('+16502530000')
                      .fetch(type: 'caller-name')

puts phone_number.caller_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

phone_number = client.lookups \
                     .phone_numbers('+16502530000') \
                     .fetch(type='caller-name')

print(phone_number.caller_name)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.converter.Promoter;
import com.twilio.rest.lookups.v1.PhoneNumber;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    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 phoneNumber = PhoneNumber.fetcher(
                new com.twilio.type.PhoneNumber("+16502530000"))
            .setType(Promoter.listOfOne("caller-name")).fetch();

        System.out.println(phoneNumber.getCallerName());
    }
}
curl -X GET 'https://lookups.twilio.com/v1/PhoneNumbers/+16502530000?Type=caller-name' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "caller_name": {
    "caller_name": "Delicious Cheese Cake",
    "caller_type": "CONSUMER",
    "error_code": null
  },
  "carrier": {
    "error_code": null,
    "mobile_country_code": "310",
    "mobile_network_code": "456",
    "name": "verizon",
    "type": "mobile"
  },
  "fraud": {
    "error_code": null,
    "mobile_country_code": "310",
    "mobile_network_code": "456",
    "advanced_line_type": "voip",
    "caller_name": "Delicious Cheese Cake",
    "is_ported": false,
    "last_ported_date": "2018-05-01 04:05:11"
  },
  "country_code": "US",
  "national_format": "(510) 867-5309",
  "phone_number": "+16502530000",
  "add_ons": {
    "status": "successful",
    "message": null,
    "code": null,
    "results": {}
  },
  "url": "https://lookups.twilio.com/v1/PhoneNumbers/phone_number",
  "type": "caller-name"
}