Developer Resources

Autocomplete stop

Get's a list of stops based on a query for use with autocompleting in applications.

URL

https://search.mtd.org/v1.0.0/stop/suggest/{query}

Remarks

The service was designed to be lightweight and fast so we opted to use a concise naming convention to save a bit of data. Additionally we are only providing the service as a RESTfull interface; Unlike our API, no WS endpoint will be provided.

Parameters

query (required) the search query. This should be appended after the / in suggest.
For example, if your query is Pla, The URL would be: https://search.mtd.org/v1.0.0/stop/suggest/Pla

Response

queryHighlight An array of objects to use for query highlighting search results. Each object represents a word. And contains a highlightPart and a noHighlightPart
highlightPart The part of the word in the queryHighlight that matches the input query and should be highlighted.
noHighlightPart The part of the word in the queryHighlight that does not match the input query and should not be highlighted.
result The stop search result
id The ID of the stop. This can be used with the rest of the API.
smsCode The SMS code for the stop. Note that searching by SMS code is supported.
name The name of the stop.
city The city in which the stop is located.
isParent If the stop is a parent stop or a boarding point.
rank An approximation of the popularity of a stop. All things being equal, the search service tries to return more popular stops first.
score The search score of a stop. Because we are using prefix matching, this will almost always be one.

Sample