π¬ 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
- ποΈ Full filmography for actors, directors and writers
- π Typed Pydantic models for predictable responses
- β‘ Built-in caching for faster repeated requests
- β 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
# Search for a title
results = search_title("The Matrix")
for movie in results.titles:
print(f"{movie.title} ({movie.year}) - {movie.imdb_id}")
# 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()
β ReturnsTrue
if the movie is a series.movie.is_episode()
β ReturnsTrue
if the movie is an episode.
Depending on the type, you can access additional information:
- For series: use
movie.info_series
to get series details. - For episodes: use
movie.info_episode
to 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}")
More usage examples can be found in the examples folder.
π€ Why Choose imdbinfo?
- β No API keys or auth needed
- β‘ Blazing fast with
requests
+lxml
- π― Cleanly typed with Pydantic
- π§ͺ Great for automation, data science, or bots
- πͺΆ Lightweight and dependency-minimal
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
requests
andlxml
for fast scraping - Uses Pydantic for typing and validation
- 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!