A Python service for querying IMDb data
Project description
imdbinfo
Your personal gateway to IMDb data. Search for movies, series and people and get structured information in seconds.
💣 New in v0.5.0
Localized results in multiple languages (set globally or per request)
Added support for locales in search_movie, get_movie, get_episodes, get_all_episodes, get_name
from imdbinfo import get_movie, search_title
# Fetch movie details in Italian
movie_it = get_movie("tt0133093", locale="it") # The Matrix
# Search for titles in Spanish (although IMDb search is mostly in all languages)
results_es = search_title("La Casa de Papel", locale="es")
Localized data can be set globally, dont need to pass locale every time in the functions:
from imdbinfo import get_movie
from imdbinfo.locale import set_locale
set_locale("it") # Set default locale to Italian
movie_it = get_movie("tt0133093") # The Matrix in Italian
Features
- 🔍 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
- 📅 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
Installation
pip install imdbinfo
Quick Start
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()— 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. - For episodes: use
movie.info_episodeto get episode details.
Example: Working with 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}")
⭐⭐New: 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)
⭐⭐New: 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})")
📝 For more examples see the examples folder.
💡 Looking for a ready-to-use API based on this package? Check out qdMovieAPI — a fast and simple way to access IMDb data via REST!
Why choose imdbinfo?
- Easy to use Python API
- Returns clean structured data
- Powered by requests and lxml
- Uses Pydantic for type safety
- No external dependencies or API keys required
- Ideal for quick scripts and data analysis
Disclaimer
This project and its authors are not affiliated in any way with IMDb Inc. or its affiliates. For more information, please refer to the DISCLAIMER file.
License
imdbinfo is released under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Open an issue or pull request on GitHub.
If you find this project useful, please consider giving it a ⭐ on GitHub!
Please read our Contributing Guidelines and Code of Conduct before contributing.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file imdbinfo-0.5.0.tar.gz.
File metadata
- Download URL: imdbinfo-0.5.0.tar.gz
- Upload date:
- Size: 609.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b805d70dcfe0f845ddf0a00b5a0f7aba82191ac12f9c924f66e87d46551e536
|
|
| MD5 |
ffb5af576a86788b8d1cb84500606ec1
|
|
| BLAKE2b-256 |
c540d1ae34a1365d47bd6e4ee15ddc29e06becec1e6c0c666014428e1760e83a
|
File details
Details for the file imdbinfo-0.5.0-py3-none-any.whl.
File metadata
- Download URL: imdbinfo-0.5.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd034fd44622d6b267ddec4eac49055ba56db8c16e64254b8b3fb3b850eb8380
|
|
| MD5 |
873df05157c401808bd5e4c7d1d8d23f
|
|
| BLAKE2b-256 |
3801ffcae51d3284479117f265c519f3420e96e5341f839174d0cc99c9feb985
|