Before you can query Censys data through Google BigQuery, you'll need to add the Censys Dataset to your BigQuery project. This article explains how to add the dataset once you have created a Google Cloud account.
Note: BigQuery access is only available to users of an enterprise data contract and verified non-commercial researchers. If you have any questions about access, please contact email@example.com.
Pinning the Censys Project
Log in to the BigQuery UI in the Google Cloud Console. If your account is set up correctly, you should see your primary project and the standard query interface. I have created and switched to a new project, that is specific to Censys research.
Follow this link to automatically add censys-io to your Resource tree.
After you expand "censys-io" to view the tables, refreshing the page will notify you that 'censys-io' was pinned to the Resource tree.
If you prefer to manually pin censys-io to the Resource tree, click "+ ADD DATA", and then "Pin a project".
Enter "censys-io" as the project name, and click "PIN".
You'll receive notification that 'censys-io' was pinned to the Resource tree.
Once the Censys project has been added, you can query the Censys datasets just like you would query any of your own data. Click Compose Query to get started. For example, you can get a count of the distinct IPs in our current IPv4 scan dataset:
SELECT COUNT(DISTINCT ip)
Now that you've added the datasets, to your account, here's some more information on how to write queries.