0

I am trying to run the API from the URL window or "from browser" but receive an error

In the first line is the instruction on how it should be done and on the second line how I did it and the error message.

Need help / ,probably because of me, guidance on how it should be written

Thank you

https://api.shodan.io/shodan/host/search?key={YOUR_API_KEY}&query={query}&facets={facets}

https://api.shodan.io/shodan/host/search?key=xxxxxxx MY_API?KEY_&port=8080&country=fr

{"error": "Empty search query"}

2
  • Why do you use port/country instead of query/facets? If you want to search for port 8080 in France you need to define a query for this.
    – nohillside
    May 19 '20 at 15:15
  • nohillside - Thanks for your comment though sorry if I didn't explain myself; I tried to do what you say - to build a query, and the query I built is what you find in the second line which gives me the error. Would you know how to fix it ? May 19 '20 at 15:54
1

From browser you can try this:

https://api.shodan.io/shodan/host/search?key=KEY&query=country%3AFR+port%3A8080
2
  • binarysta - thankyou Seems it is working because I received a different message which was> {"error": "Please upgrade your API plan to use filters or paging."} May 19 '20 at 16:05
  • @Javier_Caceres you need to have at least the Shodan Membership (shodan.io/store/member) to use search filters in the API.
    – achillean
    Jun 3 '20 at 22:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.