Skip to content

0. Introduction

UnQuery (Universal Query String Filter Specification) defines how to write search filters for documents, in URLs and in JSON, independently of the data source. It is part of the LingoData family of specifications for data interoperability.

A filter is defined once, as an abstract model (section 1), and can be written in two syntaxes: JSON (section 2) and a restricted SQL predicate syntax (section 3). Section 4 maps both to URL query strings. Implementations translate filters to each data source, such as MongoDB, PostgreSQL, MySQL, Notion or Airtable, and never pass filter text to a data source.

Within the family, UnQuery operands are ECSON values, and UnQuery is the search query format recommended by the CRUD API Base Specification.

The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in BCP 14 (RFC 2119, RFC 8174) when, and only when, they appear in all capitals, as shown here.

Normative rules are identified by a code (for example NULL_NE). Notes, examples and rationales are informative.

  • Filter: a tree of conditions and logical combinations (section 1).
  • Condition: a field path, an operator and an operand.
  • Field path: the dot-separated path to a field in a document.
  • Operator set: a named group of operators; the core set is mandatory, the others are optional.
  • Control parameter: a query string key starting with @ (section 4.2).
  • Provider: the component that translates filters to a specific data source.

Source: lingodata/unquery@865de91 · spec/sections/00-introduction.md · unquery 0.1.0 (draft)

LingoData specifications, reference implementations and this site are licensed under the Apache License 2.0. Copyright 2026 Gustavo Gondim.