tar.IMDb.Api
1.0.0
dotnet add package tar.IMDb.Api --version 1.0.0
NuGet\Install-Package tar.IMDb.Api -Version 1.0.0
<PackageReference Include="tar.IMDb.Api" Version="1.0.0" />
<PackageVersion Include="tar.IMDb.Api" Version="1.0.0" />
<PackageReference Include="tar.IMDb.Api" />
paket add tar.IMDb.Api --version 1.0.0
#r "nuget: tar.IMDb.Api, 1.0.0"
#addin nuget:?package=tar.IMDb.Api&version=1.0.0
#tool nuget:?package=tar.IMDb.Api&version=1.0.0
tar.IMDb.Api
Full IMDb REST API for IMDb titles.
- C# .NET Standard v2.0
- Nuget Package: https://www.nuget.org/packages/tar.IMDb.Api
Function
This library provides the following functionalities to fetch title information from IMDb:
- JSON requests
- search for titles
- particular title information plus additional filters, paging, etc.
- wrapper which contains essential title infos
- HTML requests
- main page
- reference page
Usage
There is also an example subproject to show you the usage.
JSON Requests
You can directly use the client to search for titles:
IMDbRestClient imdbRestClient = new();
var searchResults = await imdbRestClient.TitleSearch.GetSearchResultsAsync("dark kni");
Additionally, you are able to fetch particular title information directly:
string theDarkKnight = "tt0468569";
// base info
var response = await imdbRestClient.TitleViaJson.GetTitleAsync(theDarkKnight);
var theDarkKnightTitle = response.Data?.Data?.Title;
// first 50 goof entries
response = await imdbRestClient.TitleViaJson.GetGoofsAsync(theDarkKnight);
theDarkKnightTitle.Goofs = response.Data?.Data?.Title?.Goofs;
// etc..
For most JSON requests, there are additional parameters to filter or page through the results.
The parameters for most methods are:
titleId
: the id of the title on IMDbmaxNumberOfResults
: the maximum number of results (default: 50, on categories: 1, max: 250)previousEndCursor
: for paged results (should be equal to the endCursor of the previous request)showOriginalTitleText
: no clue if this has any effect, at all (default: true)
Some special parameters are:
awardsFilter
: forGetAwardNominationsAsync()
category
: filter for the particular category (get the categories beforehand to get their names)country
: forGetAggregateRatingsBreakdownAsync()
season
: forGetEpisodesAsync
plotType
: forGetPlotsAsync
type
: filter for the particular type (get the types beforehand to get their names)
The returned Response
is encapsulated within the RestResponse class which already contains all request and response information.
Content
: the received IMDb message data as JSON stringData
: the received IMDb message data as mapped objects
The overall title structure here is predefined via IMDb and filled depending on the actual request.
Json Wrapper
You can also use the provided wrapper which interally handles fetching and structuring the essential title information:
var fallout = new IMDbTitle("tt12637874");
fallout.OnUpdate += OnUpdate; // optionally register/subscribe to the update event
await fallout.FetchAsync();
// your explicit event handler method where you handle on update events
void OnUpdate(ProgressInfo progressInfo) {
// ... check and use progressInfo for own purposes ...
}
Html requests
Furthermore, you can request html pages by which also the localized title should be automatically included:
var theDarkKnightMainPage = await imdbRestClient.TitleViaHtml.GetMainPageAsync("tt0468569");
var theDarkKnightReferencePage = await imdbRestClient.TitleViaHtml.GetReferencePageAsync("tt0468569");
The downside is that this takes much longer than direct JSON requests.
The responses are again a bit different and aligned to the corresponding page content.
Product | Versions 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. |
-
.NETStandard 2.0
- HtmlAgilityPack (>= 1.11.72)
- RestSharp (>= 112.1.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0 | 111 | 2/24/2025 |