IMDbApiLib 3.0.0

dotnet add package IMDbApiLib --version 3.0.0
                    
NuGet\Install-Package IMDbApiLib -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="IMDbApiLib" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="IMDbApiLib" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="IMDbApiLib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add IMDbApiLib --version 3.0.0
                    
#r "nuget: IMDbApiLib, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package IMDbApiLib@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=IMDbApiLib&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=IMDbApiLib&version=3.0.0
                    
Install as a Cake Tool

IMDbApiLib

IMDbApiLib is the official .NET client for TV-API, a movie and TV data service.

It provides strongly typed access to title details, cast and crew, images, posters, trailers, ratings, reviews, Wikipedia content, charts, search, people, companies, and more.

IMDbApiLib is the package name. TV-API is the service that provides the data.

Requirements

  • .NET Standard 2.0 or later
  • A TV-API key

Installation

.NET CLI

dotnet add package IMDbApiLib --version 3.0.0

Package Manager Console

Install-Package IMDbApiLib -Version 3.0.0

PackageReference

<PackageReference Include="IMDbApiLib" Version="3.0.0" />

Documentation

Quick start

using IMDbApiLib;
using IMDbApiLib.Models;

using var api = new ApiLib("YOUR_API_KEY");

var title = await api.TitleAsync("tt0110413");

if (title?.Success == true)
{
    Console.WriteLine(title.Title);
}
else
{
    Console.WriteLine(title?.ErrorMessage);
}

Authentication

Keep your API key outside source code. For ASP.NET Core applications, use User Secrets, environment variables, or a secure configuration provider.

using var api = new ApiLib(apiKey);

Language

All methods that support language default to English.

var title = await api.TitleAsync("tt0110413", Language.FR);

Title data

var title = await api.TitleAsync("tt0110413");

var titleWithOptions = await api.TitleAsync(
    "tt0110413",
    Language.EN,
    options: "FullActor,FullCast,Wikipedia,Posters,Images,Trailer,Ratings");

var titleWithFlags = await api.TitleAsync(
    "tt0110413",
    Language.EN,
    FullActor: true,
    FullCast: true,
    Wikipedia: true,
    Posters: true,
    Images: true,
    Trailer: true,
    Ratings: true);

var report = await api.ReportAsync("tt0110413", Language.EN, "FullActor,FullCast,Posters,Images,Trailer,Wikipedia");
var cast = await api.FullCastAsync("tt0110413");
var images = await api.ImagesAsync("tt0110413");
var posters = await api.PostersAsync("tt0110413");
var trailer = await api.TrailerAsync("tt0110413");
var ratings = await api.RatingsAsync("tt0110413");
var userRatings = await api.UserRatingsAsync("tt0110413");
var externalSites = await api.ExternalSitesAsync("tt0110413");
var wikipedia = await api.WikipediaAsync("tt0110413", Language.EN);
var reviews = await api.ReviewsAsync("tt0110413");
var metacriticReviews = await api.MetacriticReviewsAsync("tt0110413");
var quotes = await api.QuotesAsync("tt0110413");
var goofs = await api.GoofsAsync("tt0110413");
var faq = await api.FAQAsync("tt0110413");
var awards = await api.AwardsAsync("tt0110413");
var episodes = await api.SeasonEpisodesAsync("tt0944947", 1);
var movies = await api.SearchMovieAsync("leon the professional");
var series = await api.SearchTVSeriesAsync("breaking bad");
var episodes = await api.SearchTVEpisodeAsync("the last of us");
var titles = await api.SearchTitleAsync("inception");
var names = await api.SearchNameAsync("leonardo dicaprio");
var companies = await api.SearchCompanyAsync("warner bros");
var keywords = await api.SearchKeywordAsync("time travel");
var all = await api.SearchAllAsync("matrix");
using IMDbApiLib.Models;

var input = new AdvancedSearchInput
{
    Genres = AdvancedSearchGenre.Action | AdvancedSearchGenre.Adventure,
    UserRatingFrom = 7,
    NumberOfVotesFrom = 5000,
    ReleaseDateFrom = "2010-01-01",
    Languages = AdvancedSearchLanguage.English | AdvancedSearchLanguage.French,
    Countries = AdvancedSearchCountry.United_States
};

var results = await api.AdvancedSearchAsync(input);

For multiple country or language values as text:

input.CountriesStr = "US,FR,GB";
input.LanguagesStr = "en,fr";
using IMDbApiLib.Models;

var input = new AdvancedNameSearchInput
{
    Name = "Leonardo DiCaprio",
    BirthDateFrom = "1970",
    BirthDateTo = "1980",
    Gender = AdvancedNameSearchGender.Male,
    Awards = AdvancedNameSearchAward.OscarWinning
};

var results = await api.AdvancedNameSearchAsync(input);

Charts and upcoming releases

var topMovies = await api.Top250MoviesAsync();
var topTVs = await api.Top250TVsAsync();
var popularMovies = await api.MostPopularMoviesAsync();
var popularTVs = await api.MostPopularTVsAsync();
var inTheaters = await api.InTheatersAsync();
var upcomingMovies = await api.UpcomingMoviesAsync();
var upcomingSeries = await api.UpcomingTVSeriesAsync();
var upcomingEpisodes = await api.UpcomingTVEpisodesAsync();
var weekendBoxOffice = await api.BoxOfficeAsync();
var allTimeBoxOffice = await api.BoxOfficeAllTimeAsync();
var releases = await api.ReleasesAsync("tt1375666");

Names, companies, lists, and tools

var name = await api.NameAsync("nm0000138");
var nameAwards = await api.NameAwardsAsync("nm0000138");
var company = await api.CompanyAsync("co0002663");
var keyword = await api.KeywordAsync("time-travel");
var imdbList = await api.IMDbListAsync("ls000000000");
var countries = await api.CountriesAsync("US");
var ip = await api.IPsAsync("8.8.8.8");
var usage = await api.UsageAsync();

Image resizing and downloads

byte[]? image = await api.ResizeImageAsync("300x450", imageUrl);
byte[]? poster = await api.ResizePosterAsync("300x450", posterUrl);

await api.ResizeImageSaveFileAsync("300x450", imageUrl, "image.jpg");
await api.ResizePosterSaveFileAsync("300x450", posterUrl, "poster.jpg");

string resizeUrl = api.ResizeImageUrl("300x450", imageUrl);

Proxy support

using var api = new ApiLib(
    apiKey: "YOUR_API_KEY",
    proxyAddress: "http://127.0.0.1:8080",
    proxyUsername: "username",
    proxyPassword: "password");

Error handling

API result models inherit a common error contract. Check Success and ErrorMessage before using the returned data.

var result = await api.TitleAsync("tt0110413");

if (result?.Success != true)
{
    Console.WriteLine(result?.ErrorMessage);
    return;
}

License

MIT

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on IMDbApiLib:

Repository Stars
TV-Rename/tvrename
Organise your TV & Movie videos with ease
Version Downloads Last Updated
3.0.0 85 9/14/2026
2.0.2 1,974 9/15/2024
2.0.1 662 5/8/2024
2.0.0 1,831 1/18/2024
1.9.4 1,470 5/21/2023
1.9.3 430 4/23/2023
1.9.2 9,250 12/27/2022
1.9.0 688 12/17/2022
1.8.2 616 11/1/2022
1.8.1 2,709 3/16/2022
1.8.0 737 3/12/2022
1.7.1 720 12/15/2021
1.7.0 533 12/15/2021
1.6.3.1 980 8/15/2021
1.6.2 619 8/14/2021
1.6.0 543 8/14/2021
1.5.0 1,218 11/5/2020
1.4.0 3,249 4/18/2020
1.3.0 780 3/25/2020
1.2.0 737 3/25/2020
Loading failed