Sorting

By default, all search results are sorted by relevance (ie, closest matches to the search query first). You can change this behaviour using the sortBy parameter. This parameter applies to the Search endpoint.

The possible values for the sortBy parameter are:

Value Description
NAME Sorts listings alphabetically on the business name.
RELEVANCE Sorts listings by relevance to search query. This is the default.
DISTANCE

Sorts listings by distance to given location. Each page will be sorted individually. (Which results are on each page will be determined by relevance).

When sorting by distance, the location parameter must be provided, and must not be a region or state (ie, the location must be as specific as a suburb or street address).

DISTANCE_ALL_PAGES

Sorts listings by distance to given location. All results will be sorted.

When sorting by distance, the location parameter must be provided, and must not be a region or state (ie, the location must be as specific as a suburb or street address).

For example, to sort alphabetically rather than by relevance:

http://api.sensis.com.au/v1/test/search?query=supermarket&sortBy=NAME&key=...