# Shodan

```json
{
  "name": "Shodan",
  "slug": "shodan",
  "url": "https://composio.dev/toolkits/shodan",
  "markdown_url": "https://composio.dev/toolkits/shodan.md",
  "logo_url": "https://logos.composio.dev/api/shodan",
  "categories": [
    "data & analytics"
  ],
  "is_composio_managed": false,
  "updated_at": "2026-11-18T05:39:01.502Z"
}
```

![Shodan logo](https://logos.composio.dev/api/shodan)

## Description

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Shodan MCP or direct API to search exposed hosts, inspect services, monitor network exposure, and consume collection feeds through natural language.

## Summary

Shodan is an Internet intelligence service for discovering exposed devices and services.
It helps security teams search host data and monitor network exposure.

## Categories

- data & analytics

## Toolkit Details

- Tools: 45

## Images

- Logo: https://logos.composio.dev/api/shodan

## Authentication

- **Api Key**
  - Type: `api_key`
  - Description: Api Key authentication for Shodan.
  - Setup:
    - Configure Api Key credentials for Shodan.
    - Use the credentials when creating an auth config in Composio.

## Suggested Prompts

- Search Shodan for exposed Apache servers
- Inspect Shodan host details for 8.8.8.8
- Monitor Shodan network exposure for my assets

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `SHODAN_ADD_ALERT_NOTIFIER` | Add Alert Notifier | Attach an existing notifier to a paid Shodan network alert. This changes notification routing: future matching alert events may be delivered to the notifier's external destination. Verify both ids and the destination before calling. |
| `SHODAN_ADD_ORGANIZATION_MEMBER` | Add Organization Member | Add a Shodan user to the connected Enterprise organization and upgrade their account, granting organization access. This is an administrative membership mutation. When notify is true, Shodan also sends an external email notification to the user about the invitation or access change; confirm the intended username or email address and access change before calling. |
| `SHODAN_COUNT_HOSTS` | Count Hosts | Count hosts matching a Shodan search query and optionally return facet counts, without returning banners or consuming query credits for a plain count. |
| `SHODAN_CREATE_NETWORK_ALERT` | Create Network Alert | Create continuous Shodan monitoring for specified IP addresses or CIDR ranges. This paid operation changes account monitoring state and consumes monitored-IP capacity for the expanded ranges. Review the complete target set and available capacity before calling; the alert remains active until it expires or is deleted. |
| `SHODAN_CREATE_NOTIFIER` | Create Notifier | Create a reusable Shodan notification destination. This does not affect alert routing until the notifier is attached to an alert, and it does not send a test notification. Provider arguments may contain personal contact details or secrets such as webhook URLs, routing keys, and access tokens; confirm the destination and avoid exposing these values. |
| `SHODAN_DELETE_NETWORK_ALERT` | Delete Network Alert | Permanently delete a Shodan network alert and stop monitoring its configured IP addresses or CIDR ranges. This destructive paid-account action cannot be undone; verify the alert id before calling it. |
| `SHODAN_DELETE_NOTIFIER` | Delete Notifier | Permanently delete a Shodan notification service. This destructive action cannot be undone and can stop delivery for every alert that uses the notifier. Never delete the account's default notifier; verify the notifier id and its alert dependencies before calling. |
| `SHODAN_DISABLE_ALERT_TRIGGER` | Disable Alert Trigger | Disable one or more trigger rules on a paid Shodan network alert. This changes the alert configuration and prevents those trigger types from generating future alert events and notifications; verify the trigger names before calling. |
| `SHODAN_ENABLE_ALERT_TRIGGER` | Enable Alert Trigger | Enable one or more trigger rules on a paid Shodan network alert. This mutates the alert configuration and can cause future matching events to generate notifications; verify the alert id and trigger names before calling. |
| `SHODAN_GET_ACCOUNT_PROFILE` | Get Account Profile | Return membership status, credits, display name, username, creation time, and additional profile fields for the owner of the connected Shodan API key. This response contains private account identity, contact, and subscription information; disclose or store it only when necessary. |
| `SHODAN_GET_API_PLAN_INFORMATION` | Get API Plan Information | Return the connected API key's Shodan plan, query and scan credits, monitored-IP allowance, usage limits, and unlocked protocol features. |
| `SHODAN_GET_DOMAIN_INFORMATION` | Get Domain Information | Return one page of subdomains and DNS records for a domain. Each lookup consumes 1 Shodan query credit and requires Shodan Membership or higher. |
| `SHODAN_GET_EXECUTION_EGRESS_IP` | Get Execution Egress IP | Return the public source IP address Shodan observes for this API request. When called through Composio, this is normally the outbound proxy or execution environment address, not the end user's device IP address. |
| `SHODAN_GET_HOST_INFORMATION` | Get Host Information | Return Shodan's current or historical service observations for one IP address. The main REST API host lookup requires Shodan Membership or higher. |
| `SHODAN_GET_NETWORK_ALERT` | Get Network Alert | Get one Shodan network alert, including its filters, triggers, and attached notifiers. Paid monitoring capacity is required to have active alerts. |
| `SHODAN_GET_NOTIFIER` | Get Notifier | Get one Shodan notification service and its provider-specific destination arguments. The response can contain personal or secret routing data. |
| `SHODAN_GET_OBSERVED_REQUEST_HEADERS` | Get Observed Request Headers | Return the HTTP request headers Shodan observes for this Composio API call. Use this transport diagnostic to inspect proxy-visible request metadata, not to retrieve headers from an Internet host. |
| `SHODAN_GET_ORGANIZATION` | Get Organization | Return the connected account's Shodan organization, administrators, members, member upgrade, authorized domains, and branding. This Enterprise-only response contains private usernames and email addresses. Accounts without the organization entitlement can receive an HTML 403 response, which this action reports as an entitlement error. |
| `SHODAN_GET_SCAN_STATUS` | Get Scan Status | Return the submission or processing status of one Shodan on-demand scan. Creating on-demand scans requires a paid API plan and consumes scan credits. |
| `SHODAN_IGNORE_ALERT_SERVICE` | Ignore Alert Service | Add one IP:port service to a Shodan network alert trigger's ignore list so matching events no longer notify. This paid-account action changes future notification behavior for the selected trigger. |
| `SHODAN_LIST_ALERT_TRIGGERS` | List Alert Triggers | List trigger rules that can be enabled on Shodan network alerts. Configuring network alerts requires paid monitoring access. |
| `SHODAN_LIST_CRAWLED_PORTS` | List Crawled Ports | List TCP and UDP port numbers currently crawled by Shodan. |
| `SHODAN_LIST_DATASET_FILES` | List Dataset Files | List downloadable file metadata for one Shodan bulk dataset. Bulk dataset access is an Enterprise feature; this action returns metadata and does not download the files. |
| `SHODAN_LIST_DATASETS` | List Datasets | List bulk Shodan datasets available to the connected account. Bulk data requires a Shodan Enterprise entitlement. |
| `SHODAN_LIST_NETWORK_ALERTS` | List Network Alerts | List network alerts on the connected account, optionally including expired alerts. Accounts without monitoring capacity can return an empty list. |
| `SHODAN_LIST_NOTIFIER_PROVIDERS` | List Notifier Providers | List supported notification providers and the provider-specific argument names each requires. |
| `SHODAN_LIST_NOTIFIERS` | List Notifiers | List notification services available on the connected account. Returned provider arguments can contain personal or secret destination data; do not log or expose them unnecessarily. |
| `SHODAN_LIST_SAVED_QUERIES` | List Saved Queries | Return one page of community-saved Shodan search queries, with optional vote or timestamp ordering. |
| `SHODAN_LIST_SAVED_QUERY_TAGS` | List Saved Query Tags | List the most popular tags used by community-saved Shodan queries. |
| `SHODAN_LIST_SCAN_PROTOCOLS` | List Scan Protocols | List protocol names and descriptions accepted by Shodan on-demand scan requests. |
| `SHODAN_LIST_SCANS` | List Scans | Return one page of active and recent on-demand scans for the connected Shodan account. Creating scans still requires credits and a paid plan. |
| `SHODAN_LIST_SEARCH_FACETS` | List Search Facets | List facet names accepted by Shodan host search. |
| `SHODAN_LIST_SEARCH_FILTERS` | List Search Filters | List filter names accepted in Shodan host-search query syntax. |
| `SHODAN_REMOVE_ALERT_NOTIFIER` | Remove Alert Notifier | Detach a notifier from a paid Shodan network alert so future matching events are no longer sent through it. This changes the alert's notification configuration but does not delete the notifier itself. |
| `SHODAN_REMOVE_ORGANIZATION_MEMBER` | Remove Organization Member | Permanently remove a member from the connected Shodan Enterprise organization and downgrade their account. This destructive administrative action immediately changes the user's access and entitlements and cannot be undone automatically. Verify the exact username or email address and obtain explicit authorization before calling. |
| `SHODAN_REQUEST_INTERNET_SCAN` | Request Internet Scan | Submit an Internet-wide scan for one port and protocol, initiating external network traffic and consuming scan credits. This operation is restricted to approved security researchers and Enterprise Data license holders; call it only with explicit authorization. |
| `SHODAN_REQUEST_SCAN` | Request Scan | Submit an asynchronous Shodan scan for specified IP addresses or CIDR ranges. This paid operation initiates network traffic and consumes one scan credit per IP. Use it only for systems you own or have explicit authorization to assess; review the full target set before calling. |
| `SHODAN_RESOLVE_HOSTNAMES` | Resolve Hostnames | Resolve one or more hostnames to IP addresses. Shodan Membership or higher is required. The response maps each resolved hostname to its IP address. |
| `SHODAN_REVERSE_DNS_LOOKUP` | Reverse DNS Lookup | Look up hostnames for one or more IP addresses. Shodan DNS API access requires Membership or higher. |
| `SHODAN_SEARCH_HOSTS` | Search Hosts | Return one page of Shodan banners matching a query, with optional facets and field selection. Filters or pages after page 1 can consume query credits and availability varies by plan. |
| `SHODAN_SEARCH_SAVED_QUERIES` | Search Saved Queries | Return one page of community-saved Shodan queries matching text. |
| `SHODAN_TOKENIZE_SEARCH_QUERY` | Tokenize Search Query | Parse a Shodan search query into text, filters, attributes, and syntax errors without running the search. |
| `SHODAN_UNIGNORE_ALERT_SERVICE` | Unignore Alert Service | Remove one IP:port service from a Shodan network alert trigger's ignore list so matching events can notify again. Requires a paid network alert. |
| `SHODAN_UPDATE_NETWORK_ALERT` | Update Network Alert | Replace the complete IP and CIDR range list monitored by an existing Shodan network alert. This changes paid monitoring coverage and may change which future matching events generate notifications; review the full replacement list before calling. |
| `SHODAN_UPDATE_NOTIFIER` | Update Notifier | Replace provider-specific arguments for an existing Shodan notifier. This changes where future notifications are delivered and can expose notification content to an external email address, webhook, phone number, or chat service. Verify the notifier id and every destination value before calling. |

## Supported Triggers

None listed.

## Installation and MCP Setup

### Path 1: SDK Installation

#### Path 1, Step 1: Install Composio

Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
```python
pip install composio composio_openai openai
```

```typescript
npm install @composio/core @composio/openai openai
```

#### Path 1, Step 2: Create a Composio session

Initialize Composio with the OpenAI Responses provider and create a session scoped to Shodan
```python
import json
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
client = OpenAI()

session = composio.create(user_id="your-user-id", toolkits=["shodan"])
tools = session.tools()
```

```typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["shodan"] });
const tools = await session.tools();
```

#### Path 1, Step 3: Run Shodan tools with your agent

Send a request, execute the Shodan tool calls through the session, and print the final answer
```python
response = client.responses.create(
    model="gpt-5.6-sol",
    tools=tools,
    input=[{"role": "user", "content": "Search Shodan for exposed Apache servers in the United States"}],
)

while True:
    tool_calls = [o for o in response.output if o.type == "function_call"]
    if not tool_calls:
        break
    results = composio.provider.handle_tool_calls(response=response, session=session)
    response = client.responses.create(
        model="gpt-5.6-sol",
        tools=tools,
        previous_response_id=response.id,
        input=[
            {"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(results[i])}
            for i, call in enumerate(tool_calls)
        ],
    )

print(response.output_text)
```

```typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Search Shodan for exposed Apache servers in the United States" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
```

### Path 2: MCP Server Setup

#### Path 2, Step 1: Install Composio

Install the Composio SDK and your agent framework
```python
pip install composio claude-agent-sdk
```

```typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
```

#### Path 2, Step 2: Create a session with MCP enabled

Create a session scoped to Shodan and read its MCP URL and headers
```python
from composio import Composio

composio = Composio()
session = composio.create(user_id="your-user-id", toolkits=["shodan"], mcp=True)
```

```typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["shodan"],
  mcp: true,
});
```

#### Path 2, Step 3: Connect your agent to the MCP server

Pass the session's MCP URL and headers to your agent and run a Shodan request
```python
import asyncio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions, AssistantMessage, TextBlock

options = ClaudeAgentOptions(
    mcp_servers={
        "composio": {
            "type": "http",
            "url": session.mcp.url,
            "headers": session.mcp.headers,
        }
    },
    system_prompt="You are a helpful assistant with access to Shodan tools.",
    tools=[],
    allowed_tools=["mcp__composio__*"],
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query("Search Shodan for exposed Apache servers in the United States")
        async for message in client.receive_response():
            if isinstance(message, AssistantMessage):
                for block in message.content:
                    if isinstance(block, TextBlock):
                        print(block.text)

asyncio.run(main())
```

```typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Search Shodan for exposed Apache servers in the United States",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
```

## Why Use Composio?

### 1. AI Native Shodan Integration

- Supports both Shodan MCP and direct API based integrations
- Structured, LLM-friendly schemas for reliable host searches and service lookups
- Rich coverage for querying exposed devices, banners, network data, and collection feeds

### 2. Managed Auth

- Connect Shodan with your own API key through a secure credential flow
- Central place to manage, scope, and revoke Shodan access
- Per user and per environment credentials instead of hard-coded keys

### 3. Agent Optimized Design

- Tools are tuned using real error and success rates to improve reliability over time
- Comprehensive execution logs so you always know what ran, when, and on whose behalf

### 4. Enterprise Grade Security

- Fine-grained RBAC so you control which agents and users can access Shodan
- Scoped, least privilege access to Shodan resources
- Full audit trail of agent actions to support review and compliance

## Use Shodan with any AI Agent Framework

Choose a framework you want to connect Shodan with:

- [ChatGPT](https://composio.dev/toolkits/shodan/framework/chatgpt)
- [Claude Cowork](https://composio.dev/toolkits/shodan/framework/claude-cowork)
- [Hermes](https://composio.dev/toolkits/shodan/framework/hermes-agent)
- [Atomic Agent](https://composio.dev/toolkits/shodan/framework/atomic-agent)

## Related Toolkits

- [Firecrawl](https://composio.dev/toolkits/firecrawl) - Firecrawl automates large-scale web crawling and data extraction. It helps organizations efficiently gather, index, and analyze content from online sources.
- [Tavily](https://composio.dev/toolkits/tavily) - Tavily offers powerful search and data retrieval from documents, databases, and the web. It helps teams locate and filter information instantly, saving hours on research.
- [Exa](https://composio.dev/toolkits/exa) - Exa is a data extraction and search platform for gathering and analyzing information from websites, APIs, or databases. It helps teams quickly surface insights and automate data-driven workflows.
- [Serpapi](https://composio.dev/toolkits/serpapi) - SerpApi is a real-time API for structured search engine results. It lets you automate SERP data collection, parsing, and analysis for SEO and research.
- [Excel](https://composio.dev/toolkits/excel) - Microsoft Excel is a robust spreadsheet application for organizing, analyzing, and visualizing data. It's the go-to tool for calculations, reporting, and flexible data management.
- [Peopledatalabs](https://composio.dev/toolkits/peopledatalabs) - Peopledatalabs delivers B2B data enrichment and identity resolution APIs. Supercharge your apps with accurate, up-to-date business and contact data.
- [Snowflake](https://composio.dev/toolkits/snowflake) - Snowflake is a cloud data warehouse built for elastic scaling, secure data sharing, and fast SQL analytics across major clouds.
- [Posthog](https://composio.dev/toolkits/posthog) - PostHog is an open-source analytics platform for tracking user interactions and product metrics. It helps teams refine features, analyze funnels, and reduce churn with actionable insights.
- [21risk](https://composio.dev/toolkits/_21risk) - 21RISK is a web app built for easy checklist, audit, and compliance management. It streamlines risk processes so teams can focus on what matters.
- [0xArchive](https://composio.dev/toolkits/0xarchive) - 0xArchive is a crypto data service for historical and current market data, quality signals, feedback, and webhooks. It helps teams access reliable crypto data and manage REST integrations from one API.
- [Abstract](https://composio.dev/toolkits/abstract) - Abstract provides a suite of APIs for automating data validation and enrichment tasks. It helps developers streamline workflows and ensure data quality with minimal effort.
- [AccuWeather](https://composio.dev/toolkits/accu_weather) - AccuWeather is a global weather service providing current conditions, forecasts, MinuteCast precipitation, alerts, and lightning data. Use it for fast, localized forecasts and real-time weather alerts.
- [Adafruit IO](https://composio.dev/toolkits/adafruit_io) - Adafruit IO is Adafruit's cloud platform for connected device and IoT project data. It helps you store, visualize, and act on sensor feeds without running your own backend.
- [Addressfinder](https://composio.dev/toolkits/addressfinder) - Addressfinder is a data quality platform for verifying addresses, emails, and phone numbers. It helps you ensure accurate customer and contact data every time.
- [Agentql](https://composio.dev/toolkits/agentql) - Agentql is a toolkit that connects AI agents to the web using a specialized query language. It enables structured web interaction and data extraction for smarter automations.
- [Agenty](https://composio.dev/toolkits/agenty) - Agenty is a web scraping and automation platform for extracting data and automating browser tasks—no coding needed. It streamlines data collection, monitoring, and repetitive online actions.
- [Ahrefs MCP](https://composio.dev/toolkits/ahrefs_mcp) - Ahrefs MCP is Ahrefs' hosted MCP server for SEO data and insights. Use it to access backlinks, organic metrics, keyword research, and competitor analysis.
- [Akta](https://composio.dev/toolkits/akta) - Akta is a company intelligence platform providing enrichment, news, and alternative business signals. It helps teams build targeted company lists and enrich data-driven workflows.
- [Ambee](https://composio.dev/toolkits/ambee) - Ambee is an environmental data platform providing real-time, hyperlocal APIs for air quality, weather, and pollen. Get precise environmental insights to power smarter decisions in your apps and workflows.
- [Ambient weather](https://composio.dev/toolkits/ambient_weather) - Ambient Weather is a platform for personal weather stations with a robust API for accessing local, real-time, and historical weather data. Get detailed environmental insights directly from your own sensors for smarter apps and automations.

## Frequently Asked Questions

### Do I need my own developer credentials to use Shodan with Composio?

Yes, Shodan requires you to configure your own API key. Once set up, Composio handles secure credential storage and API request handling for you.

### Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. [Learn more](https://docs.composio.dev/tool-router/overview).

### Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. [Learn more](https://trust.composio.dev).

### What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
