New API is in preview! Subject to change. Send feedback to contact@mtd.dev

Sending Requests

Introduction to HTTP

HTTP is a protocol for fetching resources through the internet. HTTP is the foundation of how data moves across the internet. Every webpage you visit, every image you view, and every video you watch is fetched by an HTTP request. The same goes for our API.

There are many ways to make HTTP requests, whether through your web browser's URL bar, code, or a user interface like Postman.

Path and Query Parameters

Some endpoints take parameters that will shape the response object.

Path parameters are hierarchical elements of the resource path, and are usually mandatory.

Query parameters come after a ? and filter or sort the results, and are usually optional.

Get a stop's departures is a good example, since it has both. The stop ID is the path parameter that identifies the resource, whereas the optional query parameters filter the departures.

api.mtd.dev/stops/IT:1/departures?routes=red&time=60Path ParameterFirst Query ParameterSecond Query Parameter

Don't forget that API Key!

See Authentication for how to authenticate your requests.