Skip to main content
Question

How do we export search results from Censys Search in windows?

  • November 20, 2024
  • 3 replies
  • 277 views

How do we export search results from Censys Search in windows?

3 replies

MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • 125 replies
  • November 20, 2024

Hi Susmita, there is currently no way to export search results directly from the Search UI. However, you can easily export search results using the CLI tool as described here:

https://support.censys.io/hc/en-us/articles/360044519751-Export-Censys-Search-Results

Let me know if this helps!


  • Author
  • New Participant
  • 2 replies
  • November 21, 2024

Hello Matt,

I have checked that document and tried in my command prompt, visual studio code and powershell but none of them seem to work. Is this doc only for linux terminal?


MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • 125 replies
  • November 21, 2024

Hey Susmita, are you including the following lines before your query commands?

from censys.search import CensysHosts


h = CensysHosts()

 

So your final snippet should look like this:
 

from censys.search import CensysHosts

h = CensysHosts()

query = h.search ("services.service_name: HTTP", per_page=50, pages=1)

print(query.view_all())

 

Let me know if that works.