Registry / http-networking / censys

censys

JSON →
library2.2.19pypypiunverified

An easy-to-use and lightweight API wrapper for Censys APIs (censys.io). Current version 2.2.19, supports Python 3.8+. Released roughly monthly.

pip install censys
INSTALL
IMPORT
SIG · CENSYS
C
censys
http-networkingpythonv2.2.19
Install
3.4s avg
Import
—
Disk
33MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2.2.19 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 34.8MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 3.4s · import 0.000s · 35MB
33MB installed
● package 33MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CensysAsm
✓ from censys.asm import CensysAsm
✗ from censys.asm import CensysAsm

Initialize CensysSearch and CensysAsm with credentials and perform basic queries.

from censys.search import CensysSearch from censys.asm import CensysAsm # Initialize with credentials (set via env or directly) api_id = os.environ.get('CENSYS_API_ID', '') api_secret = os.environ.get('CENSYS_API_SECRET', '') c = CensysSearch(api_id=api_id, api_secret=api_secret) # Search for hosts results = c.hosts.search("services.service_name: HTTP", per_page=1) for host in results(): print(host) # Use ASM asm = CensysAsm(api_id=api_id, api_secret=api_secret) seeds = asm.seeds.list() print(seeds)
censys --version
Debug
Known issues
deprecatedThe v1 Search API (CensysCertificates, CensysIPv4) is deprecated since v2.2.18. Use the v2 Search API (CensysSearch) instead.
fix
Replace imports: from censys.certificates import CensysCertificates → from censys.search import CensysSearch. See migration guide.
affects: >=2.2.18
breakingThe CensysAsm class moved from censys.asm.asm to censys.asm in v2.2.x. Old import path breaks.
fix
Use 'from censys.asm import CensysAsm' instead of 'from censys.asm.asm import CensysAsm'.
affects: >=2.2.0
gotchaCredentials must be set via environment variables (CENSYS_API_ID, CENSYS_API_SECRET) or passed directly. If both are missing, initialization fails silently.
fix
Always set API_ID and API_SECRET before creating any client.
affects: all
gotchaSearch results are lazy and require iteration. The search() method returns a generator; if you don't iterate, no API call is made.
fix
Always iterate over results: for result in search_results(): ...
affects: all
Upgrade
Version history
2.2.19latest on PyPI · released Dec 11, 2025
Audit
Dependencies
requestsrequiredHTTP client for API calls
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
censys — pip install censys · libregistry