{"id":24211,"library":"passivetotal","title":"PassiveTotal","description":"Python client library for the RiskIQ PassiveTotal and Illuminate API (version 2.5.9). Provides access to passive DNS, WHOIS, SSL certificates, trackers, articles, malware, attack surface intelligence, vulnerability intelligence, and more. Release cadence is irregular with minor bugfix and feature releases.","status":"active","version":"2.5.9","language":"python","source_language":"en","source_url":"https://github.com/passivetotal/python_api","tags":["passivetotal","riskiq","threat-intelligence","api-client","passive-dns","whois"],"install":[{"cmd":"pip install passivetotal","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"HTTP library used for API calls","package":"requests","optional":false},{"reason":"Used for WHOIS lookups in certain modules","package":"ipwhois","optional":true}],"imports":[{"wrong":"from passivetotal import Client","symbol":"Client","correct":"from passivetotal import Client"},{"symbol":"AccountClient","correct":"from passivetotal import AccountClient"},{"symbol":"api","correct":"from passivetotal import api"}],"quickstart":{"code":"from passivetotal import Client\nfrom passivetotal.analyzer import Hostname\n\n# Credentials: use environment variables or config file\nclient = Client(username=os.environ.get('PT_USERNAME', ''), api_key=os.environ.get('PT_API_KEY', ''))\n\n# Resolve a hostname query\nhostname = Hostname('passivetotal.org', client=client)\nprint(hostname.resolutions)\n","lang":"python","description":"Initialize client with credentials, then query a hostname for passive DNS resolutions."},"warnings":[{"fix":"Use the lower-level `Client` methods (e.g., `client.get_enrichment(...)`) for stable access.","message":"The `analyzer` module is experimental and may change in future releases. Avoid relying on internal details.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Always pass username and api_key explicitly, or set PT_USERNAME and PT_API_KEY environment variables.","message":"Client credentials are read from `~/.passivetotal/config` by default if not provided. If the file is present but malformed, import may fail silently.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Catch `passivetotal.exception.AnalyzerError` when accessing analyzer objects.","message":"Hostname resolution may throw `AnalyzerError` if the hostname cannot be resolved to an IP. This error is not documented in all versions.","severity":"gotcha","affected_versions":">=2.4.2"},{"fix":"Filter results further or use the `certificates_search` method with more specific parameters.","message":"The `certificates` property on `Hostname` uses a substring search across both subjectAlternativeNames and subjectCommonName. Results may include certificates not exactly matching the hostname.","severity":"gotcha","affected_versions":">=2.5.8"}],"env_vars":null,"search_vec":"'2.5.9':13 'access':15 'api':11,48 'api-cli':47 'articl':23 'attack':25 'bugfix':38 'cadenc':33 'certif':21 'client':3,49 'dns':18,52 'featur':40 'illumin':10 'intellig':27,29,46 'irregular':35 'librari':4 'malwar':24 'minor':37 'passiv':17,51 'passive-dn':50 'passivetot':1,8,42 'provid':14 'python':2 'releas':32,41 'riskiq':7,43 'ssl':20 'surfac':26 'threat':45 'threat-intellig':44 'tracker':22 'version':12 'vulner':28 'whoi':19,53","created_at":"2026-05-01T08:11:52.488144+00:00","updated_at":"2026-05-01T08:11:52.488144+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'Client' from 'passivetotal' (/tmp/tmpz8jymzr8/venv/lib/python3.12/site-packages/passivetotal/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.5.9","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/passivetotal/python_api","docs":null,"changelog":null,"pypi":"https://pypi.org/project/passivetotal/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","data","devops","auth-security"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}