ThoughtLeaders YouTube API

Incorporate the valuable data from ThoughtLeaders into your apps and products seamlessly using our user-friendly YouTube API documentation. Our API provides developers with access to a wealth of essential metrics and endpoints, empowering businesses to make data-driven decisions and gain a competitive edge. With our API documentation, integrating and utilizing the ThoughtLeaders API has never been easier.

GET ACCESS
TO OUR DATA

Setting up ThoughtLeaders API is easy. Let’s discuss what data you need, and let our team set up the rest.

YouTube Data API Overview

Introduction

This document is intended for developers who want to write applications that interact with YouTube. It explains basic concepts of YouTube and of the API itself. It also provides an overview of the different functions that the API supports.

Add YouTube functionality to your app

Add YouTube functionality to your site

The YouTube Data API offers an array of YouTube features that you can seamlessly integrate into your application. With the API, you can effortlessly upload videos, manage playlists and subscriptions, update channel settings, and perform various other actions on the platform.

Search for content

Use the API to search for videos matching specific search terms, topics, locations, publication dates, and much more.

Table of Contents

GET YouTube Videos

This request can be used with various filters, including evergreen score, keywords, and channel IDs.
Can be used to fetch an arbitrary set of YouTube videos that match certain filters, or all YouTube videos for a particular channel.

Filters

brand_ids

A comma-separated list of integer brand ids to find matching articles for. We can provide a list of brand ids on request.

channelId

A comma-separated list of integer channel ids to find matching articles for. We can provide a list of channel ids on request, or you can retrieve them from the channels API call.

content

Field for keyword searching, using the instructions here.

content_fields

A comma-separated list of which fields to look for the keywords mentioned in the content filter above. Options are title, content, summary, and transcript.

creator_country

A comma-separated list of country codes to filter articles by.
Eg US,IN
A full set of country codes can be provided on request.

Date filtering

For date filtering, we can either use the date and endDate filters, which are absolute dates in ISO8601 format, or the days_ago and days_ago_to filters, which are integer filters relative to today. For example, if I want to find all content posted in the last week, I would set days_ago=7,days_ago_to=1

exclude_brands

Similar to the brand_ids filter, except takes in a list of brands ids we don't want to find data for.

Date filtering

For date filtering, we can either use the date and endDate filters, which are absolute dates in ISO8601 format, or the days_ago and days_ago_to filters, which are integer filters relative to today. For example, if I want to find all content posted in the last week, I would set days_ago=7,days_ago_to=1

exclude_channels

Similar to the channelId filter, except takes in a list of channel ids we don't want to find data for.

language

a comma-separeted list of string language codes to filter by. Eg en,de
We can provide a list of language codes on request.

page

Integer page number to return. Each page contains up to 20 results. The total number of pages is included in the response, under the pages field.

projectedViewsFrom, projectedViewsTo

Integer filters to find articles with a certain range of projected views on the days that they were posted. Eg to find all articles that we expected to have between 50,000 and 100,000 views on the day they were posted, you would use projectedViewsFrom=50000&projectedViewsTo=100000

sort

Which string field to sort results by. Options for sorting are:

- views
- date
- likes
- duration
- projected_views
- evergreenness
- rank (should be used only with keyword or topic filters, sorts by relevancy)

to sort in descending order, add - to the name of the field.

For instance, to sort by views descending, set sort=-views

topics

An integer id of a pre-determined list of topics to filter by. Example topics are Women's Health and Gardening

The list of topics we support can be provided on request. We can also create new topics based on complex keyword queries for you.

Keep in mind, that although the topics filter supports multiple topics in a single query, using multiple topics likely will not return the results that you expect since the topics will be joined together.

ytLikesFrom, ytLikesTo

Integer filters to find articles with a certain range of likes. Eg to find all articles with likes between 50,000 and 100,000, you would use ytLikesFrom=50000&ytLikesTo=100000

ytViewsFrom, ytViewsTo

Integer filters to find articles with a certain range of views. Eg to find all articles with views between 50,000 and 100,000, you would use ytViewsFrom=50000&ytViewsTo=100000

evergreennessFrom, evergreennessTo

Integer filters to find articles with a certain range of evergreen score. Eg to find all articles with evergreen score between 50,000 and 100,000, you would use evergreennessFrom=50000&evergreennessTo=100000

reachFrom, reachTo

Integer filters to find articles from channels with a certain range of subscribers. Eg to find all articles from channels with between 50,000 and 100,000 subscribers, you would use reachFrom=50000&reachTo=100000

HEADERS

X-Api-Key

abcd1234

PARAMS

brand_ids

9001,816

channelId

28809

content

((supplement) OR (cooking))

content_fields

title,content,summary,transcript

creator_country

US

date

2022-01-25T11:59:19.703Z

end_date

2023-01-24T18:30:00.000Z

exclude_brands

2013

exclude_channels

14691

language

en

page

1

projectedViewsFrom

50000

projectedViewsTo

4000000

sort

-date

topics

3

ytLikesFrom

10000

ytLikesTo

5000000

ytViewsFrom

10000

ytViewsTo

5000000

evergreennessFrom

1

evergreennessTo

9.5

days_ago

300

days_ago_to

365

reachFrom

10000

reachTo

50000

durationFrom

120

durationTo

7080

externalChannelId

UCwHPRkLWbL_guuBMGxKe2aQ

GET YouTube Channels

This request can be used to get more information on a single channel or a list of channels.

Filters

brand_ids

A comma-separated list of integer brand ids to find channels which have mentioned these brands. We can provide a list of brand ids on request.

externalChannelId

A comma-separated list of channel ids from YouTube to find matching articles for. You can get the channel id for the YouTube channel by following the steps in this link.

channelId

A comma-separated list of integer channel ids to find matching channels for.

content

Field for finding channels which have mentioned keywords, using the instructions here.

content_fields

A comma-separated list of which fields to look for the keywords mentioned in the content filter above. Options are title, content, summary, and transcript

creator_country

A comma-separated list of country codes to filter articles by. Eg US,IN
A full set of country codes can be provided on request.

Date filtering

For date filtering, we can either use the date and endDate filters, which are absolute dates in ISO8601 format, or the days_ago and days_ago_to filters, which are integer filters relative to today. For example, if I want to find all content posted in the last week, I would set days_ago=0,days_ago_to=7

exclude_brands

Similar to the brand_ids filter, except takes in a list of brands ids we don't want to find data for.

Date filtering

For date filtering, we can either use the date and endDate filters, which are absolute dates in ISO8601 format, or the days_ago and days_ago_to filters, which are integer filters relative to today. For example, if I want to find all content posted in the last week, I would set days_ago=7,days_ago_to=1

exclude_channels

Similar to the channelId filter, except takes in a list of channel ids we don't want to find.

language

a comma-separeted list of string language codes to filter by. Eg en,de
We can provide a list of language codes on request.

page

Integer page number to return. Each page contains up to 20 results. The total number of pages is included in the response, under the pages field.

sort

Which string field to sort results by. Options for sorting are:

- doc_count (the number of matching articles found)
- date__max (the last posted at date)
- brand_count (the number of brands per channel)
- avg_duration
- views__sum (the total views for the channel)
- views__std_dev (the standard deviation of views for the channel)
- sponsored_brands_count (the number of brands that have sponsored each channel)
- views__avg (the avg views for the channel)
- views__max (the maximum number of views a channel received on a video)
- views__min (the minimum number of views a channel received on a video)

to sort in descending order, add - to the name of the field.

For instance, to sort by avg_duration descending, set sort=-avg_duration

topics

An integer id of a pre-determined list of topics to filter by. Example topics are Women's Health and Gardening

The list of topics we support can be provided on request.

is_active

Boolean field to include channels we actively scrape. Should always be set to true

min_doc_count, max_doc_count

Used in tandem with the brand_ids field. Integer values to filter channels by the number of times they mention certain brands. Eg if I wanted to find all channels that have mentioned brand 2019 between 5 and 10 times in my specified date range, I would set brand_ids=2019&min_doc_count=5&max_doc_count=10.

reportType

always set to thoughtleaders

HEADERS

X-Api-Key

abcd1234

PARAMS

content
((cooking) OR (supplements))
content_fields
title,content,summary,transcript
max_doc_count
15
min_doc_count
1
channelId
28809
sort
-
page
3
page_size
10
reachTo
20000
reachFrom
19000
days_ago
364
days_ago_to
1
evergreenness
externalChannelId
UCwHPRkLWbL_guuBMGxKe2aQ

GET Channel History

Returns the stored historical data about a channel. Earliest data returned is from March 2022.

Parameters

channel_ids

Takes a comma-separated list of channel ids in the channel_ids param.

page_size

Integer parameter that determines page size of the response. Default value 20, max value 100

date_after

Used to get the next page of results. Set to the value of next_page_date_after to get the next page.

HEADERS

X-Api-Key

abcd1234

PARAMS

channel_ids

11169,11168

date_after

2023-03-17

page_size

10

GET Video History

Returns the stored historical data about a video. Earliest data returned is from March 2022.

Parameters

article_ids

Takes a comma-separated list of video ids in the article_ids param.

page_size

Integer parameter that determines page size of the response. Default value 20, max value 100

date_after

Used to get the next page of results. Set to the value of next_page_date_after to get the next page.

HEADERS

X-Api-Key

abcd1234

PARAMS

article_ids

QOR_L_2tG8U,7190683993552227630

page_size

10

date_after

2023-03-29

GET Views Prediction

Predicts video views for a given time range.

There are two options of selecting videos:

- Explicitly as a list of IDs - parameter videos.
- Indirectly using a channel ID - parameter channel. In this case, prediction will be made for all videos with enough data published by the given channel.

Parameters videos and channel can not be used together.

HEADERS

X-Api-Key

secret

PARAMS

dates

2023-01-01,2023-12-31
List of dates to predict views at (YYYY-MM-DD[,YYYY-MM-DD,...])

videos

h5NvTTOlOtI,xf2DPY3vGto
Comma-separated list of video IDs

channel

UCX6OQ3DkcsbYNE6H8uQQuVA
Channel ID

video_type

longform
longform|short for filtering or empty to get all videos. Can not be used together with the videos parameter. Optional.

publication_period

10
Number of days between future videos. Optional for overriding automatically calculated value. [float]

predict_since

2022-12-31
Overloading the meaning of "today". Let's pretend we travel back to a given date in the past.

model_range

90
Time interval used to create a channel model, ie. context length. Number of days (no suffix), months (suffix 'm') or years ('y'). Default = '2y'.

GET ACCESS
TO OUR DATA

Setting up ThoughtLeaders API is easy. Let’s discuss what data you need, and let our team set up the rest.