TMDbLib 3.0.0
dotnet add package TMDbLib --version 3.0.0
NuGet\Install-Package TMDbLib -Version 3.0.0
<PackageReference Include="TMDbLib" Version="3.0.0" />
<PackageVersion Include="TMDbLib" Version="3.0.0" />
<PackageReference Include="TMDbLib" />
paket add TMDbLib --version 3.0.0
#r "nuget: TMDbLib, 3.0.0"
#:package TMDbLib@3.0.0
#addin nuget:?package=TMDbLib&version=3.0.0
#tool nuget:?package=TMDbLib&version=3.0.0
TMDbLib
A near-complete .NET wrapper for v3 of TMDb's API.
Table of Contents
Installation
Install via NuGet:
dotnet add package TMDbLib
Or for alpha packages from GitHub Packages, see the releases page.
Documentation
Most of the library is self-explaining and closely follows the official TMDb API documentation.
Examples
Basic Usage
Simple example, getting the basic info for "A Good Day to Die Hard":
using TMDbLib.Client;
var client = new TMDbClient("APIKey");
var movie = await client.GetMovieAsync(47964);
Console.WriteLine($"Movie name: {movie.Title}");
Fetching Additional Data
Using the extra features of TMDb, you can fetch more info in one request (here we fetch credits and videos):
using TMDbLib.Client;
using TMDbLib.Objects.Movies;
var client = new TMDbClient("APIKey");
var movie = await client.GetMovieAsync(47964, MovieMethods.Credits | MovieMethods.Videos);
Console.WriteLine($"Movie title: {movie.Title}");
foreach (var cast in movie.Credits.Cast)
Console.WriteLine($"{cast.Name} - {cast.Character}");
Console.WriteLine();
foreach (var video in movie.Videos.Results)
Console.WriteLine($"Trailer: {video.Type} ({video.Site}), {video.Name}");
Searching for Movies
Search for people or movies. This example searches for "007", yielding James Bond films:
using TMDbLib.Client;
using TMDbLib.Objects.General;
using TMDbLib.Objects.Search;
var client = new TMDbClient("APIKey");
var results = await client.SearchMovieAsync("007");
Console.WriteLine($"Got {results.Results.Count:N0} of {results.TotalResults:N0} results");
foreach (var result in results.Results)
Console.WriteLine(result.Title);
Working with Collections
TMDb groups related movies into collections (e.g., James Bond, Die Hard). Here's how to find and list a collection:
using TMDbLib.Client;
using TMDbLib.Objects.Collections;
using TMDbLib.Objects.General;
using TMDbLib.Objects.Search;
var client = new TMDbClient("APIKey");
var collections = await client.SearchCollectionAsync("James Bond");
Console.WriteLine($"Got {collections.Results.Count:N0} collections");
var jamesBond = await client.GetCollectionAsync(collections.Results.First().Id);
Console.WriteLine($"Collection: {jamesBond.Name}");
Console.WriteLine($"Got {jamesBond.Parts.Count:N0} James Bond movies");
foreach (var part in jamesBond.Parts)
Console.WriteLine(part.Title);
Tips
- All methods are
asyncand awaitable - Most methods are straightforward and named accordingly:
GetMovieAsync,GetPersonAsync, etc. - Almost all method enums use
[Flags], allowing you to combine them:MovieMethods.Credits | MovieMethods.Videos - TMDb returns minimal data by default; most properties on classes like
Movieare null until you request extra data using the method enums
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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. |
-
net10.0
- Newtonsoft.Json (>= 13.0.4)
- SmartAnalyzers.MultithreadingAnalyzer (>= 1.1.31)
-
net8.0
- Newtonsoft.Json (>= 13.0.4)
- SmartAnalyzers.MultithreadingAnalyzer (>= 1.1.31)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on TMDbLib:
| Package | Downloads |
|---|---|
|
WyyLib.PublicStandardLib
自己使用的一些公共库 |
GitHub repositories (8)
Showing the top 8 popular GitHub repositories that depend on TMDbLib:
| Repository | Stars |
|---|---|
|
jellyfin/jellyfin
The Free Software Media System - Server Backend & API
|
|
|
cxfksword/jellyfin-plugin-metashark
jellyfin电影元数据插件
|
|
|
ShokoAnime/ShokoServer
Repository for Shoko Server.
|
|
|
TV-Rename/tvrename
Organise your TV & Movie videos with ease
|
|
|
mregni/EmbyStat
Multiplatform statistics server for Emby server
|
|
|
crobibero/jellyfin-plugin-tmdb-trailers
|
|
|
vesoapp/veso
Open source media server.
|
|
|
SubtitleEdit/plugins
Plugins for Subtitle Edit
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 117 | 1/25/2026 |
| 2.3.0 | 49,771 | 9/15/2025 |
| 2.2.0 | 136,173 | 3/11/2024 |
| 2.1.0 | 25,136 | 12/3/2023 |
| 2.0.0 | 64,797 | 1/9/2023 |
| 1.9.2 | 76,975 | 4/27/2022 |
| 1.9.1 | 25,673 | 1/19/2022 |
| 1.8.1 | 44,377 | 4/6/2021 |
| 1.8.0 | 1,208 | 4/5/2021 |
| 1.7.6-alpha | 1,107 | 2/27/2021 |
| 1.7.5-alpha | 1,674 | 1/14/2021 |
| 1.7.4-alpha | 1,008 | 1/11/2021 |
| 1.7.3-alpha | 46,762 | 10/3/2020 |
| 1.7.2-alpha | 1,187 | 10/3/2020 |
| 1.7.1-alpha | 1,292 | 6/30/2020 |
| 1.7.0-alpha | 1,137 | 6/30/2020 |
| 1.6.0 | 19,395 | 3/12/2020 |
| 1.5.0-alpha | 1,694 | 9/12/2019 |
| 1.4.0 | 4,518 | 9/12/2019 |
| 1.4.0-alpha | 1,503 | 7/15/2019 |
| 1.3.2-alpha | 2,132 | 12/1/2018 |
| 1.3.1-alpha | 3,717 | 11/16/2018 |
| 1.3.0-alpha | 2,210 | 7/28/2018 |
| 1.2.0-alpha | 4,775 | 1/25/2018 |
| 1.1.0-alpha | 2,072 | 1/15/2018 |
| 1.0.7-alpha | 3,057 | 6/20/2017 |
| 1.0.6-alpha | 1,919 | 5/24/2017 |
| 1.0.5-alpha | 2,047 | 2/27/2017 |
| 1.0.4-alpha | 3,934 | 1/19/2017 |
| 1.0.3-alpha | 1,858 | 1/6/2017 |
| 1.0.2-alpha | 1,862 | 12/20/2016 |
| 1.0.1-alpha | 1,845 | 12/20/2016 |
| 1.0.0 | 18,380 | 10/27/2016 |
| 0.9.6-alpha | 2,060 | 8/10/2016 |
| 0.9.5-alpha | 1,903 | 8/9/2016 |
| 0.9.4-alpha | 1,904 | 8/8/2016 |
| 0.9.2-alpha | 2,350 | 8/1/2016 |
| 0.9.1.6-alpha | 2,147 | 8/1/2016 |
| 0.9.1.5-alpha | 1,915 | 7/21/2016 |
| 0.9.1.4-alpha | 3,220 | 7/20/2016 |
| 0.9.1.3-alpha | 1,887 | 7/20/2016 |
| 0.9.1.2-alpha | 1,857 | 7/18/2016 |
| 0.9.1.1-alpha | 2,401 | 7/18/2016 |
| 0.9.0.3-alpha | 1,847 | 5/19/2016 |
| 0.9.0.2-alpha | 1,942 | 4/6/2016 |
| 0.9.0.1-alpha | 2,098 | 3/1/2016 |
| 0.9.0-alpha | 5,495 | 1/20/2016 |
| 0.8.6-alpha | 2,005 | 11/18/2015 |
| 0.8.5-alpha | 1,856 | 8/27/2015 |
| 0.8.3 | 5,717 | 7/27/2015 |
| 0.8.2.4-alpha | 1,886 | 7/9/2015 |
| 0.8.2.3-alpha | 1,877 | 6/20/2015 |
| 0.8.2.2-alpha | 1,871 | 6/15/2015 |
| 0.8.2.1-alpha | 1,870 | 6/14/2015 |
| 0.8.2-alpha | 2,213 | 5/30/2015 |
| 0.8.1-alpha | 2,033 | 5/4/2015 |
| 0.8.0-alpha | 1,929 | 3/30/2015 |
| 0.7.7 | 5,255 | 4/18/2014 |
| 0.7.6 | 2,824 | 9/29/2013 |
| 0.7.4 | 2,631 | 3/7/2013 |
| 0.7.3 | 2,267 | 2/26/2013 |
| 0.7.2 | 2,265 | 2/16/2013 |
| 0.7.0 | 2,724 | 2/16/2013 |