Transport for Los Angeles, US API
Overview
The LA Metro API provides real-time positions of Metro buses and trains across Los Angeles, along with route and schedule data. It requires no API key, so you can start making requests immediately without any registration. This is a great API for learning how to work with real-time vehicle tracking and public transit data.
Beginner Tip
Begin by fetching all active vehicle positions from the /vehicles endpoint to see buses and trains moving in real time. Combine latitude and longitude values with a mapping library like Leaflet to build a live transit map.
Available Data
Example Response
{
"route": "Line 1",
"origin": "Station A",
"destination": "Station B",
"departure": "08:30",
"arrival": "09:15",
"status": "On Time",
"delays_min": 0
} Field Reference
id Unique identifier of the vehicle, typically the bus or train number. latitude Current latitude of the vehicle, updated in near-real-time as the vehicle moves. longitude Current longitude of the vehicle. heading Direction the vehicle is traveling in degrees (0 = north, 90 = east, etc.). route_id The route the vehicle is currently operating on, such as 720 or 805. seconds_since_report How many seconds have passed since the vehicle last reported its position; lower values mean fresher data. Implementation Example
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://developer.metro.net/api/";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →ADS-B Exchange
⭐ Beginner's PickADS-B Exchange is a community-driven API that provides real-time and historical position data for aircraft around the world.
airportsapi
⭐ Beginner's PickThe airportsapi lets you look up airport names and official website URLs by providing an ICAO code.
AviationAPI
AviationAPI provides programmatic access to faa aeronautical charts and publications, airport information, and airport weather via REST API.
BC Ferries
⭐ Beginner's PickThe BC Ferries API is a free, open API providing real-time sailing schedules, capacity, and current conditions for BC Ferries routes in British Columbia, Canada.
Community Transit
⭐ Beginner's PickCommunity Transit (Transitland) is a free, open API that aggregates public transit data from hundreds of agencies worldwide including routes, stops, and schedules.