The YouTube Data API v3 at https://www.googleapis.com/youtube/v3 searches and reads public videos, channels, and playlists with an API key. part chooses which groups of fields come back.
Create an API key in the Google Cloud console and enable the YouTube Data API v3 for the project. It goes in the query string as key. In the examples it's written {{YOUTUBE_API_KEY}}. Each call costs quota units; search is the expensive one.
Full reference: https://developers.google.com/youtube/v3/docs
curl "https://www.googleapis.com/youtube/v3/search?part=snippet&q=curl%20tutorial&type=video&maxResults=5&key={{YOUTUBE_API_KEY}}"
curl "https://www.googleapis.com/youtube/v3/videos?part=snippet,statistics&id=dQw4w9WgXcQ&key={{YOUTUBE_API_KEY}}"
curl "https://www.googleapis.com/youtube/v3/channels?part=snippet,statistics&forHandle=@YouTube&key={{YOUTUBE_API_KEY}}"