Giter VIP home page Giter VIP logo

truecallerpy's Introduction

PyPI - Implementation PyPI - Python Version Downloads PyPI - License

  • A package to search phone number details.

Requirements

Installation

Install this pip package

pip install truecallerpy

Login

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.

  1. On Truecaller Android, tap on the 3 line menu on top left then click on setting's.
  2. Tap on Privacy Center and then click on Download my data.
  3. Now a json file is downloaded.
  4. Save the json file on your PC at any location e.g /home/HP/1234567890-99123456789.json
  5. On you terminal or command prompt enter below command.
~$ truecallerpy --login -f /home/HP/1234567890-99123456789.json
  1. Now you are successfully logged in.

InstallationId

Enter the below command to see your InstallationId.

~$ truecallerpy --installationid

Print only installation Id.

~$ truecallerpy -i -r

Searching a number

~$ 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 protected]",
               "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 protected]","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 : [email protected]

Other command's

~$ truecallerpy -s [number] --email -r 

[email protected]

To get only JSON output

~$ 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 protected]","service":"email","caption":"Sumith Emmadi","type":"internetAddress"}],"badges":["verified","user"],"cacheTtl":"","sources":[],"searchWarnings":[],"surveys":[]}],"provider":"ss-nu","stats":{"sourceStats":[]}}

To make a bulk search

~$ truecallerpy --bs [Numbers seperated by comma]
Example : 
 ~$ truecallerpy --bs 9912345678,+14051234567,+919987654321

Usage

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.

Bulk search

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.

License

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.