Skip to main content

Censys Python Library

PyPI Python Version Read the Docs (version) GitHub Discussions PRs Welcome License

[!WARNING] DEPRECATION NOTICE: The Censys Search v1 and v2 APIs will be deprecated soon. Please migrate to the new Censys Platform.

The Censys ASM APIs in this library are NOT deprecated and will continue to be supported.

An easy-to-use and lightweight API wrapper for Censys APIs (censys.io). Python 3.9+ is currently supported. This library has been tested on Python 3.9 and 3.x (Currently version 3.13).

Features

Getting Started

The library can be installed using pip.

pip install censys

To upgraded using pip.

pip install --upgrade censys

Alternatively, you can install the library using uv.

git clone https://github.com/censys/censys-python.git
cd censys-python/
uv install

Optionally, you can enable tab completion for the CLI by adding this line to your ~/.bashrc, ~/.zshrc, or equivalent.

Please note that autocomplete is supported for field names in the search command.

eval "$(register-python-argcomplete censys)"

To configure your search credentials run censys config or set both CENSYS_API_ID and CENSYS_API_SECRET environment variables.

$ censys config

Censys API ID: XXX
Censys API Secret: XXX
Do you want color output? [y/n]: y

Successfully authenticated for your@email.com

If you have a Censys ASM account, you can configure your ASM credentials by running censys asm config or set both CENSYS_ASM_API_KEY environment variables.

$ censys asm config

Censys ASM API Key: XXX
Do you want color output? [y/n]: y

Successfully authenticated

Examples

The examples located in the examples/ directory are a great place to start. You can also find more examples in the usage documentation.

Documentation

Read the Docs

Resources

Contributing

All contributions (no matter how small) are always welcome. See Contributing to Censys Python

Development

This project uses uv for dependency management. Please ensure you have installed the latest version.

git clone git@github.com:censys/censys-python.git
cd censys-python/
uv install

Testing

# Run tests
uv run pytest
# With coverage report
uv run pytest --cov-report html

License

This software is licensed under Apache License, Version 2.0

  • Copyright (C) 2026 Censys, Inc.

Release files for censys 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for censys 2.3.0
File Size Uploaded
censys-2.3.0.tar.gz 412.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for censys 2.3.0
File Interpreter ABI Platform
censys-2.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 492.7 kB

Release files / censys-2.3.0.tar.gz

Download URL censys-2.3.0.tar.gz
Size 412.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7ebf18d6327acd27817265a5ad34342afae56f9f5c7f0016f651b82e593a6a33
BLAKE2b-256 checksum
How to use checksums
0af1a7da18ea36eabdc73a7fd5c80ce475a61c7a05a3912be64edb3c33980ca7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / censys-2.3.0-py3-none-any.whl

Download URL censys-2.3.0-py3-none-any.whl
Size 80.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18280ad81a5f22892c0506def8551813991d6a3b227da5803c3f6eb4081997d7
BLAKE2b-256 checksum
How to use checksums
d0b1676fccf54dc874114db5bc1308e7a68fbc914e6c6c4bf7689060f483500d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 release files

2.2.19

2 release files

2.2.18

2 release files

2.2.17

2 release files

2.2.16

2 release files

2.2.15

2 release files

2.2.14

2 release files

2.2.13

2 release files

2.2.12

2 release files

2.2.11

2 release files

2.2.10

2 release files

2.2.9

2 release files

2.2.8

2 release files

2.2.7

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.9

2 release files

2.1.8

2 release files

2.1.7

2 release files

2.1.6

2 release files

2.1.5

2 release files

2.1.4

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.9

2 release files

2.0.8

2 release files

2.0.7

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page