π¬ imdbinfo β A Simple Python Tool to Fetch IMDb
Movie Series Episodes & Actor Data (No API Keys Needed)
Have you ever needed to grab movie or actor details from IMDb, but didnβt want to deal with complicated APIs or authentication keys?
Thatβs exactly why I built imdbinfo β a lightweight, easy-to-use Python package to search and fetch structured IMDb data, with no API keys required.
π What is imdbinfo?
imdbinfo is your personal gateway to IMDb data. It lets you:
- π Search movies, series, miniseries and people by name or title
- π¬ Detailed movie info including cast, crew, ratings and more
- π₯ Detailed person info with biography, filmography and images
- πΊ TV series and miniseries support with seasons and episodes
- π Localized results in multiple languages (set globally or per request)
- π Release dates and box office information
- π International titles and alternate titles (AKAs) via
get_akas - πΈ Poster images and backdrops
- π Ratings from IMDb and other sources
- π User reviews and ratings via
get_reviews - π Movie trivia and interesting facts via
get_trivia - ποΈ Full filmography for actors, directors and writers via
get_filmography - π‘οΈ Parental guide including content advisories via
get_parental_guide - πΌοΈ Media gallery with poster images and backdrops via
get_media_gallery - π Typed Pydantic models for predictable responses
- β‘ Built-in caching for faster repeated requests
- π‘οΈ AWS WAF solver in CPython for better performance
- β No API keys required
No complicated scraping. No API credentials. Just clean, reliable data for your projectsβready to use in seconds.
π¦ Installation
pip install imdbinfo
Thatβs all you need.
βοΈ Quick Start
Hereβs how you can use it in a Python script:
from imdbinfo import search_title, get_movie, get_name, get_season_episodes, get_reviews, get_trivia
# Search for a title
results = search_title("The Matrix")
for movie in results.titles:
print(f"{movie.title} ({movie.year}) - Rating: {movie.rating} - {movie.imdb_id}")
# Search for an exact title match
results = search_title("The Matrix", exact_match=True)
for movie in results.titles:
print(f"{movie.title} ({movie.year})")
# Search by title and year
results = search_title("The Matrix", year=1999)
for movie in results.titles:
print(f"{movie.title} ({movie.year})")
# Get movie details
movie = get_movie("0133093") # or 'tt0133093'
print(movie.title, movie.year, movie.rating)
# Get movie kind:
print(movie.kind) # movie, tvSeries, tvMiniSeries, tvMovie, tvEpisode, tvSpecial, tvShort, short, videoGame, video, musicVideo, podcastEpisode, podcastSeries
print(movie.is_series()) # False
# Get person details
person = get_name("nm0000206") # or '0000206'
print(person.name, person.birth_date)
πΊ Working with Series and Episodes
The movie object provides helpful methods to identify its type:
movie.is_series()β ReturnsTrueif the movie is a series.movie.is_episode()β ReturnsTrueif the movie is an episode.
Depending on the type, you can access additional information:
- For series: use
movie.info_seriesto get series details (creators, seasons, episodes, β¦) - For episodes: use
movie.info_episodeto get episode details
Example: Series and Episodes
from imdbinfo import get_movie, get_season_episodes
# Fetch a TV series as a Movie object
walking_dead_serie = get_movie("tt1520211") # Walking Dead
# Check if the object is a series
print(walking_dead_serie.is_series()) # True
# Access series-specific information
print(f"Series Info: {walking_dead_serie.info_series}")
# Retrieve episodes for the series season 1
walking_dead_episodes = get_season_episodes(walking_dead_serie.imdb_id, season=1)
# Print details for the first 3 episodes from the season 1
for episode_info in walking_dead_episodes[:3]:
print(episode_info)
# Fetch a single episode as a Movie object and check its type
episode_detail = get_movie(episode_info.imdb_id)
print("Is Episode:", episode_detail.is_episode()) # True
# Access episode-specific information: series imdbid, season and episode number ...
print(f"Episode Info: {episode_detail.info_episode}")
All episodes in a series
You can now retrieve all episodes in a series with a single call:
from imdbinfo import get_all_episodes
# Fetch all episodes for a series
all_episodes = get_all_episodes("tt1520211") # Walking Dead
for episode in all_episodes:
print(f"Title: {episode.title} - ({episode.imdbId})")
print(f"Plot: {episode.plot[:100]}...")
print(f"Release Date: {episode.release_date}")
print(f"Rating: {episode.rating}")
print(f"Duration: {episode.duration/60}min")
print("" + "="*50)
π’ Company Credits
Extract information about the companies involved in a movie or series:
- Distribution companies
- Production companies
- Sales companies
- Special effects companies
- Miscellaneous companies
from imdbinfo import get_movie
movie = get_movie("tt0133093") # The Matrix
# Distribution companies
for company in movie.company_credits["distribution"]:
print(f"Distribution: {company.name} ({company.country})")
# Production companies
for company in movie.company_credits["production"]:
print(f"Production: {company.name}")
# Sales companies
for company in movie.company_credits["sales"]:
print(f"Sales: {company.name}")
# Special effects companies
for company in movie.company_credits["specialEffects"]:
print(f"Special Effects: {company.name}")
# Miscellaneous companies
for company in movie.company_credits["miscellaneous"]:
print(f"Miscellaneous: {company.name}")
π Alternate Titles (AKAs)
Fetch international and alternate titles for any movie or series:
from imdbinfo import get_akas
akas = get_akas("tt0133093") # The Matrix
for aka in akas["akas"][:5]:
print(f"{aka.title} ({aka.country_name})")
π Reviews and User Ratings
Get user reviews and ratings for any movie or series:
from imdbinfo import get_reviews
reviews = get_reviews("tt0133093") # The Matrix
for review in reviews[:3]:
print(f"Rating: {review['authorRating']}/10")
print(f"Summary: {review['summary']}")
print(f"Helpful votes: {review['upVotes']} up, {review['downVotes']} down")
print(f"Spoiler: {review['spoiler']}")
print("---")
π Movie Trivia and Facts
Discover interesting trivia and behind-the-scenes facts:
from imdbinfo import get_trivia
trivia = get_trivia("tt0133093") # The Matrix
for fact in trivia[:3]:
print(f"Interest Score: {fact['interestScore']}")
print(f"Fact: {fact['body'][:200]}...")
print("---")
π‘οΈ Parental Guide
Get parental guide information including content advisories, severity level, spoiler flags, and content descriptions:
from imdbinfo import get_parental_guide
pg = get_parental_guide("tt0133093") # The Matrix
for cat in pg.categories:
print(cat) # e.g. NUDITY - MILD (6 descriptions)
for txt in cat.category_texts_list(spolier=True):
print(f" - {txt.text} (SPOILER: {txt.is_spoiler})")
π Awards
The package groups award-related counts in the MovieDetail.awards object (an AwardInfo instance):
winsβ number of award winsnominationsβ number of nominations (excluding wins)prestigious_awardβ optional dict containing details of a prestigious award
from imdbinfo import get_movie
movie = get_movie("tt0133093") # The Matrix
aw = movie.awards
if not aw:
print("No award information available for this title")
else:
print("wins:", aw.wins)
print("nominations:", aw.nominations)
if aw.prestigious_award:
pa = aw.prestigious_award
print("prestigious wins:", pa.get("wins"))
print("prestigious nominations:", pa.get("nominations"))
else:
print("No prestigious award summary available")
π Localized Results
Fetch movie details and search results in multiple languages. Locale can be set globally or per request:
from imdbinfo import get_movie, search_title
from imdbinfo.locale import set_locale
# Per-request locale
movie_it = get_movie("tt0133093", locale="it") # The Matrix in Italian
# Search in Spanish
results_es = search_title("La Casa de Papel", locale="es")
# Set locale globally
set_locale("it")
movie_it = get_movie("tt0133093") # The Matrix in Italian
The MovieBriefInfo object includes title_localized β the title in the requested locale:
from imdbinfo import search_title
results = search_title("The Matrix", locale="it")
for item in results.titles:
print(item.title, "->", item.title_localized)
π½ Filtering Results by Type
Filter search results server-side by title type (Movies, Series, Episodes, etc.):
from imdbinfo import search_title, TitleType
# Search for movies only
results = search_title("The Matrix", title_type=TitleType.Movies)
for movie in results.titles:
print(f"{movie.title} ({movie.year}) - {movie.imdb_id}")
# Search for multiple types
results = search_title("The Matrix", title_type=(TitleType.Movies, TitleType.Shorts, TitleType.Video))
for movie in results.titles:
print(f"{movie.title} ({movie.year}) - {movie.imdb_id}")
# Exact match and year filtering
results = search_title("The Matrix", exact_match=True, year=1999)
for movie in results.titles:
print(f"{movie.title} ({movie.year}) - {movie.imdb_id}")
ποΈ Get Filmography with Images
Get filmography for actors, directors and writers with all credits and images:
from imdbinfo import get_filmography
filmography = get_filmography("nm0000206") # Brad Pitt
if filmography:
for role, films in filmography.items():
print(f"\nRole: {role}")
for film in films:
print(f" - {film.title} ({film.year}) [{film.imdbId}]")
π― Get All Interests
Fetch all interests for a title using the provided IMDb ID:
from imdbinfo import get_all_interests
movies = ["tt1490017", "tt0133093"]
for imdb_id in movies:
interests = get_all_interests(imdb_id)
print(f"Interests for {imdb_id}: {interests}")
πΌοΈ Media Gallery
Fetch poster images and backdrops for any movie or series:
from imdbinfo import get_media_gallery
gallery = get_media_gallery("tt0133093") # The Matrix
print(f"Total images: {gallery.total}")
for item in gallery[:5]:
print(f"[{item.type}] {item.url}")
if item.caption:
print(f" Caption: {item.caption}")
if item.source_name:
print(f" Source: {item.source_name}")
More usage examples can be found in the examples folder.
π€ Why Choose imdbinfo?
- β No API keys or auth needed
- β‘ Blazing fast with
niquests+lxml - π― Cleanly typed with Pydantic
- π§ͺ Great for automation, data science, or bots
- πͺΆ Lightweight and dependency-minimal
- π‘οΈ Built-in AWS WAF bypass for reliability
Whether youβre building a movie catalog, a Telegram bot, or just scraping your favorite actorsβ filmographies β imdbinfo is built to be intuitive and developer-friendly.
And if you want a REST API based on this package, check out qdMovieAPI β a fast and simple way to access IMDb data via REST!
π Under the Hood
- Built using
niquestsandlxmlfor fast scraping - Uses Pydantic for typing and validation
- GraphQL API for rich data (search, reviews, trivia, filmography)
- No tracking, no telemetry, no nonsense
π¬ Feedback Welcome
Iβm actively maintaining the project and open to improvements. Want to add support for series or images? Spot a bug? Just open a PR or issue.
β If you like it, drop a star on GitHub β it helps!
π Resources
- GitHub: tveronesi/imdbinfo
- PyPI:
imdbinfo - License: MIT
- Contributions: Welcome!