Transport for Auckland, New Zealand API

Free to Use Varies (check documentation)

Overview

Transport for Auckland (AT) provides real-time public transport data for New Zealand's largest city. You can access bus and train schedules, live vehicle positions, and service alerts through a RESTful API. It's a great starting point for building local transit apps or exploring GTFS-based transport data.

💡

Beginner Tip

Register for a free API key on the AT Developer Portal — most endpoints require an Ocp-Apim-Subscription-Key header. Start with the /gtfs/routes endpoint to list all routes before diving into real-time data.

Available Data

match scores and results
team standings
player statistics
schedule and fixtures
Use case: Integrate auckland transport data into web and mobile applications

Example Response

JSON Response
{
  "route": "Line 1",
  "origin": "Station A",
  "destination": "Station B",
  "departure": "08:30",
  "arrival": "09:15",
  "status": "On Time",
  "delays_min": 0
}

Field Reference

route_id Unique identifier for a transit route
route_short_name Short public-facing name of the route (e.g., "380")
route_long_name Full descriptive name of the route
route_type GTFS route type code (3 = bus, 2 = rail, etc.)
agency_id ID of the transport agency operating the route

Implementation Example

const url = "https://dev-portal.at.govt.nz/";
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

401 Unauthorized Missing or invalid Ocp-Apim-Subscription-Key header
Register at dev-portal.at.govt.nz and include your subscription key in the header
429 Too Many Requests Exceeded the rate limit for your subscription tier
Add delays between requests or upgrade to a higher subscription tier
Empty results array Querying a route or stop ID that does not exist
Use the /routes or /stops endpoints first to discover valid IDs

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 15/20
🔒 Security 15/15
🛠 Developer XP 15/20
✓ Reliability 7/15
Response Time 263ms

Fully tested on Apr 5, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Transportation
Difficulty Beginner
Verified: 2026-04-04

Similar APIs

View All →