skillfed

censys

An easy-to-use and lightweight API wrapper for Censys APIs (censys.io).

censys v2.2.19 408.3K downloads/30d#6,883 on PyPI468
Permissive license Apache-2.0 Active released

What it is and what it does

Censys is a Python wrapper around the Censys internet-wide scanning and data APIs. It lets you query data on hosts, certificates, services, and network infrastructure, plus manage assets and events if you have a Censys ASM account. The library supports both programmatic access via Python and command-line queries through a built-in CLI.

The package is actively maintained and supports Python 3.8 through 3.14. However, the description includes a deprecation notice: the Search v1 and v2 APIs will be phased out in favor of a new Censys Platform API (available as the separate censys-platform package). The ASM APIs in this library are not deprecated and will continue to be supported. If you are starting a new project, you should evaluate whether to use this library or migrate to censys-platform.

Use it for:

  • Search for hosts, certificates, or services across the internet to understand your organization's external attack surface.
  • Perform bulk certificate lookups to track SSL/TLS deployments and identify potential security issues.
  • Download bulk datasets from Censys for offline analysis or integration into security workflows.
  • Manage assets, events, and reconnaissance seeds in Censys ASM for continuous monitoring.
  • Build command-line tools or scripts that query Censys data without writing custom HTTP clients.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python wrapper for Censys APIs that lets you search internet-wide data on hosts, certificates, and services, manage attack surface assets, and run queries from the command line.

Yes, if you need to query Censys data and are comfortable with the deprecation timeline. The library is stable, actively maintained, and has low install friction. However, review the deprecation notice carefully: if you are starting a new project, evaluate censys-platform as your long-term choice. For existing code or ASM-only use cases, this package remains a solid choice.

Install

censys on PyPI

pip

pip install censys

uv

uv add censys

poetry

poetry add censys

Installing censys

Before you install

Low install friction with five common runtime dependencies (requests, urllib3, backoff, rich, argcomplete). The project is actively maintained with recent commits and a stable release history since 2015.

License in practice

Licensed under Apache License 2.0 (permissive), so you can use, modify, and distribute the package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install censys

import os
from censys.search import CensysHosts

os.environ['CENSYS_API_ID'] = 'your_api_id'
os.environ['CENSYS_API_SECRET'] = 'your_api_secret'

h = CensysHosts()
results = h.view('1.1.1.1')

Requires valid Censys API credentials (CENSYS_API_ID and CENSYS_API_SECRET environment variables or configured via `censys config` command).

Verify before relying

  • Whether the deprecated Search v1/v2 APIs will remain functional during a migration window or if immediate switching to censys-platform is required.
  • Performance characteristics and rate limits for bulk operations or large-scale searches.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<4.0,>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 5 — requests, urllib3, backoff, rich, argcomplete
Maintenance actively maintained — 246 days since the last release
Last repo commit
First released
Downloads 408,252/month — #6,883 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: censys-2.2.19-py3-none-any.whl

Keywords: censys, api, search, attack surface management

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Documentation :: SphinxTopic :: InternetTopic :: Internet :: WWW/HTTP :: HTTP ServersTopic :: Internet :: WWW/HTTP :: Indexing/SearchTopic :: Scientific/Engineering :: Information AnalysisTopic :: SecurityTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: NetworkingTopic :: UtilitiesTyping :: Typed

Tags

censys api wrapperinternet host searchcertificate lookupattack surface managementnetwork reconnaissancesecurity scanning dataip address search
internet-scanningattack-surface-managementsecurity-research

More Python Modules packages