Skip to content

Data Queries

Find data matching a list of search params for a given datatype:

results = sf.get_data(datatype).find(params)

where params is a list of lists of key, operand and value:

params = [
    [key, op, value]
]
results = sf.get_data(datatype).find(params)

For example, querying all event data with a location of "San Francisco":

params = [
    ["city", "=", "San Francisco"]
]
results = sf.get_data("event").find(params)

Or searching nested data:

params = [
    ["venue.id", "=", venue["id"]]
]
results = sf.get_data("event").find(params)

Supported operands

The following is a list of supported operands that can be used in search params.

Operand Description
> greater than
< less than
>= greater than or equal
<= less then or or equal
= equal to
in in a list
not_in not in a list
!= not equal to
~= regex pattern matching