Disclosure: I earn Supadata credits for writing this post. Everything below is from a bot I actually run every day.
I follow a handful of finance YouTube channels, some in Turkish and some in English. Every day they publish videos full of claims like "Nvidia has to break $166 before you buy" or "Nasdaq support is 26,700–27,200". I don't have time to watch them all, and I definitely don't have time to check whether those claims hold up against real market data.
So I built a bot that does it for me. Three times a day it:
Finds the new videos from my channels in the last 24 hours
Pulls the full transcript with the Supadata YouTube Transcript API
Extracts every concrete claim (ticker, direction, price level, timeframe)
Tests each claim against real price data
Labels it true / partly true / false / unverifiable, scores it 1–5, and writes a report
In this tutorial I'll show you the core of it: turning a YouTube link into text with Supadata, and checking a simple price claim against market data. You can copy the code and run it in a few minutes.
Why Supadata?
The hard part of this whole project is getting reliable text out of a YouTube video. Scraping YouTube captions yourself breaks constantly, and many videos only have auto-generated captions in Turkish. Supadata gives me one HTTP endpoint: I send a video URL and a language, and I get the transcript back as plain text. It works for both my Turkish and English channels with the same code.
Step 1: Get an API key
Sign up at Supadata, open the dashboard, and copy your API key. The free plan gives you 100 credits a month, which is plenty to test with. Store the key as an environment variable so it never ends up in your code:
export SUPADATA_KEY="your-key-here"
Step 2: Fetch a transcript
This is the function my bot uses (simplified). It only needs the Python standard library:
import json, os, urllib.parse, urllib.request, urllib.error
def get_transcript(video_url: str, lang: str = "en") -> str:
key = os.environ["SUPADATA_KEY"]
params = urllib.parse.urlencode({
"url": video_url,
"lang": lang, # "tr" for my Turkish channels
"mode": "native", # use the video's existing captions
"text": "true", # return plain text instead of timed segments
})
req = urllib.request.Request(
f"https://api.supadata.ai/v1/transcript?{params}",
headers={"x-api-key": key},
)
try:
data = json.loads(urllib.request.urlopen(req, timeout=120).read())
except urllib.error.HTTPError as e:
raise RuntimeError(f"Supadata error {e.code}: {e.read()[:200]!r}")
content = data.get("content")
if isinstance(content, list): # timed segments
content = " ".join(seg.get("text", "") for seg in content)
if not content:
raise RuntimeError("Empty transcript")
return content
if name == "main":
text = get_transcript("https://www.youtube.com/watch?v=VIDEO_ID", lang="en")
print(len(text.split()), "words")
print(text[:500])
Run it with any finance video URL and you'll see the first 500 characters of the transcript. Two things I learned the hard way:
Cache everything. Each transcript costs a credit, so my bot saves every transcript to transcripts/YYYY-MM-DD/.txt and never fetches the same video twice.
Track your usage. You can check your remaining credits with GET https://api.supadata.ai/v1/me. My bot warns me when I pass 80% of my monthly credits.
def credits_left() -> int:
req = urllib.request.Request(
"https://api.supadata.ai/v1/me",
headers={"x-api-key": os.environ["SUPADATA_KEY"]},
)
me = json.loads(urllib.request.urlopen(req, timeout=30).read())
return me["maxCredits"] - me["usedCredits"]
Step 3: Find the claims
Once I have the text, an AI agent reads the transcript and pulls out structured claims. Each claim becomes a small record:
claim = {
"ticker": "NVDA",
"type": "level", # level, direction, or event
"level": 166.0,
"direction": "above", # the speaker says: don't buy until it closes above 166
"speaker": "Channel host",
"video": "https://www.youtube.com/watch?v=VIDEO_ID",
}
You can use any LLM for this step. The key is to ask for a strict format (JSON) and only accept claims that name a specific asset and something measurable. Vague opinions ("the market feels scary") are kept in the report but marked as unverifiable.
Step 4: Test a claim against real data
For level claims, the test is simple: did the price actually close above or below the level the speaker named? Here's a minimal checker. get_last_close is whatever market data source you use (I use a paid market data API; any daily close works):
def check_level_claim(claim: dict, last_close: float) -> dict:
level, direction = claim["level"], claim["direction"]
if direction == "above":
held = last_close > level
elif direction == "below":
held = last_close < level
else:
return {**claim, "verdict": "unverifiable"}
distance = (last_close - level) / level * 100
return {
**claim,
"last_close": last_close,
"distance_pct": round(distance, 2),
"verdict": "condition met" if held else "condition not met yet",
}
print(check_level_claim(claim, last_close=151.88))
{'ticker': 'NVDA', ..., 'distance_pct': -8.51, 'verdict': 'condition not met yet'}
In the real bot I also look at intraday highs and lows, RSI, and moving averages, because a price can poke through a level during the day and still close back inside. I treat a level as broken only on a daily close.
Step 5: Score and report
Each claim gets two scores from 1 to 5: how much it matters (impact) and how well it's backed by data (reliability). A claim that relies on a single unconfirmed news story never gets more than 4. The bot writes everything to a Markdown report with the video title, channel, speaker, publish time, link, and the rough minute in the video where the claim appears. Then it saves a copy to Google Drive.
What I'd tell you if you build this
Start with one channel and one claim type (price levels). It's surprisingly useful on its own.
Separate "the news exists" from "the event happened". A lot of YouTube claims are just repeating a headline.
Supadata is the piece that turns a YouTube link into something a program can work with. Everything else is just checking numbers.
If you want to try it, you can get a key here: supadata.ai. Happy building!
https://supadata.ai/r/GG9B7P6N
Top comments (0)