Query Converter

The Query Converter assists users transitioning from Legacy Search syntax to Platform syntax (CenQL). Enter a Legacy Search query into the Query Converter to identify syntax differences and view recommended changes to correct your query. Most likely, your queries will be automatically converted.

Follow the steps below to use the Query Converter:

  1. Go to the Censys Platform Homepage and click the Query Converter tab.

  2. Enter a Legacy Search query into the Original Query field and click Convert.

Query Converter examples

  1. In the example below, a Legacy Search query was entered into the Original Query field: services.http.response.status_code: 500. The query syntax was successfully converted to valid Platform syntax.

  2. In the example below, the Query Converter can't convert the Legacy Search query, but it provides error messages that identify issues. The query used in the example is: labels: {c2, security-tool} and labels: open-dir and not labels: {truncated, honeypot, tarpit}.

Legacy Search to Platform - query conversion examples

The table below provides examples of Legacy Search queries converted to Platform queries using CenQL.

Legacy Search QueryPlatform Search - CenQL
ip: 1.1.1.1host.ip: 1.1.1.1
name: "censys.com"web.hostname: "censys.com"
dns.names: "censys.io"host.dns.names: "censys.io"
services.service_name: HTTPhost.services.protocol: "HTTP" or web.endpoints.endpoint_type: "HTTP"
labels: camerahost.services.hardware.type="CAMERA"
labels: ipv6host.labels.value: "IPV6"
autonomous_system.asn: 1234host.autonomous_system.asn: 1234
location.country: "Spain"host.location.country: "Spain"
services.software.product: "GitLab"host.services.software.product: "GitLab" or web.software.product: "GitLab"
services.http.response.headers: (key: 'Server' and value.headers: 'nginx')web.endpoints.http.headers: (key: "Server" and value: "nginx")
services.http.response.headers: (key: 'Server' and value.headers: 'nginx') and location.country: 'Spain'host.services.endpoints.http.headers: (key: "Server" and value: "nginx") and host.location.country: "Spain"

Troubleshooting

  • You might have used a label that is not available on the Censys Platform. Review what label is used and how you're using it.
  • The Legacy Search query you used could have syntax issues.

Additional resources

  • The Example Queries tab in the Platform is an excellent resource for learning how to build queries using CenQL.
  • The Censys Query Language will help you to further understand CenQL.