Find the real title of a YouTube movie
Many legitimate YouTube channels upload movies with the wrong title, and it is hard to know what movie you are watching.
I don't know why they do that for sure, but I suspect that this is their business model. They acquire the licenses of badly rated and little-known movies, upload them to YouTube while changing the titles so you cannot check out -- and be influenced by -- the bad ratings in advance.
This is a smart strategy that gives a second life to movies.
Now, I need to find the real titles of these movies. It is easy enough to do it manually; they often include clues that allow you to search on Google. For example, many list two or three actors whom you can paste into a search engine and get back the movie title.
But I need to do it programmatically. A couple of years ago, this would have been a very hard problem, almost impossible to do reliably, but with LLMs that can have agentic behavior with tool use, it becomes much easier.
For example, I want to know the real title of this documentary where the obfuscated title is "The Moon Landing Happened, Right?" https://www.youtube.com/watch?v=JmZ-oJNf5l8
They give us this description:
[#MoonLanding1969](https://www.youtube.com/hashtag/moonlanding1969)
Moon Landing Conspiracy - The day humankind set foot on the Moon should be considered nothing short of a triumph, and many think it to be precisely that. However, some people see things a lot differently. Join us as we dive down the fascinating rabbit hole of Moon Landing Conspiracy. *Under non-exclusive license from WowNow Entertainment.
[...]
[#MoonLanding1969](https://www.youtube.com/hashtag/moonlanding1969) [#ScienceFictionMovies](https://www.youtube.com/hashtag/sciencefictionmovies)
That is enough for a human to connect the dots:
So the real title of the documentary "The Moon Landing Happened, Right?" is "The Eagle Has Landed: The Flight of Apollo 11".
But can a machine do it? I pasted the full video description into a small agent I just coded and it took 16.6 seconds to find the real title, the IMDb ID and the TMDB ID.
The agent went through these steps:
print(web_search(query="themoviedb moon landing documentary 1969"))
print(web_search(query="The Eagle Has Landed: The Flight of Apollo 11 (1969) imdb id tmdb id"))
final_answer({"real_title": "The Eagle Has Landed: The Flight of Apollo 11", "year": 1969, "imdb_id": "tt5226414", "tmdb_id": 189399})
In two queries, using the DuckDuckGo web search tool, the agent found the real title, the year, the IMDb ID and the TMDB ID.
The craziest part is that it is completely free (for now) with gemini-2.0-flash
and that the full agent is just 40 lines of code:
from smolagents import (
CodeAgent,
CodeAgent,
DuckDuckGoSearchTool,
LiteLLMModel,
)
from dotenv import load_dotenv
load_dotenv()
agent = CodeAgent(
tools=[DuckDuckGoSearchTool()],
model=LiteLLMModel(model_id="gemini/gemini-2.0-flash"),
max_steps=10,
)
while True:
print("\nEnter movie data (or 'quit' to exit). Press Ctrl+D (Unix) or Ctrl+Z (Windows) followed by Enter to finish input:")
movie_data = []
try:
while True:
line = input()
movie_data.append(line)
except EOFError:
movie_data = '\n'.join(movie_data)
if movie_data.lower() == "quit":
break
result = agent.run(
f"""
Youtube movies often use a wrong name. Find the real movie title and the year (according to themoviedb.org)
and the imdb id and the tmdb id for this youtube video description:
<description>{movie_data}</description>.
The challenge is running the right query to find the real title and ignoring the noise. For example searching the web for the cast
members or crew IF PROVIDED would give the real title
"""
)
print("\nResult:", result)
Full output of the agent run
Enter movie data (or 'quit' to exit). Press Ctrl+D (Unix) or Ctrl+Z (Windows) followed by Enter to finish input:
Moon Landing Conspiracy - The day humankind set foot on the Moon should be considered nothing short of a triumph, and many think it to be precisely that. However, some people see things a lot differently. Join us as we dive down the fascinating rabbit hole of Moon Landing Conspiracy.**Under non-exclusive license from WowNow Entertainment. All rights reserved***SUBSCRIBE TO SCI-FI CENTRAL!* - https://bit.ly/3aRUxGe ?????Greetings Earthlings, welcome to Sci-Fi Central! Subscribe Now and stay updated! ** All the content on this channel is under legal license from various copyright holders and distributors. We ask you to please contact us if you believe there are any copyright issues via - you_tube@valleyarm.com **#FreeFullMoviesOnYouTube #MoonLanding1969 #ScienceFictionMovies
╭────────────────────────────────────────────────────────────────────────────────────────────── New run ───────────────────────────────────────────────────────────────────────────────────────────────╮
│ │
│ Youtube movies often use a wrong name. Find the real movie title and the year (according to themoviedb.org) │
│ and the imdb id and the tmdb id for this youtube video description: │
│ <description>Moon Landing Conspiracy - The day humankind set foot on the Moon should be considered nothing short of a triumph, and many think it to be precisely that. However, some people │
│ see things a lot differently. Join us as we dive down the fascinating rabbit hole of Moon Landing Conspiracy.**Under non-exclusive license from WowNow Entertainment. All rights │
│ reserved***SUBSCRIBE TO SCI-FI CENTRAL!* - https://bit.ly/3aRUxGe ?????Greetings Earthlings, welcome to Sci-Fi Central! Subscribe Now and stay updated! ** All the content on this channel is under │
│ legal license from various copyright holders and distributors. We ask you to please contact us if you believe there are any copyright issues via - you_tube@valleyarm.com │
│ **#FreeFullMoviesOnYouTube #MoonLanding1969 #ScienceFictionMovies</description>. │
│ The challenge is running the right query to find the real title and ignoring the noise. For example searching the web for the cast │
│ members or crew IF PROVIDED would give the real title │
│ │
╰─ LiteLLMModel - gemini/gemini-2.0-flash ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 0 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
─ Executing this code: ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
print(web_search(query="themoviedb moon landing documentary 1969"))
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Execution logs:
## Search Results
[The Eagle Has Landed: The Flight of Apollo 11 (1969) — The Movie ...](https://www.themoviedb.org/movie/189399-the-eagle-has-landed-the-flight-of-apollo-11)
A 1969 documentary on the Apollo 11 mission to the Moon made by NASA, telling the story of the historic first landing of men on the Moon in July, 1969. It depicts the principal highlight events of the
mission from launching through post-recovery activities of Astronauts Neil Armstrong, Edwin "Buzz" Aldrin, and Michael Collins. Through television, motion picture and still photography, the film ...
[Moon Landing: The Lost Tapes (2019) - The Movie Database (TMDB)](https://www.themoviedb.org/movie/668186-moon-landing-the-lost-tapes)
On July 16, 1969, the world watches as the three Apollo 11 astronauts attempt the impossible: to ride a controlled explosion off Planet Earth, land on another celestial body and return home. As the
nine-day mission proceeds, audio from mission control captures the drama as it unfolds—each moment revealing new dangers, new decisions and new wonders. For the first time on television, this ...
[10 Inspiring Moon Landing Documentaries: Journey Through Space History](https://www.factualamerica.com/history-revisited/10-out-of-this-world-moon-landing-documentaries-that-inspire-and-educate)
The film features never-before-seen 70mm footage from the historic 1969 lunar landing. Viewers are transported back in time to witness the real-life moments of this groundbreaking achievement in space
exploration. Directed by Todd Douglas Miller, this documentary provides an immersive look at one of mankind's greatest accomplishments.
[Apollo 11 Full Documentary: Moon Landing 1969 | NASA - YouTube](https://www.youtube.com/watch?v=NsYicvNefqc)
Relive the historic Apollo 11 mission that took humanity to the Moon for the first time! Watch the full documentary of the lunar landing, Neil Armstrong's ic...
[Apollo 11 Moon Landing: 10 Documentaries on Historic Space Mission](https://www.factualamerica.com/history-revisited/one-giant-leap-10-documentaries-celebrating-the-apollo-11-moon-landing)
"The Apollo Chronicles" is a compelling documentary mini-series that focuses on NASA's historic journey to the moon. Released in 2019, this four-part series provides an in-depth look at the Apollo
program and its remarkable achievements.. The series covers various Apollo missions, starting with Apollo 8 and culminating in the triumphant Apollo 11 moon landing.
[First Moon Landing: Apollo 11 - Eagle Has Landed | NASA Documentary | 1969](https://www.youtube.com/watch?v=B6Na63NNxFY)
Visit our main channel: https://www.youtube.com/user/TheBestFilmArchives Facebook: https://www.facebook.com/TheBestSpaceArchivesThis 1969 film - originally...
[Footprints on the Moon: Apollo 11 (1969) - IMDb](https://www.imdb.com/title/tt0129931/)
Footprints on the Moon: Apollo 11: Directed by Bill Gibson. With Buzz Aldrin, Neil Armstrong, Mike Collins, Pierre Jalbert. Theatrically released documentary on the Apollo 11 moon landing, issued
barely two months after its completion, combining footage from Houston's Space Center, Florida's Cape Kennedy, and aboard the shuttle itself.
['Must See' Apollo Moon Landing Documentaries - IMDb](https://www.imdb.com/list/ls049795825/)
"HERE MEN FROM THE PLANET EARTH FIRST SET FOOT UPON THE MOON JULY 1969, A.D. WE CAME IN PEACE FOR ALL MANKIND" List activity. ... An in-depth look at various NASA moon landing missions, starting with
Apollo 8. ... This mini-series is a documentary that chronicles the NASA space program from its inception up through the final moon mission of ...
[1969 Moon Landing Heads Up ABC Documentary Series About That Memorable ...](https://www.space.com/1969-documentary-abc-moon-landing.html)
A new documentary series about the tumultuous year 1969 shows how the first human moon landing fit into a year also known for murder and music.
[The Day Before the Moon Landing (1969) - The Movie Database (TMDB)](https://www.themoviedb.org/movie/795145-the-day-before-the-moon-landing)
The Day Before the Moon Landing (1969) is the first in a series of videos Tambellini made to capture broadcast television as it was experienced live. Unlike more involved works such as Black TV, the
video simply records Tambellini channel surfing between the networks on July 19, 1969, the day before Apollo 11 landed.
Out: None
[Step 0: Duration 11.44 seconds| Input tokens: 2,467 | Output tokens: 130]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
─ Executing this code: ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
print(web_search(query="The Eagle Has Landed: The Flight of Apollo 11 (1969) imdb id tmdb id"))
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Execution logs:
## Search Results
[The Flight of Apollo 11: Eagle Has Landed (Short 1969) - IMDb](https://www.imdb.com/title/tt5226414/)
The Flight of Apollo 11: Eagle Has Landed: Directed by Ted Lowry. Documentary of the Apollo 11 spaceflight to the Moon and back.
[The Flight of Apollo 11: Eagle Has Landed (1969) - IMDb](https://www.imdb.com/title/tt5226414/fullcredits)
The Flight of Apollo 11: Eagle Has Landed (1969) cast and crew credits, including actors, actresses, directors, writers and more. Menu. Movies. Release Calendar Top 250 Movies Most Popular Movies
Browse Movies by Genre Top Box Office Showtimes & Tickets Movie News India Movie Spotlight.
[The Eagle Has Landed: The Flight of Apollo 11 - Archive.org](https://archive.org/details/gov.archives.arc.45017)
National Archives and Records Administration - ARC Identifier 45017 / Local Identifier 255-HQ-194 - The Eagle Has Landed: The Flight of Apollo 11 - National Aeronautics and Space Administration.
(10/01/1958 - ). This film tells the story of the historic first landing of men on the Moon in July, 1969.
[The Flight of Apollo 11: Eagle Has Landed (Short 1969) - IMDb](https://www.imdb.com/title/tt5226414/ratings/?demo=aged_45_plus)
The Flight of Apollo 11: Eagle Has Landed (Short 1969) - Movies, TV, Celebs, and more... Menu. Movies. Release Calendar Top 250 Movies Most Popular Movies Browse Movies by Genre Top Box Office
Showtimes & Tickets Movie News India Movie Spotlight. TV Shows.
[The Flight of Apollo 11: Eagle Has Landed - C-SPAN.org](https://www.c-span.org/video/?320377-1/the-flight-apollo-11-eagle-landed)
July 20, 1969 Reel America The Flight of Apollo 11: Eagle Has Landed ... The Flight of Apollo 11: Eagle Has Landed. 2,307 Views Program ID: 320377-1 Category: Vignette
[The Eagle Has Landed: The Flight of Apollo 11 (1969)](https://www.themoviedb.org/movie/189399-the-eagle-has-landed-the-flight-of-apollo-11)
A 1969 documentary on the Apollo 11 mission to the Moon made by NASA, telling the story of the historic first landing of men on the Moon in July, 1969. It depicts the principal highlight events of the
mission from launching through post-recovery activities of Astronauts Neil Armstrong, Edwin "Buzz" Aldrin, and Michael Collins. Through television, motion picture and still photography, the film ...
[The Flight of Apollo 11: Eagle Has Landed (1969) - IMDb](https://www.imdb.com/title/tt5226414/parentalguide)
The Flight of Apollo 11: Eagle Has Landed (1969) Parents Guide and Certifications from around the world. Menu. Movies. Release Calendar Top 250 Movies Most Popular Movies Browse Movies by Genre Top
Box Office Showtimes & Tickets Movie News India Movie Spotlight. TV Shows.
[Flight of Apollo 11 (The Eagle Has Landed) : Clayton Edwards : Free ...](https://archive.org/details/flight_of_apollo_11)
Presents the story of the first Moon landing in July 1969. Depicts the principal events of the mission, from the launching through the postrecovery activities of astronauts Armstrong, Aldrin, and
Collins. Through television, motion pictures, and still photography, the program provides an "eyewitness" perspective of the Apollo 11 mission. HQ-194
[Eagle Has Landed: Flight of Apollo 11 1969 - YouTube](https://www.youtube.com/watch?v=6uHJXAegfS8)
"One small step for man, one giant leap for mankind." This film tells the story of the historic first landing of men on the Moon in July, 1969. It depicts th...
[The Eagle Has Landed: The Flight of Apollo 11 (1969) - JustWatch](https://www.justwatch.com/us/movie/the-eagle-has-landed-the-flight-of-apollo-11)
A 1969 documentary on the Apollo 11 mission to the Moon made by NASA, telling the story of the historic first landing of men on the Moon in July, 1969. It depicts the principal highlight events of the
mission from launching through post-recovery activities of Astronauts Neil Armstrong, Edwin "Buzz" Aldrin, and Michael Collins.
Out: None
[Step 1: Duration 5.16 seconds| Input tokens: 6,297 | Output tokens: 322]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Step 2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
─ Executing this code: ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
final_answer({"real_title": "The Eagle Has Landed: The Flight of Apollo 11", "year": 1969, "imdb_id": "tt5226414", "tmdb_id": 189399})
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Out - Final answer: {'real_title': 'The Eagle Has Landed: The Flight of Apollo 11', 'year': 1969, 'imdb_id': 'tt5226414', 'tmdb_id': 189399}
[Step 2: Duration 2.35 seconds| Input tokens: 11,562 | Output tokens: 535]
Result: {'real_title': 'The Eagle Has Landed: The Flight of Apollo 11', 'year': 1969, 'imdb_id': 'tt5226414', 'tmdb_id': 189399}
I ran this agent arount 20 times with different YouTube movie descriptions and it worked every time, chosing different strategies according to the available data. It is a very simple agent, but it is a good example of how LLMs can be used to solve real-world problems in a few lines of code.