canonical: https://jentic.com/apis/shodan.io/shodan

# Shodan API

Shodan is the world's first search engine for Internet-connected devices. Use the Shodan API to search, scan, and monitor devices. The API exposes 41 endpoints secured with apiKey authentication.

## For AI agents

Programmatically returns all services found on given host ip, search shodan without results, returns only total count. Covers 41 operations with apiKey authentication.

## Scope

Does not handle payments, communications, or crm - use for security only.

## Capabilities

- Returns all services found on given host IP
- Search Shodan without results, returns only total count
- Break the search query into tokens
- Query and filter Shodan API records by parameters
- Monitor Shodan API operational status and events

## Use cases

### Security Operations

Use the Shodan API to perform security operations programmatically. The API provides 41 endpoints covering core functionality including returns all services found on given host ip, search shodan without results, returns only total count, search shodan using the same query syntax as the website.

Example prompt: Call GET /shodan/host/{ip} to returns all services found on given host ip

### Automated Account Management

Automate account operations by combining multiple Shodan API endpoints. Agents can search shodan without results, returns only total count and then search shodan using the same query syntax as the website in a single workflow.

Example prompt: Call GET /shodan/host/count to search shodan without results, returns only total count, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Shodan API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'returns all services found on given host ip', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /shodan/host/{ip} | Returns all services found on given host IP |
| GET | /shodan/host/count | Search Shodan without results, returns only total count |
| GET | /shodan/host/search | Search Shodan using the same query syntax as the website |
| GET | /shodan/host/search/facets | Returns a list of facets for breakdown info |
| GET | /shodan/host/search/filters | Returns a list of search filters for queries |
| GET | /shodan/host/search/tokens | Break the search query into tokens |
| GET | /shodan/ports | Returns list of port numbers crawlers look for |
| GET | /shodan/protocols | Returns protocols available for Internet scans |

## Key resources

- **Account** — Operations related to Account
- **Alerts** — Operations related to Alerts
- **Bulk Data** — Operations related to Bulk Data
- **DNS** — Operations related to DNS
- **Directory** — Operations related to Directory

## Why Jentic

- **Setup:** Wiring Shodan by hand means passing your API key on every request as the 'key' query parameter against api.shodan.io and parsing its host, search, and facet responses yourself. Through Jentic you install once, import the Shodan API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The Shodan endpoints in this spec are all read-only lookups over host, search, ports, and protocols, so you limit the agent to the operations it needs, such as host lookup by IP or search count, and it can call nothing beyond the read operations you choose.
- **Credential handling:** Your Shodan key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'look up services on a host IP' or 'count matching search results', and Jentic returns the matching Shodan operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Snyk** — Alternative security API
- **Crowdstrike** — Alternative security API

## FAQ

### What authentication does the Shodan API use?

The Shodan API uses an API key passed in the `key` query. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I returns all services found on given host ip with the Shodan API?

Yes. Use the GET /shodan/host/{ip} endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Shodan API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I returns all services found on given host ip through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'returns all services found on given host ip'. Jentic returns the matching Shodan API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Shodan API have?

The Shodan API exposes 41 endpoints covering account, alerts, bulk data operations.

### Can I limit what my agent is allowed to do with the Shodan API?

Yes. Because you run Jentic One yourself, your own rules decide which Shodan operations and credentials the agent can use. Since every Shodan operation in this spec is a read-only lookup over hosts, search, ports, and protocols, you can allow just the ones the agent needs, such as GET /shodan/host/{ip} for host lookup by IP or GET /shodan/host/count for a search count, and it can call nothing beyond the read operations you approve.
