Docs / Reference
Query Options: $filter, $select, $orderby, $top, $skip, $count and $expand
The seven query options that shape every request, with an example of each.
Query options are added to the request address after a question mark and joined with &. They choose which records come back ($filter), which fields ($select), in what order ($orderby), how many ($top and $skip), whether to count them ($count), and which linked records to include ($expand). The RESO Web API Core specification requires servers to support $select, $top, $skip, $count, $orderby and $filter.
$filter
Picks the records to return. Join conditions with and, or and not, and group them with brackets.
$filter=StandardStatus eq 'Active' and City eq 'Richmond' and ListPrice le 1200000
$select
Lists the fields to return, separated by commas. A search card needs a handful of fields, so a short $select makes the answer smaller and faster.
$select=ListingKey,ListPrice,BedroomsTotal,BathroomsTotalInteger,City
$orderby
Sorts by one or more fields, each with asc or desc. Add ListingKey last so listings with the same price keep a steady order across pages.
$orderby=ListPrice asc,ListingKey asc
$top and $skip
$top sets how many records one page returns. $skip skips records, and RESO lets each provider decide how far $skip may go, so use @odata.nextLink for deep paging.
$top=24&$skip=24
$count
$count=true adds @odata.count, the number of records that match the filter, to the answer. Use it for a results heading such as 312 homes found.
$filter=MLSAreaMinor eq 'Kitsilano'&$count=true&$top=0
$expand
Includes linked records, such as a listing's media, in the same answer. Nest $select and $orderby inside brackets, separated by semicolons. Your metadata document shows which links can be expanded.
$expand=Media($select=MediaURL,Order;$orderby=Order asc)
Encoding the address
Spaces, quotes and the $ sign must be encoded when code builds the address. Let your HTTP library do it: URLSearchParams in JavaScript, params in Python requests, add_query_arg or http_build_query in PHP. The code examples page shows each.
Query options
| Option | Does | Example |
|---|---|---|
| $filter | Picks records | StandardStatus eq 'Active' |
| $select | Picks fields | ListingKey,ListPrice |
| $orderby | Sorts | ListPrice desc |
| $top | Sets page size | 24 |
| $skip | Skips records | 24 |
| $count | Adds the total | true |
| $expand | Includes linked records | Media |
Query options from the OData 4.01 URL conventions, as used by the RESO Web API.
Common questions
Which query options are supported?
$filter, $select, $orderby, $top, $skip and $count, which the RESO Web API Core specification requires, plus $expand where the metadata shows a link.
How many records can one page return?
The server sets the largest page. Ask for the page size your page needs with $top and follow @odata.nextLink.
Why use $select?
A listing record can hold hundreds of fields. Asking for the few you show makes answers smaller and pages faster.
Can I sort by distance from a point?
Filter by a Latitude and Longitude box, then sort the results by distance in your own code.
How do I get a total count for a heading?
Add $count=true. With $top=0 you get only the count.
Do I need to encode the $ sign?
Let your HTTP library build the query string. It encodes spaces, quotes and other characters correctly.
Can I combine and with or?
Yes. Use brackets to group, for example (City eq 'Burnaby' or City eq 'New Westminster') and BedroomsTotal ge 2.
Is there a search across all text?
String functions such as contains are outside RESO Web API Core. Filter on fields, such as area, price and rooms.
Specifications
- OData Version 4.01, Part 2: URL Conventions (OASIS)
- Web API Core specification (RESO Transport Workgroup)
Last reviewed 2026-11-20