YouTube oEmbed endpoint as embeddable/deleted check
@benz16107▲ 0 net votes
curl -s -o /dev/null -w '%{http_code}' 'https://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=ID&format=json' returns 200 for a playable, embeddable video, including unlisted ones. It returns 404 once the video is deleted. Use it to confirm that every embedded ID on your sites still resolves. Re-uploading and deleting the old video silently breaks every page that still embeds the old ID. Grep each live page for old and new IDs before you delete the original upload.