- A package to search phone number details.
- Valid Mobile Number(Phone number verification for truecaller)
- Truecaller InstallationId
Install this pip package
pip install truecallerpy
Then login to your truecaller account .
~$ truecallerpy --login
If you get any error try running 'sudo truecallerpy --login'. If you are using Windows try the command with Adminitrative Privilege.
If you still facing problems in login then try below steps.
- On Truecaller Android, tap on the 3 line menu on top left then click on
setting's
. - Tap on
Privacy Center
and then click onDownload my data
. - Now a json file is downloaded.
- Save the json file on your PC at any location e.g /home/HP/1234567890-99123456789.json
- On you terminal or command prompt enter below command.
~$ truecallerpy --login -f /home/HP/1234567890-99123456789.json
- Now you are successfully logged in.
Enter the below command to see your InstallationId.
~$ truecallerpy --installationid
Print only installation Id.
~$ truecallerpy -i -r
~$ truecallerpy -s [number]
{
"data": [
{
"id": "jsiebejebbeebhee/dnss00w==",
"name": "Sumith Emmadi",
"imId": "1g7rm006b356o",
"gender": "UNKNOWN",
"image": "https://storage.googleapis.com/tc-images-noneu/myview/1/jdvdidbdhvdjdvddbkdbeiebeieb",
"score": 0.9,
"access": "PUBLIC",
"enhanced": true,
"phones": [
{
"e164Format": "+000000000000",
"numberType": "MOBILE",
"nationalFormat": "+000000000000",
"dialingCode": 91,
"countryCode": "IN",
"carrier": "Airtel",
"type": "openPhone"
}
],
"addresses": [
{
"city": "Andhra Pradesh",
"countryCode": "IN",
"timeZone": "+05:30",
"type": "address"
}
],
"internetAddresses": [
{
"id": "email@gmail.com",
"service": "email",
"caption": "Sumith Emmadi",
"type": "internetAddress"
}
],
"badges": [
"verified",
"user"
],
"cacheTtl": "",
"sources": [],
"searchWarnings": [],
"surveys": []
}
],
"provider": "ss-nu",
"stats": {
"sourceStats": []
}
}
To get raw output.
~$ truecallerpy -s [number] -r
{"data":[{"id":"jsiebejebbeebhee/dnss00w==","name":"Sumith Emmadi","imId":"1g7rm006b356o","gender":"UNKNOWN","image":"https://storage.googleapis.com/tc-images-noneu/myview/1/jdvdidbdhvdjdvddbkdbeiebeieb","score":0.9,"access":"PUBLIC","enhanced":true,
"phones":[{"e164Format":"+000000000000","numberType":"MOBILE","nationalFormat":"+000000000000","dialingCode":91,"countryCode":"IN","carrier":"Airtel","type":"openPhone"}],"addresses":[{"city":"Andhra Pradesh","countryCode":"IN","timeZone":"+05:30","type":"address"}],
"internetAddresses":[{"id":"email@gmail.com","service":"email","caption":"Sumith Emmadi","type":"internetAddress"}],"badges":["verified","user"],"cacheTtl":"","sources":[],"searchWarnings":[],"surveys":[]}],"provider":"ss-nu","stats":{"sourceStats":[]}}
To print only name.
~$ truecallerpy -s [number] --name
Name : Sumith Emmadi
Other command's
~$ truecallerpy -s [number] -r --name
Sumith Emmadi
To print only email.
~$ truecallerpy -s [number] --email
Email : username@email.com
Other command's
~$ truecallerpy -s [number] --email -r
username@email.com
~$ truecallerpy -s [number] --json
~$ truecallerpy -s [number] -r --json
{"data":[{"id":"jsiebejebbeebhee/dnss00w==","name":"Sumith Emmadi","imId":"1g7rm006b356o","gender":"UNKNOWN","image":"https://storage.googleapis.com/tc-images-noneu/myview/1/jdvdidbdhvdjdvddbkdbeiebeieb","score":0.9,"access":"PUBLIC","enhanced":true,
"phones":[{"e164Format":"+000000000000","numberType":"MOBILE","nationalFormat":"+000000000000","dialingCode":91,"countryCode":"IN","carrier":"Airtel","type":"openPhone"}],"addresses":[{"city":"Andhra Pradesh","countryCode":"IN","timeZone":"+05:30","type":"address"}],
"internetAddresses":[{"id":"email@gmail.com","service":"email","caption":"Sumith Emmadi","type":"internetAddress"}],"badges":["verified","user"],"cacheTtl":"","sources":[],"searchWarnings":[],"surveys":[]}],"provider":"ss-nu","stats":{"sourceStats":[]}}
~$ truecallerpy --bs [Numbers seperated by comma]
Example :
~$ truecallerpy --bs 9912345678,+14051234567,+919987654321
from truecallerpy import search_phonenumber
id = "Your installationId at here"
# To know your installation id run `truecallerpy -i` on terminal or command prompt
# search_phonenumber( "PHONE_NUMBER","COUNTRY_CODE","INSTALLATION_ID")
search_phonenumber("9912345678","IN", id)
# ==> search_phonenumber("+12093031250","IN", id)
- PHONE_NUMBER : Number you want to search.
- COUNTRY_CODE : Country code you want to use by default . If mobile number is not in E164(International Format) Format then COUNTRY_CODE will be considered as a country code of that Mobile Number.
- INSTALLATION_ID : To know your InstallationId , install the package globally.
from truecallerpy import search_phonenumber,bulk_search
id = "your installation id"
# To know your installation id run `truecallerpy -i` on terminal or command prompt
# bulk_search( "DATA","COUNTRY_CODE","INSTALLATION_ID")
data = "9912345678,+14051234567,+919987654321" # phone numbers seperated by commas
bulk_search(data,"IN", id)
- DATA : Numbers seperated by commas.
MIT License
Copyright (c) 2022 Emmadi Sumith Kumar
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.