DEV Community

Satyam Kumar Verman
Satyam Kumar Verman

Posted on

Get Phone Number Information using Python

Hello guys this is Satyam,again back with another awesome blog and in this blog I am going to discuss about a module in Python that is called phonenumbers which can be used find out some information about a given phone number such as the Operator Name and the name of the country in which the number is active.

In order to use these module first of all you have to install it using pip package manager because it's not a standard package so you have to install it separately.Type the following command in your terminal or cmd to install this module.

 pip install phonenumber
Enter fullscreen mode Exit fullscreen mode

Python program to get the country name to which phone number belongs:

import phonenumbers
from phonenumbers import geocoder
phone_number = phonenumbers.parse("Number with country code")



Python program to get the service/network provider name to that phone number

import phonenumbers

from phonenumbers import carrier

service_provider = phonenumbers.parse("Number with country code")

Buy Siteground Web hosting:

Teestring Merchandise:


Facebook Page:

My website:

My blogs:

Personal Instagram: Instagram:

Personal Twitter: Twitter: Twitter:

Facebook(for freelance):



Discussion (0)