Skip to content

Bus Route and Stop Methods API

by wmata.com

API keyHTTPSTransportation
Open documentation ↗

Overview

Bus stop information, route and schedule data, and bus positions.

Bus Route and Stop Methods is a transportation API from wmata.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 12 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Base URL
http://api.wmata.com/Bus.svc
Version
1.0
Endpoints
12
Spec updated
2021-06-30

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "http://api.wmata.com/Bus.svc/BusPositions" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("http://api.wmata.com/Bus.svc/BusPositions", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "http://api.wmata.com/Bus.svc/BusPositions",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/BusPositionsXML - Bus Position
GET/RouteDetailsXML - Path Details
GET/RouteScheduleXML - Schedule
GET/RoutesXML - Routes
GET/StopScheduleXML - Schedule at Stop
GET/StopsXML - Stop Search
GET/json/jBusPositionsJSON - Bus Position
GET/json/jRouteDetailsJSON - Path Details
GET/json/jRouteScheduleJSON - Schedule
GET/json/jRoutesJSON - Routes
GET/json/jStopScheduleJSON - Schedule at Stop
GET/json/jStopsJSON - Stop Search

Questions

Does the Bus Route and Stop Methods API need an API key?

Yes. The Bus Route and Stop Methods API uses API key authentication; the documentation explains how to get credentials.

Does the Bus Route and Stop Methods API support HTTPS?

Yes, the Bus Route and Stop Methods API is served over HTTPS.

How many endpoints does the Bus Route and Stop Methods API have?

Its OpenAPI description lists 12 endpoints in version 1.0. All of them are shown on this page.

What are alternatives to the Bus Route and Stop Methods API?

Other Transportation APIs include airportsapi, Transport for London, England, Uber, Transport for Spain, Amadeus for Developers.

Compare alternatives →

Listed from APIs.guru (CC0).