Поддръжка на The Movie Database

I coded a basic movie collection management system in python, for my own use. It's based on the tmdb API but mostly on cinemagoer (which fetches data from the imdb). Everything in my database is stored using imdb-ids (both for persons and for movies).

One of the most important features in my little software is the ability to find a person, and list all movies by that person in a specific capacity ("director", "screenwriter", "cast"). The ability to do that has been broken in cinemagoer for a few months, so I was thinking I was going to rewrite that using the TMDB api. I can neatly convert the imdb-id nm.... of a person to the tmdb-id of that person, and retrieve all movies by that person from tmdb, with his/her capacity, that's nice. But the trouble is that the list comes with only the tmdb-ids of the movies, and I have to make a separate call to the tmdb-api to convert these tmdb-ids to imdb-ids , which can take a little too long for people with long filmographies.

Do you know if there's a way to request the filmography of a person in tmdb and receive a list directly with the imdb-ids of the movies.

Thank you

(And thank you for providing us with a stable reliable API !!!)

3 отговора (на страница 1 от общо 1)

Jump to last post

The TMDB API provides a convenient /find endpoint that allows you to search for:

  • Movies
  • TV Series
  • People

All you need is the IMDb ID and your API key.

Endpoint

https://api.themoviedb.org/3/find/{external_id}?api_key={YOUR_API_KEY}&external_source=imdb_id

Examples

1. Finding a Movie

Request:

https://api.themoviedb.org/3/find/tt1630029?api_key={YOUR_API_KEY}&external_source=imdb_id

Response:

{
    "movie_results": [
        {
            "backdrop_path": "/8rpDcsfLJypbO6vREc0547VKqEv.jpg",
            "id": 76600,
            "title": "Avatar: The Way of Water",
            "original_title": "Avatar: The Way of Water",
            "overview": "Set more than a decade after the events of the first film, learn the story of the Sully family (Jake, Neytiri, and their kids), the trouble that follows them, the lengths they go to keep each other safe, the battles they fight to stay alive, and the tragedies they endure.",
            "poster_path": "/t6HIqrRAclMCA60NsSmeqe9RmNV.jpg",
            "media_type": "movie",
            "adult": false,
            "original_language": "en",
            "genre_ids": [
                878,
                12,
                28
            ],
            "popularity": 25.1142,
            "release_date": "2022-12-14",
            "video": false,
            "vote_average": 7.607,
            "vote_count": 12406
        }
    ],
    "person_results": [],
    "tv_results": [],
    "tv_episode_results": [],
    "tv_season_results": []
}

2. Finding a TV Series

Request:

https://api.themoviedb.org/3/find/tt0944947?api_key={YOUR_API_KEY}&external_source=imdb_id

Response:

{
    "movie_results": [],
    "person_results": [],
    "tv_results": [
        {
            "backdrop_path": "/zZqpAXxVSBtxV9qPBcscfXBcL2w.jpg",
            "id": 1399,
            "name": "Game of Thrones",
            "original_name": "Game of Thrones",
            "overview": "Seven noble families fight for control of the mythical land of Westeros. Friction between the houses leads to full-scale war. All while a very ancient evil awakens in the farthest north. Amidst the war, a neglected military order of misfits, the Night's Watch, is all that stands between the realms of men and icy horrors beyond.",
            "poster_path": "/1XS1oqL89opfnbLl8WnZY1O1uJx.jpg",
            "media_type": "tv",
            "adult": false,
            "original_language": "en",
            "genre_ids": [
                10765,
                18,
                10759
            ],
            "popularity": 167.5646,
            "first_air_date": "2011-04-17",
            "vote_average": 8.5,
            "vote_count": 24768,
            "origin_country": [
                "US"
            ]
        }
    ],
    "tv_episode_results": [],
    "tv_season_results": []
}

3. Finding a Person

Request:

https://api.themoviedb.org/3/find/nm3592338?api_key={YOUR_API_KEY}&external_source=imdb_id

Response:

{
    "movie_results": [],
    "person_results": [
        {
            "id": 1223786,
            "name": "Emilia Clarke",
            "original_name": "Emilia Clarke",
            "media_type": "person",
            "adult": false,
            "popularity": 5.7559,
            "gender": 1,
            "known_for_department": "Acting",
            "profile_path": "/wb8VfDPGpyqcFltnRcJR1Wj3h4Z.jpg",
            "known_for": [
                {
                    "backdrop_path": "/3WK7p9EdZmmvB1IbB2Vw9Rf4lXH.jpg",
                    "id": 296096,
                    "title": "Me Before You",
                    "original_title": "Me Before You",
                    "overview": "A small town girl is caught between dead-end jobs. A high-profile, successful man becomes wheelchair bound following an accident. The man decides his life is not worth living until the girl is hired for six months to be his new caretaker. Worlds apart and trapped together by circumstance, the two get off to a rocky start. But the girl becomes determined to prove to the man that life is worth living and as they embark on a series of adventures together, each finds their world changing in ways neither of them could begin to imagine.",
                    "poster_path": "/Ia3dzj5LnCj1ZBdlVeJrbKJQxG.jpg",
                    "media_type": "movie",
                    "adult": false,
                    "original_language": "en",
                    "genre_ids": [
                        18,
                        10749
                    ],
                    "popularity": 14.4021,
                    "release_date": "2016-06-01",
                    "video": false,
                    "vote_average": 7.928,
                    "vote_count": 12583
                },
                {
                    "backdrop_path": "/wvlIoof1FnKPLv9jAYanuP31V0C.jpg",
                    "id": 87101,
                    "title": "Terminator Genisys",
                    "original_title": "Terminator Genisys",
                    "overview": "The year is 2029. John Connor, leader of the resistance continues the war against the machines. At the Los Angeles offensive, John's fears of the unknown future begin to emerge when TECOM spies reveal a new plot by SkyNet that will attack him from both fronts; past and future, and will ultimately change warfare forever.",
                    "poster_path": "/oZRVDpNtmHk8M1VYy1aeOWUXgbC.jpg",
                    "media_type": "movie",
                    "adult": false,
                    "original_language": "en",
                    "genre_ids": [
                        878,
                        28,
                        53,
                        12
                    ],
                    "popularity": 12.5881,
                    "release_date": "2015-06-23",
                    "video": false,
                    "vote_average": 5.9,
                    "vote_count": 8515
                },
                {
                    "backdrop_path": "/zZqpAXxVSBtxV9qPBcscfXBcL2w.jpg",
                    "id": 1399,
                    "name": "Game of Thrones",
                    "original_name": "Game of Thrones",
                    "overview": "Seven noble families fight for control of the mythical land of Westeros. Friction between the houses leads to full-scale war. All while a very ancient evil awakens in the farthest north. Amidst the war, a neglected military order of misfits, the Night's Watch, is all that stands between the realms of men and icy horrors beyond.",
                    "poster_path": "/1XS1oqL89opfnbLl8WnZY1O1uJx.jpg",
                    "media_type": "tv",
                    "adult": false,
                    "original_language": "en",
                    "genre_ids": [
                        10765,
                        18,
                        10759
                    ],
                    "popularity": 167.5646,
                    "first_air_date": "2011-04-17",
                    "vote_average": 8.5,
                    "vote_count": 24768,
                    "origin_country": [
                        "US"
                    ]
                }
            ]
        }
    ],
    "tv_results": [],
    "tv_episode_results": [],
    "tv_season_results": []
}

Additional Resources

For more information, check out the original discussion: TMDB Talk

Full API documentation: TMDB Developer Reference

Unless I'm mistaken, this does not answer my question, which is basically : how do I obtain the imdb-ids (not tmdb-ids) of all N movies by Orson Welles, without having to resort to at least N API calls?

In my local database (simplifying it a little bit), I have a table containing one row per video file in my collection, with a field containing the path and another field containing the imdb-id. I have a functionality (now broken due to cinemagoer not being able to parse imdb data) that lets you query for a director, list all movies by that director with a green flag if I have the movie in my collection and a red flag if I don't. But I only have the imdb-id of my movies, not the tmdb-id. So, if I want to replicate this functionality, I'll have to call the API for each movie by that director (then I can store the tmdb-id alongside the imdb-id in my database, and I won't need to do it the next time, ok, but my collection is... let's say on the heavy side and calling the API for every single movie in my collection would be somewhat lengthy).

@grocovid said:
IMDBId-based filmography
Do you know if there's a way to request the filmography of a person in tmdb
and receive a list directly with the imdb-ids of the movies.
Thank you
(And thank you for providing us with a stable reliable API !!!)

3 days ago I looked into your issue.
I didn't find a solution.
I don't think there is an API request with this data together.
The response for "Combined Credits" doesn't have an IMDB ID.
I checked "Discover Movie" using the filter "with_cast" and then "with_crew", but the response is the same, without an IMDB ID.

My collection only has 3,000 movies.
All with NFO generated by MediaElch.
The program, MediaElch, has a good data export feature.
It would be a solution to generate a list with both IDs.

Не можете да откриете филм или сериал? Влезте, за да го създадете.

Глобални

s фокусиране на лентата за търсене
p отваряне на меню "Профил"
esc затваряне на отворен прозорец
? отваряне на прозореца за клавишните комбинации

На страниците за медиите

b връщане назад
e към страницата за редактиране

На страниците за сезони

(стрелка надясно) към следващ сезон
(стрелка наляво) към предишния сезон

На страниците за епизоди

(стрелка надясно) към следващ епизод
(стрелка наляво) предишен епизод

На всички страници за изображения

a отваряне на прозорец за добавяне на изображение

На всички страници за редактиране

t меню за избор на език, на превода
ctrl+ s изпращане на форма

На страниците за дискусия

n създаване на нова дискусия
w статус на наблюдаване
p публична/лична
c затваряне/отваряне
a отваряне на действия
r отговаряне в дискусия
l към последния отговор
ctrl+ enter изпращане на вашето съобщение
(стрелка надясно) следваща страница
(стрелка наляво) предишна страница

Настройки

Искате ли да го оцените или добавите към списък?

Вход