Start with the video ID
On a watch page, the video ID follows v=. A Shorts or youtu.be link puts the ID in the path. Reuse the same ID when comparing the watch page, oEmbed response and API record so that a playlist or channel link does not send you to a different item.
Read the oEmbed response
For a public, embeddable video, replace VIDEO_ID in this example and open the address in a browser. The URL parameter contains the encoded watch address.
https://www.youtube.com/oembed?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVIDEO_ID&format=json Read title, author_name, author_url and thumbnail_url. Use the returned thumbnail address to see which image YouTube supplies. A private, removed or embedding-restricted video may produce an error.
Choose the fields you need
For a publication date or description, use the YouTube Data API’s videos.list endpoint with the snippet part. Statistics are separate. The Python walkthrough gives working request shapes and compares them with yt-dlp and oEmbed.