Skip to main content

Filtering with RSQL

Common Query Parameters

NameInput
id
OPTIONAL
state
OPTIONAL
createdDate
OPTIONAL
updatedDate
OPTIONAL

Supported RSQL Comparison Operators

OperationOperator
Equal to==
Not equal to!=
Less than=lt= or <
Less than or equal to=le= or <=
Greater than=gt= or >
Greater than or equal to=ge= or >=
In=in=
Not in=out=

Supported RSQL Logical Operators

OperationOperatorDescription
AND;Both expressions must evaluate to true
OR,At least one expression must evaluate to true
Example RSQL Query
?ql=countryCode==US;administrativeArea=in=("TX","NY")

Interpretation

Return results where:

  • countryCode equals US, AND
  • administrativeArea is TX or NY

Wildcard Matching

The wildcard character * may be used in string values to perform partial matching.

PatternBehaviorExample
value*Starts withname==Star*
*valueEnds withname==*Mart
*value*Containsname==*Coffee*
RSQL Query
?ql=locationDetails.displayNames.name=="*coffee*"

Matches values such as:

  • Coffee House
  • Best Coffee Shop
  • Iced coffee bar

Value Formatting Rules

Some selectors accept unquoted values, while others require quoted string values.

# Unquoted — country code
countryCode==US

# Quoted — administrative area
administrativeArea=="TX"

# In list — always parentheses
countryCode=in=(FR,IT,JP)

General Rules

  • Enumerated or code-like values such as country codes and taxonomy-style dot-delimited paths may be expressed without quotes.
  • String values that contain spaces or special characters should be quoted.
  • Administrative area values in this API must be quoted.
  • Values used with =in= and =out= must be enclosed in parentheses, even when only one value is provided.

Use Case One

Filter feedback about locations created on or after a specific date and time.

Interpretation

Return results where:

  • The feedback is associated with a location resource, and
  • The feedback was created on or after the specified timestamp

Visual Table

SelectorRule
resourceTypeMust equal LOCATION
createdDateGreater than or equal to the specified timestamp

RSQL Query

RSQL Query
?ql=resourceType==LOCATION;createdDate=ge=2026-03-10T00:00:00Z

Explanation

This query uses the AND (;) logical operator to combine two conditions:

  • resourceType==LOCATION restricts results to feedback associated with location resources.
  • createdDate=ge=2026-03-10T00:00:00Z returns feedback created on or after the specified timestamp.

The timestamp is expressed using ISO 8601 format in UTC (Z).

Use Case Two

Filter feedback about specific locations.

Interpretation

Return results where the feedback is associated with one of the specified location identifiers.

Visual Table

SelectorRule
resourceIdMust match one of the specified location identifiers

RSQL Query

RSQL Query
?ql=resourceId=in=(9467895078742654944,9467895078742654945,9467895078742654946)

Explanation

This query uses the =in= comparison operator to match feedback records associated with any of the specified location identifiers.

The resourceId selector represents the identifier of the resource that the feedback relates to.

By supplying multiple identifiers within the =in= list, the query returns feedback associated with any of the listed locations.

Values inside the =in= list are evaluated using OR semantics, meaning a result is returned if its resourceId matches at least one of the listed identifiers.

Use Case Three

Filter locations that belong to specific categories while excluding a more specific category.

Interpretation

Return results where:

  • The location is categorized as either Ice Cream Shop or Gelato Shop, and
  • The location is not categorized as Frozen Yogurt Shop

Visual Table

SelectorRule
locationDetails.categoriesMust be Ice Cream Shop or Gelato Shop
locationDetails.categoriesMust not be Frozen Yogurt Shop

RSQL Query

RSQL Query
?ql=locationDetails.categories=in=(dining.dessert_shop.ice_cream_shop,dining.dessert_shop.ice_cream_shop.gelato_shop);locationDetails.categories=out=(dining.dessert_shop.ice_cream_shop.frozen_yogurt_shop)

Explanation

This query combines two conditions using the AND (;) logical operator:

  • locationDetails.categories=in=(...) matches locations categorized as either Ice Cream Shop or Gelato Shop.
  • locationDetails.categories=out=(...) excludes locations categorized as Frozen Yogurt Shop.

The category values are expressed using dot-delimited taxonomy identifiers.

Use Case Four

Filter locations that satisfy any of the following geographic conditions.

Interpretation

  • Country is FR, IT, or JP
  • Country is US, excluding administrative areas RI, NM, CA
  • Country is ZW, excluding administrative areas MV, BU, MA
  • Country is CA, restricted to administrative areas QC or ON
  • Country is DE, restricted to administrative areas HH or BE

Visual Table

CountryAdministrative Area Rule
FRAll
ITAll
JPAll
USAll except RI, NM, CA
ZWAll except MV, BU, MA
CAOnly QC, ON
DEOnly HH, BE

RSQL Query

This query implements a geographic inclusion filter composed of country-level rules, where some countries are fully included, some exclude specific administrative areas, and others are restricted to specific administrative areas.

RSQL Query
?ql=(locationDetails.mainAddress.structuredAddress.countryCode=in=(FR,IT,JP),(locationDetails.mainAddress.structuredAddress.countryCode==US;locationDetails.mainAddress.structuredAddress.administrativeArea=out=("RI","NM","CA")),(locationDetails.mainAddress.structuredAddress.countryCode==ZW;locationDetails.mainAddress.structuredAddress.administrativeArea=out=("MV","BU","MA")),(locationDetails.mainAddress.structuredAddress.countryCode==CA;locationDetails.mainAddress.structuredAddress.administrativeArea=in=("QC","ON")),(locationDetails.mainAddress.structuredAddress.countryCode==DE;locationDetails.mainAddress.structuredAddress.administrativeArea=in=("HH","BE")))