> ## 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.

# Embeds

> Put a live route, ride, profile, explored map or city safety map on any page: an iframe, a pasted link, or a still image

## Overview

Six kinds of page can be embedded, each as a live map or view that updates on its own:

| Page | What the embed shows |
| - | - |
| A planned route | The route coloured by safety, with its summary and a link into the planner |
| A ride or event page | The ride's route, stops and details |
| A rider's profile | The public profile in the rider's theme |
| A rider's explored map | The streets the rider has ridden, as a heatmap |
| A city or London borough | The live safe cycling map, with the safety layers |
| An unlisted ride from ride history | The ridden line, stats and photos |

No API key or account is needed. Routes are computed when the page loads, so they always reflect the current road network, including closures and rider reports. Routes departing after dark render on the night map, with lit streets glowing along the route.

The quickest way to get an embed is the builder: "Embed on your site" in the share menu of any route, ride, profile or explore page, in our apps and on the web. It lets you pick the layers, theme, base map and size, shows a live preview, and hands over the right snippet for where it is going: an HTML snippet, the page's URL for tools that unfurl links and for a bio (it carries your display options, so the unfurled map matches the preview), a link for Notion, or a still image for email, which you can also download. Everything below is what the builder produces, for when you want to write it yourself.

[SuperSafe cycling route across London](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)

A live embed: a SuperSafe route from Bloomsbury to the South Bank, routed for right now.

## Embed code

Point the iframe at `https://cyclemate.club/embed/route` with the parameters below in the query string. URL-encode display names.

```html theme={null}
<iframe
  src="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"
  width="100%"
  height="450"
  frameborder="0"
  scrolling="no"
  loading="lazy"
  title="SuperSafe cycling route"
  style="border-radius:12px;border:none;"></iframe>
```

The map fills whatever size the iframe is given. A height of 450 pixels works well for a full-width embed; the summary sits over the bottom of the map at any size.

The other pages take no route parameters, only the display options below:

| Embed | URL |
| - | - |
| Ride or event | `https://cyclemate.club/embed/event/<alias>` |
| Profile | `https://cyclemate.club/embed/users/<slug>` |
| Explored map | `https://cyclemate.club/embed/users/<slug>/rides` |
| City | `https://cyclemate.club/embed/explore/<city>` with `london`, `new-york-city`, `los-angeles` or `san-francisco` |
| London borough | `https://cyclemate.club/embed/explore/london/<borough>`, for example `hackney` |
| Unlisted ride | `https://cyclemate.club/embed/ride/<id>`, from the ride's own share menu |

A profile embed under 200 pixels tall shows the rider's hero row alone. A profile or explored map shows exactly what a logged-out visitor sees on the rider's page: sections the rider keeps private are absent, and a private explored map renders an empty frame that says so.

## URL parameters

A waypoint travels as a trio: longitude, latitude, and a display name. A waypoint missing any of the three is ignored. Coordinates are read to 6 decimal places.

**origin\_lng** `number` *required*

Origin longitude.

**origin\_lat** `number` *required*

Origin latitude.

**origin\_name** `string` *required*

Origin display name, shown in the summary.

**dest\_lng** `number` *required*

Destination longitude.

**dest\_lat** `number` *required*

Destination latitude.

**dest\_name** `string` *required*

Destination display name, shown in the summary.

> [accordion] Optional parameters
>
> **stop1\_lng** `number`
>
> Up to eight intermediate stops, each its own trio: `stop1_lng`, `stop1_lat`, `stop1_name` through `stop8_*`. Stops are visited in slot order between the origin and the destination.
>
> **supersafe** `string`
>
> Set `0` to show the direct route instead of the SuperSafe one. Any other value, or omitting the parameter, keeps SuperSafe routing.
>
> **nighttime** `string`
>
> Which variant a night route opens on: `1` the one routed for well-lit streets, `0` the daytime one. Only meaningful when the route is computed at night, when both are available; by day it is ignored.
>
> **departure\_time** `string` (default: now)
>
> Planned departure as `"YYYY-MM-DDTHH:mm"` with no timezone offset, interpreted in the route city's timezone. Determines night routing: after dark the embed renders the night map and the route prefers lit streets. Omit to route for now.
>
> **parking** `string`
>
> Navigate-to-parking mode: `regular` (cycle racks and stands) or `ebike` (designated rental e-bike bays). The route ends at the nearest qualifying spot near the destination, with a short walk to finish the trip.
>
> **operator** `string` (default: lime)
>
> Rental e-bike operator (London): `lime` or `forest`. Only meaningful with `parking=ebike`; restricts the bay search to boroughs the operator serves.

## Display options

Every embed URL also takes these. A URL with none of them shows the page's defaults, so an embed made before an option existed keeps its look.

**layers** `string`

A comma-separated list of everything that is on. Map layers, on routes, rides and explore maps: `cycleways`, `ltns`, `quiet`, `moderate`, `busy`, `shared`, `collisions`, `reports`, `roadworks`, `lighting`, `infrastructure`. The page's own toggles: `safety` (the safety colours on the line) and `info` (the summary) on a route or ride, plus `photos` on an unlisted ride. Routes and rides default to `safety,info`, explore maps to `cycleways,ltns,collisions`. Present but empty turns everything off. Profiles and explored maps take no layers.

**theme** `string` (default: auto)

`auto` follows the viewer's colour scheme; `light` or `dark` fixes it.

**base** `string` (default: cyclemate)

The base map: `cyclemate`, `standard` or `satellite`.

**size** `string` (default: md)

The preset the embed is sized for: `sm` (520 × 340), `md` (680 × 440), `lg` (880 × 570) or `resp` (full width, 440 tall). Set the iframe's `width` and `height` to match.

The `lighting` layer switches the map to its night style, as it does in the app. Unknown values are ignored rather than failing the embed.

## Paste a link

Platforms that unfurl pasted links can embed a Cyclemate page without any markup. Every embeddable page carries an oEmbed discovery tag, and the endpoint below answers for the page.

```
GET https://cyclemate.club/api/oembed?url=<page>&format=json
```

**url** `string` *required*

The page to embed: a planner route (`/search?…`), a ride or event (`/event/<alias>`), a rider profile (`/users/<slug>`), a rider's explored map (`/users/<slug>/rides`), or an explore map (`/explore/<city>`, `/explore/london/<borough>`). An explore map URL that carries a planned route (`/explore/london?origin_lng=…&dest_name=…`) embeds as that route. Any other page answers 404.

The display options above (`layers`, `theme`, `base`, `size`) may ride on this URL's query, and the returned frame is drawn with them: `https://cyclemate.club/explore/london?theme=dark&base=satellite` unfurls as a dark satellite map. That is what the builder's Embed URL carries. A URL without them unfurls with the page's defaults.

> [accordion] Optional parameters
>
> **maxwidth** `integer`
>
> The widest frame the platform can show, in pixels. The response picks the `size` on the page URL when that fits, otherwise the largest of 520, 680 and 880 that fits; 680 when nothing is asked for.
>
> **maxheight** `integer`
>
> The tallest frame the platform can show, in pixels.
>
> **format** `string`
>
> Only `json`. Any other value answers 501.

The response is a `rich` oEmbed object: `html` holds the iframe, `width` and `height` its size, `provider_url` the page itself, and a `thumbnail_url` (1200 × 630) for route and explore pages and for a rider whose explored map is public.

```json theme={null}
{
  "version": "1.0",
  "type": "rich",
  "provider_name": "Cyclemate",
  "provider_url": "https://cyclemate.club/explore/london/hackney",
  "title": "Safe cycling map of Hackney",
  "html": "<iframe src=\"https://cyclemate.club/embed/explore/london/hackney\" width=\"680\" height=\"440\" frameborder=\"0\" scrolling=\"no\" style=\"border-radius:12px;border:none;max-width:100%;\"></iframe>",
  "width": 680,
  "height": 440,
  "cache_age": 3600,
  "thumbnail_url": "https://cyclemate.club/explore/og?city=london&area=hackney&v=2",
  "thumbnail_width": 1200,
  "thumbnail_height": 630
}
```

Most publishing tools turn a pasted link into an embed one of two ways. Some read the page's discovery tag themselves and call the endpoint: Ghost, Squarespace, Notion's link previews, self-hosted WordPress. Most content systems, including Substack, Medium, Reddit and the newsroom CMSs, go through an embed service, Embedly or Iframely, which keeps its own list of providers and renders the map for a listed site and a link card for an unlisted one. We are listed with both or in review; until a listing lands, a link on that platform shows as a card with the route's picture.

Platform notes:

* **Notion**: type `/embed` and paste the embed URL from the table above, or the builder's Notion link.
* **Ghost, Squarespace and other tools that read the discovery tag**: paste the page link on its own line.
* **WordPress**: a pasted link renders the map inside a sandbox that disables the links in it. Use the builder's HTML snippet in a Custom HTML block instead, which also keeps the attribution link.
* **Email, newsletters and LinkedIn articles**: no frame renders there. Use a still image, below.

## Still images

Every map page has a 1200 × 630 picture of itself, the image a shared link previews with. The builder's "Static image" destination copies it as an image linking to the page, sized to 600 pixels wide. Keep that link: the image carries the Cyclemate wordmark, and the link around it to the page it pictures is its attribution, the same condition the logo meets in a frame.

| Page | Image |
| - | - |
| A planned route | `https://cyclemate.club/search/og?<the route's parameters>`: the route as currently computed, on a light map |
| A city or borough | `https://cyclemate.club/explore/og?city=<city>&area=<borough>` (`area` only for a London borough) |
| A rider's explored map | `https://cyclemate.club/users/og?slug=<slug>`, available only while the rider's map is public |

A route image is cached for up to a month, so it can trail the live page after the road network changes. Rides and profiles use their own cover photo.

## Attribution

Every embed carries the Cyclemate logo, linking to the same page on cyclemate.club. The builder's page HTML draws that logo in your page as a plain link beside the frame; a still image carries the wordmark and is wrapped in a link to its page. Keeping the logo visible and the link in place, pointing where it was given, is a condition of embedding, set out in the [API terms](https://cyclemate.club/terms#api-terms).

## Good to know

* The safety colours on the route line are the same four classes described in the [routing overview](https://docs.cyclemate.club/api-reference/routing/overview.md).
* Routes are computed from each viewer's browser and rate limited per network, so an unusually high-traffic page may see the map wait briefly before loading.
* To open a route in our apps instead of embedding it, see [Deep link to routing](https://docs.cyclemate.club/api-reference/routing/deep-links.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.