Shodan Search Methods API

Search and lookup endpoints for indexed devices.

Operations 6

GET /shodan/host/{ip} Get Host Information #
GET /shodan/host/count Get Search Result Count #
GET /shodan/host/search Search Shodan #
GET /shodan/host/search/facets List Search Facets #
GET /shodan/host/search/filters List Search Filters #
GET /shodan/host/search/tokens Break Query Into Tokens #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-rest-host-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-rest-search-result-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-rest-alert-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-rest-notifier-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-rest-scan-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-structure/shodan-rest-host-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-structure/shodan-rest-alert-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-stream-banner-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-structure/shodan-stream-banner-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-trends-result-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-internetdb-host-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-cvedb-cve-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/shodan/refs/heads/main/json-schema/shodan-cvedb-cpe-schema.json

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-search-methods-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. 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:
  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
  parameters:
    IpPath:
      name: ip
      in: path
      required: true
      schema:
        type: string
      description: IPv4 or IPv6 address.
    Query:
      name: query
      in: query
      required: true
      schema:
        type: string
      description: Shodan search query.
    Facets:
      name: facets
      in: query
      schema:
        type: string
      description: Comma-separated facet definitions (e.g. `country:5,port:10`).
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: Shodan API key.