If I have a YouTube video URL, is there any way to use PHP and cURL to get the associated thumbnail from the YouTube API?
YouTube provides us the four generated images for every video through the Data API (v3), for example,
https://i.ytimg.com/vi/V_zwalcR8DU/maxresdefault.jpg
https://i.ytimg.com/vi/V_zwalcR8DU/sddefault.jpg
https://i.ytimg.com/vi/V_zwalcR8DU/hqdefault.jpg
https://i.ytimg.com/vi/V_zwalcR8DU/mqdefault.jpg
As per this, you need to phrase your URL like this -
www.googleapis.com/youtube/v3/videos?part=snippet&id=`yourVideoId`&key=`yourApiKey`
Now change your video ID and your API key to the your respective video-id and api-key and its response will be a JSON output providing you the four links in the thumbnails of snippet variable (if all are available).