oEmbed API

Base path: /api/oembed

A proxy that resolves an external media URL into oEmbed data, so blocks can embed content from providers such as YouTube, Vimeo, Spotify, Sketchfab, Wikimedia, and Google Drive/Photos. Running it server-side keeps provider requests off the client and lets results be cached.

Endpoint

  • GET /api/oembed?url=<encoded-url> — resolve the given URL.
    • Query: url (required) — the external media URL to resolve, URL-encoded.
    • Response: the provider’s oEmbed data (title, provider, thumbnail, embed HTML, and so on).

Errors

  • 400 Bad Request — the url parameter is missing or is not a parseable URL.

Caching

Responses are cached in the cache/KV service with a configurable TTL (five minutes by default), keyed by the requested URL, so repeated lookups of the same media are served without hitting the provider again.