Shodan Search Methods API

Search and lookup endpoints for indexed devices.

GitHub OpenAPI

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

0 of 6 operations are conformant: apis.io called them with no credentials and the responses matched this contract; 2 more answered but could not be checked against a schema. Checked 2026-11-12. how this works · status file

GET /shodan/host/{ip} Get information about a host · Get Host Information #
Ask an LLM
“What services are running on a given IP address?”
“Can I see the historical banners found on a host?”
Tell an agent
Get host information for {ip}.
Show the services found on {ip} with historical banners {history}.
GET /shodan/host/count Count how many hosts match a search · Get Search Result Count #
Ask an LLM
“How many hosts match a particular search query?”
“Can I check a search result count without using query credits?”
Tell an agent
Count the hosts matching {query}.
Tell me how many results {query} would return, faceting on {facets}.
GET /shodan/host/search Search the Shodan Internet database · Search Shodan #
Ask an LLM
“How do I find devices on the Internet that match a search?”
“Can I page through Shodan search results?”
Tell an agent
Search Shodan for {query}.
Find the {page} page of results for {query}.
GET /shodan/host/search/facets List facets for summarizing searches · List Search Facets observed #
Ask an LLM
“Which facets can I use to summarize search results?”
“What categories can I facet a Shodan search on?”
Tell an agent
List the search facets.
Show me how to summarize search results by facet.
GET /shodan/host/search/filters List filters for searching · List Search Filters observed #
Ask an LLM
“What filters can I use when searching Shodan?”
“Which search terms narrow down Internet hosts?”
Tell an agent
List the search filters.
Show me the available Shodan search filters.
GET /shodan/host/search/tokens Break a search query into tokens · Break Query Into Tokens #
Ask an LLM
“How do I see which filters and tokens make up a search query?”
“Can I parse a Shodan search into its parts?”
Tell an agent
Tokenize the search query {query}.
Break {query} into its filters and tokens.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/shodan:shodan-search-methods-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

shodan-search-methods-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Shodan REST Search Methods API
  description: The Shodan REST API exposes search methods, host lookups, on-demand scanning, network alerts, notifiers, the saved-query directory, DNS lookups, utility methods, account/profile information, bulk data, and organization management for the Shodan search engine for Internet- connected devices.
  version: '1.0'
  contact:
    name: Shodan Support
    email: support@shodan.io
    url: https://developer.shodan.io/
  license:
    name: Shodan API Terms of Service
    url: https://www.shodan.io/legal/tos
servers:
- url: https://api.shodan.io
  description: Production
security:
- apiKey: []
tags:
- name: Search Methods
  description: Search and lookup endpoints for indexed devices.
paths:
  /shodan/host/{ip}:
    get:
      tags:
      - Search Methods
      summary: Get Host Information
      operationId: getHost
      description: Returns all services that have been found on the given host IP.
      parameters:
      - $ref: '#/components/parameters/IpPath'
      - name: history
        in: query
        schema:
          type: boolean
          default: false
        description: Include historical banners.
      - name: minify
        in: query
        schema:
          type: boolean
          default: false
        description: Return a truncated banner record.
      responses:
        '200':
          description: Host record with banners.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Host'
        '404':
          $ref: '#/components/responses/NotFound'
  /shodan/host/count:
    get:
      tags:
      - Search Methods
      summary: Get Search Result Count
      operationId: getHostCount
      description: Returns the number of results a search would have, without consuming query credits or returning results.
      parameters:
      - $ref: '#/components/parameters/Query'
      - $ref: '#/components/parameters/Facets'
      responses:
        '200':
          description: Count and facet summary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchCount'
  /shodan/host/search:
    get:
      tags:
      - Search Methods
      summary: Search Shodan
      operationId: searchHosts
      description: Search Shodan using the same query syntax as the website. Uses one query credit per page after the first when filters are used.
      parameters:
      - $ref: '#/components/parameters/Query'
      - $ref: '#/components/parameters/Facets'
      - name: page
        in: query
        schema:
          type: integer
          default: 1
          minimum: 1
      - name: minify
        in: query
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Search results with matches and facets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResult'
  /shodan/host/search/facets:
    get:
      tags:
      - Search Methods
      summary: List Search Facets
      operationId: listSearchFacets
      description: Returns the list of facets that can be used to summarize search results.
      responses:
        '200':
          description: Array of facet names.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
  /shodan/host/search/filters:
    get:
      tags:
      - Search Methods
      summary: List Search Filters
      operationId: listSearchFilters
      description: Returns the list of filters that can be used when searching.
      responses:
        '200':
          description: Array of filter names.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
  /shodan/host/search/tokens:
    get:
      tags:
      - Search Methods
      summary: Break Query Into Tokens
      operationId: tokenizeSearchQuery
      description: Determine which filters and tokens make up a search query.
      parameters:
      - $ref: '#/components/parameters/Query'
      responses:
        '200':
          description: Parsed token structure.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
components:
  parameters:
    IpPath:
      name: ip
      in: path
      required: true
      schema:
        type: string
      description: IPv4 or IPv6 address.
    Facets:
      name: facets
      in: query
      schema:
        type: string
      description: Comma-separated facet definitions (e.g. `country:5,port:10`).
    Query:
      name: query
      in: query
      required: true
      schema:
        type: string
      description: Shodan search query.
  schemas:
    Banner:
      type: object
      properties:
        port:
          type: integer
        transport:
          type: string
          enum:
          - tcp
          - udp
        product:
          type: string
        version:
          type: string
        data:
          type: string
        timestamp:
          type: string
          format: date-time
        hash:
          type: integer
        ip_str:
          type: string
        org:
          type: string
        isp:
          type: string
        asn:
          type: string
        hostnames:
          type: array
          items:
            type: string
        domains:
          type: array
          items:
            type: string
        location:
          type: object
          properties:
            city:
              type: string
            country_code:
              type: string
            country_name:
              type: string
            latitude:
              type: number
            longitude:
              type: number
        ssl:
          type: object
          additionalProperties: true
        http:
          type: object
          additionalProperties: true
        cpe23:
          type: array
          items:
            type: string
        vulns:
          type: object
          additionalProperties: true
    SearchCount:
      type: object
      properties:
        total:
          type: integer
        facets:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                count:
                  type: integer
                value:
                  type: string
    Host:
      type: object
      properties:
        ip_str:
          type: string
        ip:
          type: integer
        hostnames:
          type: array
          items:
            type: string
        domains:
          type: array
          items:
            type: string
        country_code:
          type: string
        country_name:
          type: string
        city:
          type: string
        region_code:
          type: string
        postal_code:
          type: string
        latitude:
          type: number
        longitude:
          type: number
        org:
          type: string
        isp:
          type: string
        asn:
          type: string
        os:
          type: string
        last_update:
          type: string
          format: date-time
        ports:
          type: array
          items:
            type: integer
        vulns:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/Banner'
    SearchResult:
      type: object
      properties:
        total:
          type: integer
        matches:
          type: array
          items:
            $ref: '#/components/schemas/Banner'
        facets:
          type: object
          additionalProperties:
            type: array
            items:
              type: object
              properties:
                count:
                  type: integer
                value:
                  type: string
  responses:
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: Shodan API key.