Washington Metro transport API
API for Washington Metro transport by WMATA, offering real-time data for the transit system.
import requests
url = "https://api.wmata.com/metro/stations"
headers = {
"Ocp-Apim-Subscription-Key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
response.raise_for_status()
data = response.json()
print(data)Last 50 checks (10 min intervals)