Setting up ThoughtLeaders API is easy. Let’s discuss what data you need, and let our team set up the rest.
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.
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.
Use the API to search for videos matching specific search terms, topics, locations, publication dates, and much more.
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.
A comma-separated list of integer brand ids to find matching articles for. We can provide a list of brand ids on request.
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.
Field for keyword searching, using the instructions here.
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.
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.
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
Similar to the brand_ids filter, except takes in a list of brands ids we don't want to find data for.
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
Similar to the channelId filter, except takes in a list of channel ids we don't want to find data for.
a comma-separeted list of string language codes to filter by. Eg en,de
We can provide a list of language codes on request.
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.
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
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
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.
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
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
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
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
X-Api-Key
abcd1234
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
This request can be used to get more information on a single channel or a list of channels.
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.
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.
A comma-separated list of integer channel ids to find matching channels for.
Field for finding channels which have mentioned keywords, using the instructions here.
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
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.
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
Similar to the brand_ids filter, except takes in a list of brands ids we don't want to find data for.
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
Similar to the channelId filter, except takes in a list of channel ids we don't want to find.
a comma-separeted list of string language codes to filter by. Eg en,de
We can provide a list of language codes on request.
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.
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
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.
Boolean field to include channels we actively scrape. Should always be set to true
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.
always set to thoughtleaders
X-Api-Key
abcd1234
Returns the stored historical data about a channel. Earliest data returned is from March 2022.
Takes a comma-separated list of channel ids in the channel_ids param.
Integer parameter that determines page size of the response. Default value 20, max value 100
Used to get the next page of results. Set to the value of next_page_date_after to get the next page.
X-Api-Key
abcd1234
channel_ids
11169,11168
date_after
2023-03-17
page_size
10
Returns the stored historical data about a video. Earliest data returned is from March 2022.
Takes a comma-separated list of video ids in the article_ids param.
Integer parameter that determines page size of the response. Default value 20, max value 100
Used to get the next page of results. Set to the value of next_page_date_after to get the next page.
X-Api-Key
abcd1234
article_ids
QOR_L_2tG8U,7190683993552227630
page_size
10
date_after
2023-03-29
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.
X-Api-Key
secret
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'.
Setting up ThoughtLeaders API is easy. Let’s discuss what data you need, and let our team set up the rest.