How can I search for devices using the Shodan command-line interface?
First initialize your API key with `shodan init YOUR_API_KEY`. Then use `shodan search --fields ip_str,port,org,hostnames <query>` to search and display specific fields. For example, `shodan search --fields ip_str,port,org,hostnames apache` returns IP, port, organization, and hostnames for Apache servers. You can also count results with `shodan count <query>` or download them with `shodan download <filename> <query>`, then parse the downloaded file using `shodan parse`.
Shodan CLIcommand-line interfaceshodan searchshodan countshodan downloadshodan parse
Source:Shodan API Usage Guide