Filtering with RSQL
Common Query Parameters
| Name | Input |
|---|---|
id | |
state | |
createdDate | |
updatedDate |
Supported RSQL Comparison Operators
| Operation | Operator |
|---|---|
| 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
| Operation | Operator | Description |
|---|---|---|
| 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:
countryCodeequals US, ANDadministrativeAreais TX or NY
Wildcard Matching
The wildcard character * may be used in string values to perform partial matching.
| Pattern | Behavior | Example |
|---|---|---|
value* | Starts with | name==Star* |
*value | Ends with | name==*Mart |
*value* | Contains | name==*Coffee* |
?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
| Selector | Rule |
|---|---|
resourceType | Must equal LOCATION |
createdDate | Greater than or equal to the specified timestamp |
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==LOCATIONrestricts results to feedback associated with location resources.createdDate=ge=2026-03-10T00:00:00Zreturns 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
| Selector | Rule |
|---|---|
resourceId | Must match one of the specified location identifiers |
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
| Selector | Rule |
|---|---|
locationDetails.categories | Must be Ice Cream Shop or Gelato Shop |
locationDetails.categories | Must not be Frozen Yogurt Shop |
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, orJP - Country is
US, excluding administrative areasRI,NM,CA - Country is
ZW, excluding administrative areasMV,BU,MA - Country is
CA, restricted to administrative areasQCorON - Country is
DE, restricted to administrative areasHHorBE
Visual Table
| Country | Administrative Area Rule |
|---|---|
| FR | All |
| IT | All |
| JP | All |
| US | All except RI, NM, CA |
| ZW | All except MV, BU, MA |
| CA | Only QC, ON |
| DE | Only 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.
?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")))