Open Taxi Data

API docs

Get the latest reported locations of taxis available for hire. The API returns GeoJSON, supports browser requests, and requires no API key.

Quick start

GET /v1/taxis returns points from all configured feeds. Add bbox=west,south,east,north to request just the map area you need.

curl 'https://opentaxidata.org/v1/taxis'

curl 'https://opentaxidata.org/v1/taxis?bbox=113.81,22.14,114.45,22.58'

Try a live request for Hong Kong, Singapore, or all coverage.

Use WGS 84 longitude and latitude in decimal degrees. West must be less than east and south less than north. Split antimeridian-crossing views into two requests.

Read the response

The body is an application/geo+json FeatureCollection with features and sources. Each feature is a Point with coordinates in [longitude, latitude] order. Match properties.source to sources[].id for the feed name, coverage, timestamps, and attribution.

{
  "type": "Feature",
  "id": "hk-amigo:114.17,22.31",
  "geometry": { "type": "Point", "coordinates": [114.17, 22.31] },
  "properties": {
    "source": "hk-amigo",
    "observed_at": 1796230800,
    "expires_at": 1796230980,
    "taxi_type": "O",
    "passenger_capacity": 4,
    "motion_id": "example-motion-token"
  }
}

This example shows the optional fields for a Hong Kong point. Singapore points carry the source ID and use the feed timestamp.

id
Identifies a location within a feed. It changes when the coordinates change.
observed_at and expires_at
Unix seconds. Use the point values when present and the corresponding source values otherwise. Remove the point by the earlier of the point and source expiries.
taxi_type and passenger_capacity
Optional category and seat count from the publisher. Categories are O for ordinary, P for premium, and W for wheelchair-accessible.
motion_id
Optional opaque token for matching nearby snapshots from the same feed. It rotates at least every five minutes and can change sooner between server instances. Treat a missing token or a changed token as a new point. Raw fleet IDs are kept out of the response.

Render fresh points

Poll every 30–60 seconds. Provider update schedules and caching determine when coordinates actually change. Animate between reported positions only when their motion tokens match. The live map uses a short transition between those positions.

const url = "https://opentaxidata.org/v1/taxis";

async function loadTaxis() {
  const response = await fetch(url);
  if (!response.ok) throw new Error(`Taxi API returned ${response.status}`);
  const { features, sources } = await response.json();
  const now = Date.now() / 1000;
  const sourcesById = new Map(sources.map(source => [source.id, source]));

  const currentPoints = features.filter(({ properties }) => {
    const source = sourcesById.get(properties.source);
    return source?.expires_at > now &&
      (properties.expires_at ?? Infinity) > now;
  });

  return { type: "FeatureCollection", features: currentPoints, sources };
}

loadTaxis().then(console.log).catch(console.error);

Repeat the expiry check between requests when keeping the last snapshot on screen. Use sources[].attribution and license_url in your app.

Coverage and errors

  • fresh means the feed supplied a usable snapshot. An empty features array can mean there are no reported available taxis in the requested area.
  • stale means the last usable snapshot is still within its lifetime after an upstream failure.
  • unavailable means there is no usable snapshot. A source absent from sources has no registered coverage intersecting the request.

Errors return JSON with an error field. 400 means the bounding box is invalid, 405 means you should use GET, and 413 means you should request a smaller area.

Coverage comes from Singapore LTA and the Amigo and Joie fleets in Hong Kong. See the feed submission guide to add coverage.