Website | Forum | Documentation | TMDb 3 API


Get movie and TV show content from TMDb in a fast and simple way.

Maven Central Build Status Issues Kotlin Gradle GitHub License


This library gives access to TMDb API version 3 and 4 for mobile, desktop, and web applications. It supports Swift, Kotlin, and JavaScript by setting up as a Kotlin Multiplatform project.

This library is mainly used and supported by Moviebase.

Adding to your project

The library is available on Maven Central.


Add the Maven Central repository if it is not already there.

repositories {

To use the library in a single-platform project, add a dependency.

dependencies {

In Kotlin Multiplatform projects, add the dependency to your commonMain source-set dependencies.

commonMain {
    dependencies {


Add a dependency to the <dependencies> element.



Most of the library follows the possibilities and naming at the official TMDb documentation.

The documentation of the endpoints can be found in Version 3 and Version 4.

Get information

For getting basic information about a movie or other media content.

val tmdb = Tmdb3("apiKey")
val movieDetail = tmdb.movies.getDetails(
    movieId = 12,
    language = "DE",
    appendResponses = listOf(AppendResponse.MOVIE_CREDITS)


Search for TV shows by a query.

val tmdb = Tmdb3("apiKey")
val showPageResult =
    query = "The Expanse",
    page = 1,
    language = "DE",
    region = "US",
    includeAdult = false


Discover a movie or TV show by the discover parameter class.

val discover = TmdbDiscover.Movie(
    sortBy = TmdbDiscoverMovieSortBy.POPULARITY,
    sortOrder = TmdbSortOrder.DESC,
    voteAverageGte = 5,
    voteCountGte = 200,
    releaseDate = TmdbDiscoverTimeRange.BetweenYears(from = 2020, to = 2021)

val discoverPageResult =
    page = 1,
    region = "DE",
    language = "de",
    discover = discover

Alternatively, use predefined discover categories like upcoming, networks or on streaming.

val discoverCategory = DiscoverCategory.OnStreaming.Netflix(
    mediaType = TmdbMediaType.MOVIE,
    watchRegion = "DE"

val result =
    page = 1,
    region = "DE",
    language = "de",
    category = discoverCategory

Build image URL

You can build an image URL via the poster file path and size key. More information on the TMDb images site.

val url ="nBNZadXqJSdt05SHLqgT0HuC5Gm.jpg", "w154")

Or create the URL by an image class with the best matched width/height.

val url = = movie.posterImage, width = 200, height = 300)

For creating the poster URL by the movie item.

val url = TmdbImageUrlBuilder.buildPoster(item = movie, width = 200)

This library uses the TMDb but is not endorsed or certified by TMDb. These services are licensed under CC BY-NC 4.0.