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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

censys-2.3.0.tar.gz (412.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

censys-2.3.0-py3-none-any.whl (80.6 kB view details)

Uploaded Python 3

File details

Details for the file censys-2.3.0.tar.gz.

File metadata

  • Download URL: censys-2.3.0.tar.gz
  • Upload date:
  • Size: 412.1 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for censys-2.3.0.tar.gz
Algorithm Hash digest
SHA256 7ebf18d6327acd27817265a5ad34342afae56f9f5c7f0016f651b82e593a6a33
MD5 85966593ec583a1ff53b775f23416048
BLAKE2b-256 0af1a7da18ea36eabdc73a7fd5c80ce475a61c7a05a3912be64edb3c33980ca7

See more details on using hashes here.

File details

Details for the file censys-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: censys-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 80.6 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for censys-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18280ad81a5f22892c0506def8551813991d6a3b227da5803c3f6eb4081997d7
MD5 77cd5174e1bdd65801a98f2bc412e790
BLAKE2b-256 d0b1676fccf54dc874114db5bc1308e7a68fbc914e6c6c4bf7689060f483500d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 files

2.2.19

2 files

2.2.18

2 files

2.2.17

2 files

2.2.16

2 files

2.2.15

2 files

2.2.14

2 files

2.2.13

2 files

2.2.12

2 files

2.2.11

2 files

2.2.10

2 files

2.2.9

2 files

2.2.8

2 files

2.2.7

2 files

2.2.6

2 files

2.2.5

2 files

2.2.4

2 files

2.2.3

2 files

2.2.2

2 files

2.2.1

2 files

2.2.0

2 files

2.1.9

2 files

2.1.8

2 files

2.1.7

2 files

2.1.6

2 files

2.1.5

2 files

2.1.4

2 files

2.1.3

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.9

2 files

2.0.8

2 files

2.0.7

2 files

2.0.6

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.4

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

1 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