Step 1: Create Google Cloud Project
1. Go to Google Cloud
2. Create a new project
3. Enable the API:
○ YouTube Data API v3
4. Generate an API Key
5. Store the API key securely (.env file or variable)
Step 2: Select a YouTube Channel
1. Choose one YouTube channel
2. Ensure:
○ 100–350 videos
○ Diverse content
○ Not repetitive (avoid stock updates, daily news summaries, etc.)
Step 3: Understand the Search Endpoint
Study the endpoint:
[Link]
Understand these parameters:
● channelId
● part → snippet, id
● maxResults → up to 50
● order → date
● pageToken → for pagination
Step 4: Write Basic API Request Script
Write a Python script to:
1. Send API request
2. Pass required parameters
3. Retrieve JSON response
4. Print sample output
Step 5: Implement Pagination Logic
Since maxResults = 50:
Interns must:
1. Use nextPageToken
2. Loop until no pages remain
3. Collect videos from all pages
4. Avoid duplicate entries
Step 6: Extract Required Fields
From each video extract only:
● video_id
● title
● published_date
Create a clean structured list/dictionary.
Step 7: Convert Data to DataFrame
Using Pandas or Polars:
1. Convert extracted data into DataFrame
2. Name columns clearly:
○ video_id
○ title
○ publish_date
Step 8: Basic Data Validation
Interns must:
1. Check total number of rows
2. Check duplicate video IDs
3. Verify no null values
4. Print dataset shape
Step 9: Save Dataset
Save dataset as:
● CSV (mandatory)
● Optional: Parquet
Example:
raw_metadata.csv