shodan

How to exclude a country in a Shodan search?


I have a query I want to perform on Shodan that I want to exclude a certain country with.

I know I am able to select certain countries using the "country" filter like thingy country:"US". But in this case I want to exclude the UK, using the country code "GB", is there any possible way to do so?

Thanks in advance.


Solution

  • Yes, you can exclude results by prepending a "-" to the search filter:

    thingy -country:"US"
    

    You can also search for multiple values at the same time:

    thingy country:US,DE,CH
    

    Here are some more example queries:

    https://beta.shodan.io/search/examples