skillfed

shodan

Python library and command-line utility for Shodan (https://developer.shodan.io)

shodan v1.31.0 467.2K downloads/30d#6,500 on PyPI2,941
Permissive license DORMANT released

What it is and what it does

Shodan is a Python client library for the Shodan search engine, which indexes Internet-connected devices rather than websites. It wraps Shodan's REST API and streaming endpoints, allowing you to search for devices by attributes, retrieve bulk IP information, monitor network alerts, and access exploit data—all from Python code or the command line.

The library has no runtime dependencies, making installation straightforward, but it requires a Shodan API key to function. It is marked Production/Stable and has been in use since 2010, though development is dormant as of late 2024. The package is useful for security researchers, network administrators, and developers automating device discovery and reconnaissance tasks.

Use it for:

  • Automate security audits by searching for specific device types or services exposed on the Internet.
  • Perform bulk IP lookups to gather geolocation, hosting, and service information for a list of addresses.
  • Monitor your organization's network perimeter by setting up alerts for newly discovered exposed services.
  • Build reconnaissance tools that integrate Shodan queries into existing security workflows.
  • Stream real-time data from Shodan's firehose to detect newly indexed devices matching your criteria.

Worth the install?

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

Provides Python access to Shodan's search engine for Internet-connected devices, enabling queries for device information, bulk IP lookups, streaming data, and exploit searches.

Yes, if you need Shodan integration and have an active API key. The package is stable and dependency-free, but its dormancy (no updates since late 2024) means you should verify compatibility with your Python version and test against current Shodan API behavior before relying on it in production. No known vulnerabilities are recorded.

Install

shodan on PyPI

pip

pip install shodan

uv

uv add shodan

poetry

poetry add shodan

Installing shodan

Before you install

High install friction with no runtime dependencies. The package is dormant (last release 2023-12-17, no commits since 2024-08-05), though it remains marked Production/Stable and has accumulated 2941 GitHub stars. Maintenance is stalled but the codebase is not archived.

License in practice

Licensed under MIT (permissive), so you can use it freely in commercial and private projects without copyleft obligations.

Quickstart

pip install shodan

from shodan import Shodan

api = Shodan('YOUR_API_KEY')
ipinfo = api.host('8.8.8.8')
print(ipinfo)

Requires a valid Shodan API key from https://account.shodan.io to make any queries.

Verify before relying

  • Whether the package works reliably with modern Python versions (classifiers list Python 2.6–3.6 but no newer versions are declared).
  • Current state of Shodan's API compatibility and whether the library's dormancy affects real-world usability.

Package facts

License not declared (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 971 days since the last release
Last repo commit
First released
Downloads 467,163/month — #6,500 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: shodan-1.31.0.tar.gz

Keywords: security, network

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Software Development :: Libraries :: Python Modules

Tags

shodan api clientinternet device searchip lookup automationnetwork reconnaissancedevice discovery pythonshodan streaming apibulk ip information
network-reconnaissanceapi-clientdevice-discovery

More Python Modules packages