Public Embed API

Embed live FootFast events on your own site.

FootFast exposes a simple public API for event discovery and iframe generation. You can fetch the live event catalog, pick an event source, and embed the player using either a raw URL or a ready-to-paste iframe snippet.

Step 1

Fetch the catalog

Use the public catalog endpoint to list live and upcoming events. Each event includes its public id, source list, and display metadata.

GET __ORIGIN__/api/public/catalog
Step 2

Choose a source

Events can expose multiple servers. Pass source or sourceId to target a specific server.

?source=server-uuid
Step 3

Embed it

Ask for JSON, a raw embed URL, or a finished iframe snippet. The player itself is hosted by FootFast and handles the secure playback flow for you.

?format=json|url|iframe

Endpoints

Endpoint Use
/api/public Machine-readable discovery document for the public API.
/api/public/catalog Public event catalog with event ids and server sources.
/api/public/embed/event/:eventId Returns embed data for one event.
/api/channel-logo/:token Public channel/logo proxy with open CORS.

Formats

Query Returns
?format=json JSON payload with embedUrl, iframeCode, and source metadata.
?format=url Plain text embed URL like /event/:id?source=....
?format=iframe Ready-to-paste iframe HTML snippet.

Quick Start

const origin = "__ORIGIN__";

const catalog = await fetch(`${origin}/api/public/catalog`).then((r) => r.json());
const event = catalog.events?.find(Boolean);
if (!event) throw new Error("No live events");

const embed = await fetch(
  `${origin}/api/public/embed/event/${encodeURIComponent(event.id)}?format=json`
).then((r) => r.json());

document.querySelector("#player").innerHTML = embed.iframeCode;

Raw URL Example

GET __ORIGIN__/api/public/embed/event/soccer-example?format=url

Replace soccer-example with a real event id from the catalog.

Iframe Example

GET __ORIGIN__/api/public/embed/event/soccer-example?format=iframe

The response body is already safe to paste into your page template.

Notes

  • Public FootFast embeds are currently event-only. Channel playback is not publicly embeddable on this worker yet.
  • Use the catalog response to discover the available event sources and labels such as Server 1 or Server 2.
  • All public API endpoints support cross-origin requests.
  • For branded player embeds, prefer the iframe URL or iframe snippet instead of trying to proxy playback yourself.