shodan_host_count

Pack: shodan · Endpoint: https://gateway.pipeworx.io/shodan/mcp

Count hosts matching with facet breakdown (free — this endpoint does not consume query credits). Returns the total match count plus optional facet aggregations (e.g. top countries, orgs, ports). Example: shodan_host_count({ query: “apache”, facets: “country:10”, _apiKey: “your-key” })

Parameters

NameTypeRequiredDescription
querystringyesShodan search query, e.g. “apache” or “port:443 country:DE”
facetsstringnoComma-separated facets for aggregation, e.g. “country:10” or “org:5,port:5” (optional)
_apiKeystringyesShodan API key (account.shodan.io; paid membership required)

Example call

Arguments

{
  "query": "apache",
  "_apiKey": "your-shodan-api-key"
}

curl

curl -X POST https://gateway.pipeworx.io/shodan/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"shodan_host_count","arguments":{"query":"apache","_apiKey":"your-shodan-api-key"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('shodan_host_count', {
  "query": "apache",
  "_apiKey": "your-shodan-api-key"
});

More examples

{
  "query": "port:443 country:DE",
  "facets": "country:10,org:5",
  "_apiKey": "your-shodan-api-key"
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "shodan": {
      "url": "https://gateway.pipeworx.io/shodan/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build August 15, 2026