Skip to main content
Solved

Invalid V3 Query Conversion

  • October 30, 2025
  • 3 replies
  • 37 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\\\":.*"

3 replies

MattK_Censys
Forum|alt.badge.img+2
  • Censys Community Manager
  • Answer
  • November 3, 2025

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
  • November 5, 2025

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
  • November 5, 2025

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