Request Parameters


Bright MLS data services allow you to modify the request to specify certain fields, search data to narrow down the selection, and then limit and order the results.

Headers

The following headers are required:

FieldValue
User-AgentBright WebAPI/1.0
AuthorizationBearer [token]
Cache-Controlno-cache
Host[http client]

Note that we accept custom User-Agents but we require to add them prior to connection. Please see the FAQ.

Multiple parameters can be queried, but each parameter can only be called once. You cannot specify more than one set of $filter options for example.

Attribute Selection

The $select parameter allows you to specify fields to returned in the data set. This should be used often to narrow down to required fields, especially with resources containing large amounts of fields to improve response time.

The presence of a field in the metadata and in the $select parameters does not automatically provide access to that field's data. Access to a particular field is based on your credentials and roles allocated to you.

ParameterDescription
$selectA comma separated list specifying the attributes to be returned in the response payload.

Pagination

Pagination allows you to retrieve data is specified sets and provides information on how much data is available to iterate. This parameter is useful for replication as well as there are response limits.

The most efficient method of pagination is through the oData.nextLink method, which allows the client to specify a max page size for nextLink, and a link is then provided at the end of the results to query the next set of data. This is the fastest and safest method of pagination as the paged results are not affected by changes in data during pagination. When the last page of data is sent, the nextLink option will be absent from the end of the results, and $count query parameter can be used in conjunction with nextLink header option.

To implement oData.nextLink, add the following header to any resource query:

Header KeyHeader Value
Preferodata.maxpagesize=n

The response will automatically then include an odata.nextLink key with the URL, including parameters, to obtain the next page of data. Example:

Alternatively, you can use $top and $skip to paginate, though performance is significantly worse on queries with a large number of results.

ParameterDescription
$topInteger > 0 indicating how many results to return at once.
$skipIndicates the number of records to skip over.
$countBoolean true or false. Indicates if the number of records in the total result set should be returned. Default is false.

Sorting

Sorting is usually available on resources that allow filtering.

ParameterDescription
$orderbyIndicates the order in which to return records in the result set. Each service has its own default order.
Any field available in filters can be present in the $orderby parameter, with some exceptions (e.g. longer text fields such as PublicRemarks for properties).

Filtering

Request parameters below are common to data retrieval services supporting searching.

ParameterDescription
$filterOData filter syntax is used for filtering.

Filtering Operators

These parameters allow you to specify values for filtering and join multiple filtering options.

OptionDescription
eqEqual to
neNot Equal to
gtGreater than
geGreater than or equal to
ltLess than
leLess than or equal to
hasThe operator returns true if the right hand operand is an enumeration whos flags are set on the left operand
inAllows providing a comma-separated array of values inside parenthesis to compare against
andCombine filter options requiring all to be true
orCombine filter options requiring one to be true

Count

To return a total count of records for the filtered query, you can add the $count parameter.

Format

This parameter can be used to force the server response into either JSON or XML format.

ParameterOptionDescription
$formatjsonServer response in JSON format.
$formatxmlServer response in XML format.