A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/python/caller-id-lookup-using-python/ below:

Caller ID Lookup using Python

Caller ID Lookup using Python

Last Updated : 23 Jul, 2025

Prerequisite

In this article, we are going to see how we get Caller Id information using numverify API. Numverify offers a powerful tool to deliver phone number validation and information lookup in portable JSON format by Just making a request using a simple URL.

For the following program to work you must have an API key and to get one simply Click here.

Module needed:

pip install bs4
pip install requests

Approach:

Program:

Python3
# import module
import requests
import pandas as pd 
from bs4 import BeautifulSoup

# link for extract html data
# Making a GET request 
    
def getdata(url):
    r=requests.get(url)
    return r.text
# API key
# Enter your own API key instead of 'YOUR API KEY'
api = 'YOUR API KEY'

# number and country code
number = '9852638787'
country = 'IN'

# pass Your API, number and country code
# in getdata function
htmldata=getdata('http://apilayer.net/api/validate?access_key='+api+'&number='+number+'&country_code='+country+'&format=1')
soup = BeautifulSoup(htmldata, 'html.parser')
print(soup)

Output:

{  

"valid":true, 

 "number":"919852638787",  

"local_format":"09852638787", 

 "international_format":"+919852638787",  

"country_prefix":"+91",  

"country_code":"IN",  

"country_name":"India (Republic of)",  

"location":"Bihar",  

"carrier":"Aircel Cellular Ltd",  

"line_type":"mobile"

 } 
 



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4