> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cyclemate.club/llms.txt
> Use this file to discover all available pages before exploring further.

# Safe cycling directions

> Cycling-first routing along protected lanes and quiet streets, colour-coded by safety

export const SafetyColorKey = () => <div className="not-prose" style={{
  margin: '28px 0'
}}>
    <div className="rounded-2xl border border-zinc-200 dark:border-zinc-700 px-4 py-2">
      <div style={{
  fontSize: 11,
  fontWeight: 700,
  letterSpacing: 1,
  opacity: 0.55,
  marginTop: 12
}}>SAFETY COLOURS</div>
      {[{
  color: '#0088FF',
  label: 'City-managed route',
  note: 'A signed, city-maintained cycle route.'
}, {
  color: '#1DB954',
  label: 'Quiet',
  note: 'Protected lanes, bike paths, and low-traffic streets.'
}, {
  color: '#FFA500',
  label: 'Busy',
  note: 'Carries traffic. Used when it meaningfully shortens the route.'
}, {
  color: '#FF3B30',
  label: 'Very busy',
  note: 'Avoided unless there is no way around it.'
}].map(row => <div key={row.label} style={{
  display: 'flex',
  alignItems: 'center',
  gap: 12,
  padding: '11px 2px'
}}>
          <span style={{
  flexShrink: 0,
  width: 26,
  height: 6,
  borderRadius: 999,
  background: row.color
}} />
          <span style={{
  flexShrink: 0,
  fontSize: 14,
  fontWeight: 700,
  width: 140
}}>{row.label}</span>
          <span style={{
  fontSize: 13.5,
  opacity: 0.7,
  lineHeight: 1.5
}}>{row.note}</span>
        </div>)}
    </div>
  </div>;


// Both tabs pin an explicit departure_time. Leaving the day tab on "now"
// would render a night route to anyone reading this after dark in London,
// making the two tabs identical.
export const LondonRouteEmbed = () => {
  const [mode, setMode] = useState('day');
  const brand = '#537AEF';
  const base = 'https://cyclemate.club/embed/route?origin_lng=-0.126300&origin_lat=51.520600&origin_name=Bloomsbury&dest_lng=-0.114500&dest_lat=51.504500&dest_name=South%20Bank';
  const src = base + (mode === 'day' ? '&departure_time=2026-08-05T13:00' : '&departure_time=2026-08-05T23:30');
  const tabStyle = active => ({
    padding: '4px 12px',
    borderRadius: 999,
    fontSize: 13,
    fontWeight: 600,
    cursor: 'pointer',
    border: '1px solid ' + (active ? brand : 'rgba(148, 163, 184, 0.5)'),
    background: active ? brand : 'transparent',
    color: active ? '#fff' : 'inherit'
  });
  const caption = {
    fontSize: 14.5,
    lineHeight: 1.6,
    margin: '20px 0 0'
  };
  return <div className="not-prose" style={{
    margin: '32px 0'
  }}>
      <div style={{
    display: 'flex',
    gap: 6
  }}>
        <button style={tabStyle(mode === 'day')} onClick={() => setMode('day')}>Daytime</button>
        <button style={tabStyle(mode === 'night')} onClick={() => setMode('night')}>After dark</button>
      </div>
      <div style={caption}>
        {mode === 'day' ? 'A SuperSafe route across central London, Bloomsbury to the South Bank, departing at 13:00. Each segment is coloured by the safety of the road it follows.' : 'The same two points departing at 23:30. Routing switches to the night model: it prefers streets that are actually lit, and the lit stretches glow warm on the map.'}
      </div>
      <iframe key={mode} src={src} title={mode === 'day' ? 'SuperSafe cycling route across London' : 'SuperSafe cycling route across London, routed for after dark'} loading="lazy" scrolling="no" style={{
    width: '100%',
    height: 450,
    border: '1px solid rgba(148, 163, 184, 0.4)',
    borderRadius: 16,
    marginTop: 16
  }} />
    </div>;
};


## Overview

We give cycling-first directions along protected lanes and quiet streets, with safety colour-coding so you only cross major roads at lights.

We build a routing model for every city. Every road in it is rated for cycling safety, and routes are colour-coded by that rating. Requests that set `supersafe` route on this model rather than taking the shortest line: major crossings land at traffic lights and four-way stops, and busy roads are used only where they genuinely earn their place.

The model is not static. City data is refreshed daily, and rider reports feed back into routing in real time. A road closed this morning is routed around this afternoon. See [Reports](/api-reference/reports/overview) for how observations enter that loop.

<LondonRouteEmbed />

## Safety colours

Every cycling segment carries one of four classes. They are what the colours on our maps and route lines mean, and what the routing model is optimising over.

<SafetyColorKey />

SuperSafe routing prefers the first two, treats busy roads as a cost worth paying only for a real saving, and avoids very busy roads unless there is no alternative. Turning `supersafe` off gives you the direct route instead, which is free to take any of them.

Two of these are visible in the response. A step's `cycle_routes` is non-null when it follows a signed city route, which is what the blue class marks. A step's `lit` reports whether the road is lit, which is what night routing optimises for. The remaining distinction between quiet, busy, and very busy is applied when the route is computed and is not returned per step.

## Choosing an endpoint

[`POST /directions/`](/api-reference/routing/directions) is the one you want for a single route between waypoints, with turn-by-turn steps, voice cues, and banner instructions. Set `supersafe` to route on the safety model, and `departure_time` to route for a particular time of day.

[`POST /multi-modal/`](/api-reference/routing/multimodal) returns several ways to make the same trip, folding in live bike-share availability: a personal bike route alongside docked, e-bike, and dockless options.

[`POST /explain-supersafe/`](/api-reference/routing/explain-supersafe) returns one sentence saying why the SuperSafe route differs from the direct one, for example `"Takes the C13 cycleway and avoids moderately busy Goldsmiths' Row"`. Use it to caption a route you are already showing.

## Coverage

SuperSafe routing is available in New York City, Los Angeles, the SF Bay Area, Chicago, and London. Outside these cities a routing request returns `400` with `code: CROSS_CITY_ROUTE`.

Night routing applies in London and New York City. Elsewhere `metadata.nighttime` is always `false`, whatever the departure time, because the lit-street data that makes it meaningful is not in place yet.

Street lighting data is © OpenStreetMap contributors, and coverage is approximate.
