Skip to main content
Solved

Invalid V3 Query Conversion

  • Oct 30, 2025 1:08 PM UTC
  • 3 replies
  • 210 views

V2 query:

services.banner="{\"connect\":*foo\":*"

Converted V3 query:

host.services.banner=~"^\\{\"connect\":.*foo\":.*"

The response is “Your query is invalid”.

Best answer by MattK_Censys

Hey vitutus, since you’re using double quotes there you’d need extra escapes for them. The valid syntax would be:

host.services.banner=~"^\\{\\\"connect\\\":.*foo\\\":.*"

View original

3 replies

MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • Answer
  • Nov 3, 2025 3:27 PM UTC

Hey vitutus, since you’re using double quotes there you’d need extra escapes for them. The valid syntax would be:

host.services.banner=~"^\\{\\\"connect\\\":.*foo\\\":.*"


  • Author
  • New Participant
  • Nov 5, 2025 3:14 PM UTC

Thanks Matt,

However, this is what the query converter is returning. For our planned migration, we are going to be using the  Censys-Platform library’s “convert_legacy_search_queries” function and are not getting the extra escapes there either.


MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • Nov 5, 2025 7:34 PM UTC

Got it, we’re working on a fix for this on our end.