Python Scripts, Research Tools for Obtaining Data About Youtube Videos

If you are researching a youtube video there are also several research tools available online for obtaining more information about the video. This post will describe how to do more in-depth research of a video.

The Research Tools

This next part will address some of the tools that are available for researching videos online.

What to Look For

If you are researching videos online there are 3 basic research goals to look for.

1 – Search for videos. There are two subreasons to search for videos. 1a – You are looking for information and it might be available on a video, but you don’t know what that video is. In this case you are looking for videos based on topic. 1b -You have already found a video you are very interested in and you want to analyze it but before you can do so, you need to find the original video. Copies of the video may be altered or edited, plus you might be interested in researching the source of the video. To find the original video you must search for other versions of the video online and find the one that was posted online first.

2 – Try to find out who posted the video. This is difficult and basically involves searching if the youtube account username is also used in social media accounts. Also, you can look up the first commenter, or maybe the first few commenters, that posted on the video because they might know the person that posted the video. You can search for social media accounts with their usernames and look into their common friends for potential candidates. Searching for the original video may reveal that it was originally posted on a social media account, which would obviously make the job easier.

3 – Analysis of the video content. This skill is largely outside the bounds of this blog but we identify tools and guides to for this kind of operation. If you are searching videos to see if they have information on a specific topic (like a person, company, legislation) you can now do a word search in youtube to see if anyone says something like mentioning a person, company, or legislation. This feature can help save a lot of time for a researcher going through different videos.

There is a detailed guide for how to anlyze content of different videos to do things like find the location or verify the video in the  Verification Handbook (

1 – Search for Videos

Searching for videos can be difficult. If you are looking for videos on a certain topic you can try using Petey Vid, a text-based search engine that searches exclusively for videos. Keep in mind that text-based searches, whether they are PeteyVid or Google, can only search for text that is affiliated with a video. So if the video is on a blank webpage and has no affiliated words, the search engine can’t find it.

According to Bellingcat’s Aric Toler, there is currently no way to run an Internet search on a video (this refers to the idea of actually uploading the a video to a search engine that would look for other videos based on it, like a reverse image search). So the next best thing is to get thumbnail photos of the video and run reverse image searches on those photos. The idea is the you are hopefully searching for the photo that appears on a video when it has not yet been started. If this sounds confusing we will walk through an example. At the time of this post’s writing, the youtube homepage looked like this screenshot below:

So if you wanted to search for the video on the top right, you could use the snipping tool to capture the photo that is currently on the video while it has not yet been played. You would do a reverse image search on this photo:

Amnesty International also has a tool for the public called the Youtube DataViewer that extracts data from any youtube video and creates four thumbnail images from the video that you can use for reverse image searches. For example, if we paste the youtube video’s url into the tool and run it, we get the following results.

The results above show the name and description of the video, the video ID, and the specific date and time when it was uploaded.

If we scroll down, we see that the tool created four thumbnail images from the video that can be used for a reverse image search, and there is even a link next to each photo that will do the reverse image search.

There is also a link next to each photo that can be used to do a reverse image search.

2 – Try to Find Out Who Posted the Video

This step requires a bit of time but is relatively simple. Google the username

For example, look at this video here. When we click on the user’s ID in the bottom left corner we are brought to a channel homepage.

That brings us to this page below, which has a strange url that does not identify the user well.

Strangely, if you click on “Home” you will get the same webpage the url changes to show the user’s username. See below, the channel’s homepage is the same but the url has chanced to show that the username is “oregonzoo”.

A quick google search of the username reveals the following Twitter account, which of course provides further information on the user.

When we scroll down to the first two commenters we can apply the same method to try to find their social media.

If we find two twitter accounts associated with those commenters we can try to find common friends by using, see below.

Using this tool we can look for common friends that might be the youtube poster.

3 – Analysis of Video Content

Youtube’s Computer-Generated Transcripts

Youtube has a new feature that makes researching videos easier by generating transcripts for each video. To access the feature, click on the three dots below the video on the right side and then click “Open transcript”.

The computer-generated transcript of the video appears next to the video. The transcript is word-searchable so you can save time by searching for a specific name or company is mentioned in the video. in the screenshot below, I searched for the name Tina Larsen and it popped up in the transcript. Note that the transcript also shows the time when different things were said. If you find something interesting in the transcript you can click on the words and youtube will automatically bring the video to that time.

Depending on the video, you may want to go through all of the content very slowly to try to analysis the background or street signs. You can do this with –

The Metadata Viewer is a great tool for gathering all of the data about a video and its publisher in one place. When was the video posted, by which account, how long has that account been around, is the video geolocated, etc.

If the video is not geolocated, you can look to see if the account that posted it (also known as a channel) has ever geolocated any of its videos, which of course implies the location of the account holder and even the original video itself. Geofinder -(

It is not clear if the following tools are actually useful for the purpose of researching a video, but they are interesting enough to warrant a mention. – will let you edit a video or convert it to an audio file. and – will let you download the video to your device as a video or audio file

More Tools

InVid has a tool for indepth analysis of the video content, for the explanation about how to use the tool click here and tool click here.

Export Comments

Use one of the tools below to download and export comments for a given video. (these tools also work for other social media)

Download all of the Comments with YouTube API

You can download all of a youtube video’s comments with the following process. Note that the first time you do this it takes a number of steps but it will be much quicker any other time afterwards once it is set up. You will need to get a youtube api key (you only need to do this process once), find the video id number, setup gitpod (only once), and then hit run.

Getting a YouTube API key:

First, go to “”.

click on agree to terms and services and then click on “agree and continue”

This image has an empty alt attribute; its file name is image-1.png

Next click “select a project”

This image has an empty alt attribute; its file name is image-2.png

Then click on “new project”

This image has an empty alt attribute; its file name is image-3.png

In the next screen click on “create”, and then in the screen click on “select project”, on the left slick on “api & services” and then “credentials”

Then click on “create credentials” and then “API key”

This image has an empty alt attribute; its file name is image.png

You are not done yet, next click on “library” on the left and in the next screen scroll down to youtube and then click on “youtube data api v3”

This image has an empty alt attribute; its file name is image-4.png

In the next screen click “enable”. Now your api has access to youtube data!

To return to your api key, click on “credentials” on the left and you are brought to a page that has your key.

For further information, the api documentation is located here – “”

Find the Video ID

Now get the video id from the youtube video of interest. Do this by opening the video and copying this portion of the url after “v=”

Scraping the Comments

If you do not already have them, first you must sign up for accounts on github and They are both pretty quick and easy. Plus, once you have a github account, all you need to do to get a gitpod account is go to the login page and choose “sign in with github”. Now leave both accounts open in two tabs and go to the following url in a third tab.

If your screen has the Gitpod button on the top left, click on it. Sometimes you screen will have a green button there that just says “The code”, if that is the case, copy and paste the following link in a new tab.

Either option will bring you to the following screen

Click on “” on the left and see the code appear. Find lines 7 and 8 where you need to paste your api key and video id. Make sure you put the apk key and video id in quotes

Now your screen should look like this below (but without the redaction over the api key).


Next, on the bottom right see where it says

gitpod /workspace/Download-All-YouTube-Comments-From-Any-Video $

To the right of the $ sign, type “pip install pytube” and then hit enter

Let it run and then click the little arrow on the top right

You will see the script running like below.

When it is done, click on “allComments.tsv” on the top left and the usernames and comments for the video will appear in chronological order.

That’s it, you’re done!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s