# Shodan Internetdb Ip Scanner (`b2b_lead_generation/shodan-internetdb-ip-scanner`) Actor

Scan IP addresses for open ports, hostnames, CPEs, tags, and known vulnerabilities using Shodan's public InternetDB. Batch-scan targets and export clean data to JSON, CSV, or Excel effortlessly.

- **URL**: https://apify.com/b2b_lead_generation/shodan-internetdb-ip-scanner.md
- **Developed by:** [B2B Lead Generation](https://apify.com/b2b_lead_generation) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Shodan InternetDB IP Scanner

![Shodan InternetDB IP Scanner cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/shodan-internetdb-ip-scanner-cover.png)

Enrich IP address lists with publicly available Shodan database information. This actor collects reported open ports, hostnames, CPEs, tags, and vulnerability identifiers for each IP address. Export structured results in JSON, CSV, or Excel formats for network inventory, security research, and asset analysis.

### What This Actor Does

This actor looks up IP addresses using Shodan dataset and returns the available information for each address.

Each successful result includes the IP address, reported ports, hostnames, CPEs, tags, and vulnerability identifiers, along with the collection timestamp. Failed lookups are recorded as error rows so other IP addresses can still be processed.

### Collection Mode

- **IP Lookup (`lookup`):** Collect available dataset information for each IP address in your input list.

### Input Example

```json
{
  "mode": "lookup",
  "ips": ["8.8.8.8", "1.1.1.1"],
  "userAgent": "BigiByteActorResearch/1.0 (contact: hello@bigibyte.com)",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `lookup` | Collection mode. |
| `ips` | array | `["8.8.8.8"]` | IP addresses to look up. |
| `userAgent` | string | `BigiByte research UA` | User-Agent value used for requests. |
| `timeoutSecs` | integer | `300` | Overall actor run timeout in seconds. |
| `requestTimeoutSecs` | integer | `30` | Timeout for individual requests in seconds. |
| `proxyConfiguration` | object | `{"useApifyProxy": false}` | Optional proxy configuration. |

### Output Example

```json
{
  "cpes": [],
  "hostnames": [
    "dns.google"
  ],
  "ip": "8.8.8.8",
  "ports": [53, 443],
  "tags": [],
  "vulns": [],
  "scrapedAt": "2026-10-26T00:00:00+00:00"
}
```

### Output Fields

| Field | Description |
|---|---|
| `cpes` | Common Platform Enumeration identifiers reported for the IP. |
| `hostnames` | Hostnames associated with the IP address. |
| `ip` | IP address that was looked up. |
| `ports` | Open ports reported by InternetDB. |
| `tags` | Tags associated with the IP address. |
| `vulns` | Vulnerability identifiers reported for the IP. |
| `scrapedAt` | Timestamp when the result was collected. |

### Use Cases

- **Open Port Research:** Review ports reported for a list of IP addresses.
- **Hostname Enrichment:** Add available hostname information to IP inventory records.
- **Vulnerability Screening:** Collect reported CVE identifiers for further security review.
- **Asset Inventory:** Enrich known IP address lists with structured network information.
- **Threat Intelligence Research:** Add publicly available dataset information to existing research datasets.
- **Dataset Exports:** Export IP lookup results to JSON, CSV, or Excel for analysis.

### Frequently Asked Questions

**Do I need a Shodan account to use this actor?**

The actor uses publicly accessible Shodan dataset information and does not require users to provide a Shodan account.

**What information is returned for each IP?**

Available results include open ports, hostnames, CPE identifiers, tags, and vulnerability identifiers.

**Can I export the results?**

Yes. Export the dataset in JSON, CSV, Excel, and other supported Apify formats.

### Trademark Notice

Shodan and its associated names, logos, and trademarks belong to their respective owners. This actor is an independent data collection tool and does not imply affiliation, sponsorship, or endorsement by Shodan.

### Is Web Scraping Legal?

This actor collects publicly accessible IP-related information without bypassing login screens, paywalls, or technical security measures. How collected information can be used depends on applicable laws and the source website's policies.

- **Personal Data:** IP addresses and associated hostnames may relate to identifiable individuals or organizations. Privacy laws such as GDPR and CCPA may apply. Use collected information responsibly and only when you have an appropriate lawful basis.
- **Copyright and Licensing:** Technical facts such as reported port numbers and vulnerability identifiers differ from protected text, images, and other content. Check applicable licences and attribution requirements before redistributing collected material.
- **Platform Terms and Rate Limits:** Respect Shodan InternetDB's terms, usage conditions, and reasonable request limits. Review the applicable conditions, particularly before commercial use.
- **Disclaimer:** This information is general guidance, not legal advice. Consult a qualified legal professional about your specific use case.

For more information, read Apify's guide: [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to scrape. IP lookup returns open ports, hostnames, CPEs, tags, and vulns for each IP.

## `ips` (type: `array`):

IP addresses to look up, one per line.

## `userAgent` (type: `string`):

Identify your scraper

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it. InternetDB usually works without a proxy.

## Actor input object example

```json
{
  "mode": "lookup",
  "ips": [
    "8.8.8.8"
  ],
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "ips": [
        "8.8.8.8"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("b2b_lead_generation/shodan-internetdb-ip-scanner").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "ips": ["8.8.8.8"] }

# Run the Actor and wait for it to finish
run = client.actor("b2b_lead_generation/shodan-internetdb-ip-scanner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "ips": [
    "8.8.8.8"
  ]
}' |
apify call b2b_lead_generation/shodan-internetdb-ip-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,b2b_lead_generation/shodan-internetdb-ip-scanner"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/cfu0OOd3ZSn5pDIf7/builds/LQOmNnRLHQURjGcdy/openapi.json
