# Shodan API **Provider:** Shodan **Category:** security **Base URL:** `https://api.shodan.io` **Auth:** api-key โ€” `?key=YOUR_API_KEY` **Rate Limit:** 1 request/sec (free) ยท Higher on paid **Free Tier:** Yes โ€” [object Object] **Pricing:** Free tier available (freemium) **Docs:** https://developer.shodan.io/api ## Description Shodan is the world's first search engine for internet-connected devices and services. The API lets you search for exposed services (web servers, databases, cameras, industrial control systems), look up detailed information for any IP address (open ports, SSL certificates, software versions, CVEs), monitor your attack surface, query for known vulnerabilities, and receive alerts when new devices appear in your specified IP ranges. Essential for security researchers, penetration testers, and attack surface management teams. ## Endpoints | Method | Endpoint | Description | |--------|----------|-------------| | GET | `https://api.shodan.io/shodan/host/{ip}` | Get all information Shodan has on a given IP | | GET | `https://api.shodan.io/shodan/host/search` | Search Shodan (e.g., apache country:US port:80) | | GET | `https://api.shodan.io/shodan/host/count` | Count results for a query without consuming credits | | GET | `https://api.shodan.io/shodan/services` | List all services Shodan crawls | | GET | `https://api.shodan.io/dns/resolve` | Resolve hostnames to IP addresses | | GET | `https://api.shodan.io/api-info` | Get API key plan info, query credits remaining | ## Authentication Pass your API key as the key query parameter on every request. Get a free key at account.shodan.io. ``` ?key=YOUR_API_KEY ``` ## Sample Request ```bash curl "https://api.shodan.io/shodan/host/count?query=apache+country%3AUS&key=$SHODAN_API_KEY" ``` ## Sample Response ```json { "matches": [], "facets": { "country": [{"count": 1243891, "value": "US"}] }, "total": 4829123 } ``` ## Pricing Details Free: basic lookups, limited search results. Membership (one-time $49): 100 query credits, 1M scan credits, download results. Small Business $299/mo: 10k query credits. API plans for enterprise use. --- *Source: [API Map](https://apimap.dev/apis/shodan/) โ€” CC BY 4.0*