Package Information
Available Nodes
Documentation
n8n-nodes-shodan
This is an n8n community node. It lets you use Shodan in your n8n workflows.
Shodan is a search engine for Internet-connected devices that allows you to discover and monitor devices, services, and vulnerabilities across the Internet.
n8n is a fair-code licensed workflow automation platform.
Installation
Operations
Credentials
Compatibility
Usage
Resources
Installation
Follow the installation guide in the n8n community nodes documentation.
Community Nodes (Recommended)
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-shodanin the Enter npm package name field - Agree to the risks of using community nodes
- Select Install
After installing the node, you can use it like any other node. n8n displays the node in search results in the Nodes panel.
Manual Installation
To get started install the package in your n8n root directory:
npm install n8n-nodes-shodan
For Docker-based deployments, add the following line before the font installation command in your n8n Dockerfile:
RUN cd /usr/local/lib/node_modules/n8n && npm install n8n-nodes-shodan
Operations
Host
- Get: Returns all services that have been found on the given host IP address
Search
- Query: Search Shodan using the same query syntax as the website
- Count: Get the total number of results that matched the query
DNS
- Resolve: Look up the IP address for the provided list of hostnames
- Reverse: Look up the hostnames that have been defined for the given list of IP addresses
Domain
- Get Info: Get all the subdomains and other DNS entries for the given domain
Credentials
To use this node, you need a Shodan API key. Here's how to set it up:
Prerequisites
- Sign up for a Shodan account at https://account.shodan.io/register
- Choose a plan:
- Free: Limited queries per month
- Membership: More queries and additional features
- Enterprise: Unlimited queries and full access
Getting Your API Key
- Log in to your Shodan account at https://account.shodan.io/
- Your API key will be displayed on the account page
- Copy the API key
Setting Up Credentials in n8n
- In n8n, go to Credentials in the left sidebar
- Click Add Credential
- Search for "Shodan API" and select it
- Enter your API key in the API Key field
- Click Save
Compatibility
- Minimum n8n version: 0.180.0
- Tested against: n8n 1.0.0+
Usage
Basic Examples
Search for Apache servers in the United States
- Add the Shodan node to your workflow
- Select Resource: Search
- Select Operation: Query
- Enter Query:
apache country:US - Execute the node
Look up IP address information
- Add the Shodan node to your workflow
- Select Resource: Host
- Select Operation: Get
- Enter IP Address:
8.8.8.8 - Execute the node
Resolve domain to IP
- Add the Shodan node to your workflow
- Select Resource: DNS
- Select Operation: Resolve
- Enter Hostnames:
google.com,facebook.com - Execute the node
Get domain information and subdomains
- Add the Shodan node to your workflow
- Select Resource: Domain
- Select Operation: Get Info
- Enter Domain:
example.com - Optionally enable History for historical DNS data
- Optionally select a specific DNS Type (A, AAAA, CNAME, etc.)
- Execute the node
Search Query Syntax
Shodan uses filters to narrow down search results. Here are some common filters:
country:US- Filter by country codeport:22- Filter by port numberorg:Google- Filter by organizationproduct:nginx- Filter by product nameos:Windows- Filter by operating systemcity:"Los Angeles"- Filter by citynet:8.8.8.0/24- Filter by network range
You can combine multiple filters:
apache country:US port:443 city:"New York"
Common Use Cases
- Security Monitoring: Monitor your IP ranges for exposed services
- Vulnerability Research: Find devices running specific software versions
- Asset Discovery: Discover all internet-facing assets for an organization
- Threat Intelligence: Track malicious IPs and services
- Compliance Checks: Verify that sensitive services aren't publicly exposed
Tips
- Use the Count operation first to check how many results you'll get before running a full search
- For large result sets, use pagination with the Page parameter
- Enable Minify to reduce response size for searches
- Combine with other n8n nodes for automated security workflows