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. Wildcard matching is case-insensitive. For text selectors such as display names, matching is evaluated against each word in the value individually — so jos* matches "San Jose" because the word "Jose" starts with "jos", even though the full string does not.

PatternBehaviorExample
value*Starts withname==Malibu*
*valueEnds withname==*Sports
tip

Use at least three characters in your prefix for meaningful results (for example, san* rather than s*).

Unsupported

PatternBehaviorExample
*value*Containsname==*Coffee*

Supported Selectors

Wildcard matching is supported on the following selectors.

Location

Selector
locationDetails.displayNames.name
locationDetails.categories
locationDetails.phoneNumbers.phoneNumber

Brand

Selector
brandDetails.displayNames.name
brandDetails.categories
brandDetails.countryCodes

brandDetails.countryCodes is a flat list of string values and each element is matched individually against the wildcard pattern. This is distinct from the address-level countryCode field (locationDetails.mainAddress.structuredAddress.countryCode), which is a sub-field within a structured address object and supports exact and list-based matching only.

Structured address selectors — such as locality, administrativeArea, and countryCode — support exact and list-based matching only; see Value Formatting Rules.

Selectors that accept enumerated values, such as state and locationDetails.locationStatus.status, do not support wildcard matching. Supplying a wildcard value for these selectors returns an error.

Wildcard Patterns with Spaces

When a wildcard pattern contains a space, the value must be enclosed in double quotes.

Examples
# Correct — quoted
locationDetails.displayNames.name=="*Ice Cream"

# Incorrect — returns a parse error
locationDetails.displayNames.name==*Ice Cream

See Value Formatting Rules for general quoting guidance.

Examples

Filter by name — starts with

Return locations whose display name starts with "Malibu".

RSQL Query
?ql=locationDetails.displayNames.name==Malibu*

Matches values such as:

  • Malibu Ice Cream
  • Malibu Beach Bar

Filter by name — ends with (quoted)

Return locations whose display name ends with "Ice Cream". Because the pattern contains a space, the value must be enclosed in double quotes.

RSQL Query
?ql=locationDetails.displayNames.name=="*Ice Cream"

Matches values such as:

  • Malibu Ice Cream
  • Artisan Ice Cream

Filter by name — word prefix

Return locations whose display name contains a word starting with "jos". Because prefix matching applies to each word in the value individually, this matches multi-word names where any word begins with the prefix — not only names that start with "jos".

RSQL Query
?ql=locationDetails.displayNames.name==jos*

Matches values such as:

  • San Jose Grill
  • Josefina's Bakery
  • Jose's Cantina

Filter by category — starts with

Return locations in the dining taxonomy.

RSQL Query
?ql=locationDetails.categories==dining*

Matches taxonomy paths such as:

  • dining.restaurant
  • dining.dessert_shop.ice_cream_shop
  • dining.restaurant.asian_cuisine.japanese_cuisine.sushi_restaurant

Filter by phone number — starts with

Return locations with a phone number belonging to a specific area code.

RSQL Query
?ql=locationDetails.phoneNumbers.phoneNumber==+1415*

Matches values such as:

  • +14155550100
  • +14155550173

Filter by country code — starts with (brand)

Return brands operating in countries whose code starts with "U". Each element in the countryCodes list is matched individually against the pattern.

RSQL Query
?ql=brandDetails.countryCodes==U*

Matches values such as:

  • US
  • UA
  • UG

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")))