OEmbed

Implements the oEmbed specification (oembed.com) for bunny.net video embed URLs, allowing third-party sites and tools to auto-generate an embeddable player for a pasted video link. url must be a bunny.net player URL for an existing video — either the legacy player (e.g. "https://iframe.mediadelivery.net/embed/{libraryId}/{videoId}") or the new player (e.g. "https://player.mediadelivery.net/embed/{libraryId}/{videoId}") — not an arbitrary link. Only the library ID and video ID segments are read, so /play/ URLs are accepted as well as /embed/ ones. For private libraries, the request must satisfy the library's referer restrictions and, separately, a valid token and expires pair if token authentication is enabled — one does not substitute for the other.

get/OEmbed

Request

Query parameters

urlstring nullable

The bunny.net player URL of the video to generate oEmbed data for (legacy iframe.mediadelivery.net or new player.mediadelivery.net player). Both /embed/ and /play/ paths are accepted.

maxWidthinteger nullable

Maximum width in pixels for the embedded player; the player is scaled down to fit while preserving aspect ratio.

maxHeightinteger nullable

Maximum height in pixels for the embedded player; the player is scaled down to fit while preserving aspect ratio.

tokenstring nullable

Signed access token, required when the video library has token authentication enabled. An allowed referer is checked separately and does not exempt the request from this requirement.

expiresinteger

Unix timestamp (seconds) the token is valid until, required when the video library has token authentication enabled.

Response

The oEmbed data for the video

versionstring nullable

The oEmbed spec version implemented by this response. Always "1.0".

titlestring nullable

The title of the video.

typestring nullable

The oEmbed resource type. Always "video" for this endpoint.

thumbnail_urlstring nullable

The CDN URL of the video's thumbnail image.

thumbnail_widthinteger nullable

Width in pixels of the thumbnail image. Omitted for custom-uploaded thumbnails, whose dimensions are not known.

thumbnail_heightinteger nullable

Height in pixels of the thumbnail image. Omitted for custom-uploaded thumbnails, whose dimensions are not known.

widthinteger

Width in pixels of the embedded player iframe, scaled to fit within maxWidth/maxHeight while preserving the video's aspect ratio.

heightinteger

Height in pixels of the embedded player iframe, scaled to fit within maxWidth/maxHeight while preserving the video's aspect ratio.

htmlstring nullable

The HTML <iframe> markup required to embed the video player.

provider_namestring nullable

The name of the embed provider. Always "bunny.net".

provider_urlstring nullable

The URL of the embed provider. Always "https://bunny.net/".

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status