This method behaves identical to “/shodan/host/search” with the only difference that this method does not return any host results, it only returns the total number of results that matched the query and any facet information that was requested. As a result this method does not consume query credits.

Parameters

ParameterDescription
FacetsA comma-separated list of properties to get summary information on. Property names can also be in the format of “property:count”, where “count” is the number of facets that will be returned for a property (i.e. “country:100” to get the top 100 countries for a search query). Visit the Shodan website’s Facet Analysis page for an up-to-date list of available facets: Explore Facets.
QueryShodan search query. The provided string is used to search the database of banners in Shodan, with the additional option to provide filters inside the search query using a “filter:value” format. For example, the following search query would find Apache Web servers located in Germany: “apache country:DE”. List of Filters.

Example Output

{
    "matches": [
        {
            "product": "nginx",
            "hash": -1609083510,
            "ip": 1616761883,
            "org": "Comcast Business",
            "isp": "Comcast Business",
            "transport": "tcp",
            "cpe": [
                "cpe:/a:igor_sysoev:nginx"
            ],
            "data": "HTTP/1.1 400 Bad Request\r\nServer: nginx\r\nDate: Mon, 25 Jan 2021 21:33:48 GMT\r\nContent-Type: text/html\r\nContent-Length: 650\r\nConnection: close\r\n\r\n",
            "asn": "AS7922",
            "port": 443,
            "hostnames": [
                "three.webapplify.net"
            ],
            "location": {
                "city": "Denver",
                "region_code": "CO",
                "area_code": null,
                "longitude": -104.9078,
                "country_code3": null,
                "latitude": 39.7301,
                "postal_code": null,
                "dma_code": 751,
                "country_code": "US",
                "country_name": "United States"
            },
            "timestamp": "2021-01-25T21:33:49.154513",
            "domains": [
                "webapplify.net"
            ],
            "http": {
                "robots_hash": null,
                "redirects": [],
                "securitytxt": null,
                "title": "400 The plain HTTP request was sent to HTTPS port",
                "sitemap_hash": null,
                "robots": null,
                "server": "nginx",
                "host": "96.93.212.27",
                "html": "\r\n400 The plain HTTP request was sent to HTTPS port\r\n\r\n400 Bad Request\r\nThe plain HTTP request was sent to HTTPS port\r\nnginx\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n",
                "location": "/",
                "components": {},
                "securitytxt_hash": null,
                "sitemap": null,
                "html_hash": 199333125
            },
            "os": null,
            "_shodan": {
                "crawler": "c9b639b99e5410a46f656e1508a68f1e6e5d6f99",
                "ptr": true,
                "id": "534cc127-e734-44bc-be88-2e219a56a099",
                "module": "auto",
                "options": {}
            },
            "ip_str": "96.93.212.27"
        },
        {
            "product": "nginx",
            "hostnames": [
                "kolobok.us"
            ],
            "hash": 1940048442,
            "ip": 3104568883,
            "org": "RuWeb",
            "isp": "RuWeb",
            "transport": "tcp",
            "cpe": [
                "cpe:/a:igor_sysoev:nginx:1.4.2"
            ],
            "data": "HTTP/1.1 410 Gone\r\nServer: nginx/1.4.2\r\nDate: Mon, 25 Jan 2021 21:33:50 GMT\r\nContent-Type: text/html; charset=iso-8859-1\r\nContent-Length: 295\r\nConnection: keep-alive\r\n\r\n",
            "asn": "AS49189",
            "port": 80,
            "version": "1.4.2",
            "location": {
                "city": null,
                "region_code": null,
                "area_code": null,
                "longitude": 37.6068,
                "country_code3": null,
                "latitude": 55.7386,
                "postal_code": null,
                "dma_code": null,
                "country_code": "RU",
                "country_name": "Russia"
            },
            "timestamp": "2021-01-25T21:33:51.172037",
            "domains": [
                "kolobok.us"
            ],
            "http": {
                "robots_hash": null,
                "redirects": [],
                "securitytxt": null,
                "title": "410 Gone",
                "sitemap_hash": null,
                "robots": null,
                "server": "nginx/1.4.2",
                "host": "185.11.246.51",
                "html": "\n\n410 Gone\n\nGone\nThe requested resource/\nis no longer available on this server and there is no forwarding address.\nPlease remove all references to this resource.\n\n",
                "location": "/",
                "components": {},
                "securitytxt_hash": null,
                "sitemap": null,
                "html_hash": 922034037
            },
            "os": null,
            "_shodan": {
                "crawler": "c9b639b99e5410a46f656e1508a68f1e6e5d6f99",
                "ptr": true,
                "id": "118b7360-01d0-4edb-8ee9-01e411c23e60",
                "module": "auto",
                "options": {}
            },
            "ip_str": "185.11.246.51"
        },
        ...
    ],
    "facets": {
        "country": [
            {
                "count": 7883733,
                "value": "US"
            },
            {
                "count": 2964965,
                "value": "CN"
            },
            {
                "count": 1945369,
                "value": "DE"
            },
            {
                "count": 1717359,
                "value": "HK"
            },
            {
                "count": 940900,
                "value": "FR"
            }
        ]
    },
    "total": 23047224
}

Workflow Library Example

Search Without Results with Shodan and Send Results Via Email

Preview this Workflow on desktop