To collect data from YouTube, we need to be clear about what data we need. Let’s collect data about the trending videos on YouTube to analyze and find what makes a video trend on YouTube.
So, let’s start with data collection first. To collect data from YouTube, you need to set up an API. Here are the steps you can follow:
- Go to Google Cloud Console.
- Click on the project drop-down at the top, then “New Project”.
- Enter a project name and click “Create”.
- In the Google Cloud Console, navigate to “APIs & Services” > “Library”.
- Search for “YouTube Data API v3” and click on it.
- Click “Enable”.
- Go to “APIs & Services” > “Credentials”.
- Click “+ CREATE CREDENTIALS” and select “API key”.
- Copy the generated API key.