BYTETOOLS

YouTube oEmbed API

Free YouTube oEmbed endpoint with no API key: video title, author, thumbnail and embed HTML from any video URL. No quota, unlike the Data API. Tested.

No API key requiredHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-20

What is the YouTube oEmbed API?

The YouTube oEmbed endpoint is a free, key-free way to get a video's title, author, thumbnail and ready-to-use embed HTML from its URL — without the API key and quota requirements of the YouTube Data API.

The YouTube Data API requires a Google Cloud project, an API key and a daily quota that is easy to exhaust. For the common case of showing a video's title and thumbnail, the oEmbed endpoint does the job with none of that.

The tradeoff is scope: oEmbed gives you title, author, dimensions, thumbnail and embed HTML, and nothing else. View counts, descriptions, durations and comments all still require the Data API with a key.

Quick facts

Base URL
https://www.youtube.com/oembed
Authentication
No API key or Google Cloud project required.
Rate limit
No published quota, unlike the YouTube Data API.
Pricing
Free.
CORS
Not enabled — call it from your server
Official docs
Read the docs

How to use the YouTube oEmbed API

Every request below was executed against the live API on 2026-08-20, and the response shown is the real body it returned — not an illustration.

1. Fetch video metadata from a URL

GET https://www.youtube.com/oembed?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ&format=json

curl
curl 'https://www.youtube.com/oembed?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ&format=json'
JavaScript (fetch)
const res = await fetch("https://www.youtube.com/oembed?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ&format=json");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://www.youtube.com/oembed?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ&format=json", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
  "author_name": "Rick Astley",
  "author_url": "https://www.youtube.com/@RickAstleyYT",
  "type": "video",
  "height": 113,
  "width": 200,
  "version": "1.0",
  "provider_name": "YouTube",
  "provider_url": "https://www.youtube.com/",
  "thumbnail_height": 360,
  "thumbnail_width": 480,
  "thumbnail_url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg",
  "html": "<iframe width=\"200\" height=\"113\" src=\"https://www.youtube.com/embed/dQw4w9WgXcQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen title=\"Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)\"></iframe>"
}

Parameters

ParameterTypeRequiredDescription
urlstringRequiredFull YouTube video URL, URL-encoded. https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ
formatstringRequiredjson or xml. json
maxwidth / maxheightintegerOptionalConstrain the returned embed dimensions. 640

Response fields

titlestring
Video title.
author_namestring
Channel name.
author_urlstring
Channel URL.
thumbnail_urlstring
Thumbnail image URL.
htmlstring
Ready-to-insert iframe embed code.
width / heightinteger
Embed dimensions.

What you can build with the YouTube oEmbed API

  • Render video preview cards from pasted YouTube links
  • Get titles and thumbnails without a Data API key or quota
  • Build link unfurling for a CMS or chat application
  • Embed videos with correct aspect ratios automatically

Common errors and how to fix them

404

The video is private, deleted, or embedding is disabled.

Fix: Handle this case — a 404 here usually means the video is unavailable rather than the URL being malformed.

401

Age-restricted or region-blocked video.

Fix: oEmbed cannot return data for restricted videos; fall back to a plain link.

Need view counts or duration

oEmbed does not provide them.

Fix: Those require the YouTube Data API with a key and quota.

YouTube oEmbed API — frequently asked questions

Do I need a YouTube API key to get video titles?

Not for basic metadata. The oEmbed endpoint returns title, author, thumbnail and embed HTML with no key and no quota — only richer data needs the Data API.

What data does YouTube oEmbed provide?

Title, channel name and URL, thumbnail, embed HTML and dimensions. It does not provide view counts, descriptions, durations or comments.

Why does a valid video return 404?

The video is private, deleted, or the uploader has disabled embedding. oEmbed returns 404 in all those cases.

Can I use it for Shorts and youtu.be links?

Yes, both short and standard URL formats work — URL-encode the full video URL in the `url` parameter.

Tools that pair with this API

YouTube oEmbed is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-20; always check the official documentation before relying on this API in production, as terms and limits can change.