curl --request GET \
--url https://video.bunnycdn.com/OEmbedimport requests
url = "https://video.bunnycdn.com/OEmbed"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://video.bunnycdn.com/OEmbed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://video.bunnycdn.com/OEmbed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://video.bunnycdn.com/OEmbed"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://video.bunnycdn.com/OEmbed")
.asString();require 'uri'
require 'net/http'
url = URI("https://video.bunnycdn.com/OEmbed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"version": "<string>",
"title": "<string>",
"type": "<string>",
"thumbnail_url": "<string>",
"thumbnail_width": 123,
"thumbnail_height": 123,
"width": 123,
"height": 123,
"html": "<string>",
"provider_name": "<string>",
"provider_url": "<string>"
}Get oEmbed data
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.
curl --request GET \
--url https://video.bunnycdn.com/OEmbedimport requests
url = "https://video.bunnycdn.com/OEmbed"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://video.bunnycdn.com/OEmbed', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://video.bunnycdn.com/OEmbed",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://video.bunnycdn.com/OEmbed"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://video.bunnycdn.com/OEmbed")
.asString();require 'uri'
require 'net/http'
url = URI("https://video.bunnycdn.com/OEmbed")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"version": "<string>",
"title": "<string>",
"type": "<string>",
"thumbnail_url": "<string>",
"thumbnail_width": 123,
"thumbnail_height": 123,
"width": 123,
"height": 123,
"html": "<string>",
"provider_name": "<string>",
"provider_url": "<string>"
}Query Parameters
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.
Maximum width in pixels for the embedded player; the player is scaled down to fit while preserving aspect ratio.
Maximum height in pixels for the embedded player; the player is scaled down to fit while preserving aspect ratio.
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.
Unix timestamp (seconds) the token is valid until, required when the video library has token authentication enabled.
Response
The oEmbed data for the video
The oEmbed spec version implemented by this response. Always "1.0".
The title of the video.
The oEmbed resource type. Always "video" for this endpoint.
The CDN URL of the video's thumbnail image.
Width in pixels of the thumbnail image. Omitted for custom-uploaded thumbnails, whose dimensions are not known.
Height in pixels of the thumbnail image. Omitted for custom-uploaded thumbnails, whose dimensions are not known.
Width in pixels of the embedded player iframe, scaled to fit within maxWidth/maxHeight while preserving the video's aspect ratio.
Height in pixels of the embedded player iframe, scaled to fit within maxWidth/maxHeight while preserving the video's aspect ratio.
The HTML markup required to embed the video player.
The name of the embed provider. Always "bunny.net".
The URL of the embed provider. Always "https://bunny.net/".