Getting the data
YouTube provides very powerful APIs that can be used for interacting with videos or just getting information about them. The various numbers of APIs, endpoints, and parameters are a good selection of tools for creating applications and for getting informative data for further analysis. To follow the title of the chapter, we will be interested in the data that can bring valuable information about brands or products.
The Google documentation regarding the YouTube API is really large; hence, we will focus only on some parts of it to get started with this API, easily and rapidly. For our objective, we will use the YouTube Data API.
We are going to make authorized HTTP requests to the YouTube API www.googleapis.com/youtube/v3 for retrieving data.
The endpoint has several resources (methods). For our case, the methods /videos
and /commentThreads
will return sufficient amounts of data.
Like other APIs, the YouTube API requires an authorization. Basically, when the user requests some...