Endpoints
GET
/api?t=movie&q=<tmdb_id>
Retourne le détail TMDB complet d'un film + note IMDb fusionnée.
Paramètres
| Param | Type | Requis | Description |
t | string | oui | Doit être movie |
q | integer | oui | ID TMDB du film |
Exemple
curl 'https://tmdb.uklm.xyz/api?t=movie&q=27205'
Réponse (extrait)
{
"id": 27205,
"title": "Inception",
"original_title": "Inception",
"imdb_id": "tt1375666",
"release_date": "2010-07-15",
"runtime": 148,
"vote_average": 8.4,
"vote_count": 39044,
"note_imdb": "8.8",
"vote_imdb": "2809792",
"budget": 160000000,
"revenue": 839030630,
"tagline": "Votre esprit abrite la scène du crime.",
"overview": "Dom Cobb est un voleur expérimenté…",
"genres": [{"id": 28, "name": "Action"}, …],
"production_countries": [{"iso_3166_1": "US", …}],
"poster_path": "/aej3LRUga5rhgkmRP6XMFw3ejbl.jpg",
"external_ids": {…},
"credits": {…},
"images": {…},
"videos": {…},
"translations": {…}
}
Le format complet correspond à l'objet TMDB /movie/{id}?append_to_response=credits,external_ids,release_dates,translations,images,videos avec note_imdb et vote_imdb ajoutés.
GET
/api?t=tv&q=<tmdb_id>
Idem pour les séries. imdb_id est dans external_ids.imdb_id pour les séries.
Exemple
curl 'https://tmdb.uklm.xyz/api?t=tv&q=1408'
Champs supplémentaires propres aux séries : seasons, aggregate_credits, first_air_date, last_air_date, name, original_name.
GET
/api?t=imdb&q=<imdb_id>
Lookup direct par IMDb ID. Renvoie le détail movie ou tv correspondant. Tente movie d'abord, puis tv.
Paramètres
| Param | Type | Requis | Description |
t | string | oui | Doit être imdb |
q | string | oui | IMDb ID au format tt0133093 |
Exemple
curl 'https://tmdb.uklm.xyz/api?t=imdb&q=tt0133093'
# → renvoie l'objet complet de Matrix (TMDB 603)
Si non trouvé
{"error": "IMDb id not found in local mappings"}
GET
/api?t=providers&type=<movie|tv>&q=<tmdb_id>
Watch providers JustWatch par pays (FR, US, GB, etc.) — données du endpoint TMDB /watch/providers.
Paramètres
| Param | Type | Requis | Description |
t | string | oui | Doit être providers |
type | string | oui | movie ou tv |
q | integer | oui | ID TMDB |
Exemple
curl 'https://tmdb.uklm.xyz/api?t=providers&type=movie&q=603'
Réponse
{
"id": 603,
"results": {
"FR": {
"link": "https://www.themoviedb.org/movie/603/watch?locale=FR",
"flatrate": [
{"provider_id": 8, "provider_name": "Netflix", "logo_path": "/…"},
…
],
"rent": [...],
"buy": [...]
},
"US": {…},
…
}
}
Catégories possibles par pays : flatrate (abonnement), rent, buy, free, ads.
GET
/api?t=search&q=<requête>
Recherche par titre + année + épisode. Parsing intelligent de la requête :
- Année extraite via regex
(19|20)\d{2} en excluant 1080 et 2160
- Épisode reconnu :
SxxExx, Sxx, partN, NxN, Exxx
- Présence d'un épisode → bascule en mode
tv, sinon movie
- Distance Levenshtein UTF-8 sur titres FR / EN / VO, tri par score → popularité → écart d'année
Exemples
curl 'https://tmdb.uklm.xyz/api?t=search&q=Inception%202010'
curl 'https://tmdb.uklm.xyz/api?t=search&q=Mr.Robot.S01E02'
curl 'https://tmdb.uklm.xyz/api?t=search&q=Coeur%20de%20Pirate%202019'
Réponse
{
"results": [
{
"title": "Inception",
"english_title": "Inception",
"original_title": "Inception",
"years": 2010,
"poster": "https://image.tmdb.org/t/p/w200/aej3LRUga5rhgkmRP6XMFw3ejbl.jpg",
"poster_path": "/aej3LRUga5rhgkmRP6XMFw3ejbl.jpg",
"genres": "Action Science-Fiction Aventure ",
"countries": "GB US ",
"runtime": "2 h 28 min",
"imdb_id": "tt1375666",
"imdb_url": "https://www.imdb.com/title/tt1375666",
"note_imdb": 8.8,
"vote_imdb": 2809792,
"tmdb_id": 27205,
"tmdb_url": "https://www.themoviedb.org/movie/27205",
"api_url": "https://tmdb.uklm.xyz/api?t=movie&q=27205",
"note_tmdb": 8.4,
"vote_tmdb": 39044,
"budget": "$160,000,000",
"revenue": "$839,030,630",
"tagline": "Votre esprit abrite la scène du crime.",
"overview": "Dom Cobb…"
},
…
]
}
Réponses cachées en mémoire (LRU 1000 entrées, TTL 1 h). Premier appel ~1 s, suivants ~10 ms.
GET
/search?query=<requête>
Même recherche, mais rendue en HTML (vignettes posters + panneaux d'info inline). Compat avec l'ancien search.php.
curl 'https://tmdb.uklm.xyz/search?query=Inception%202010'
Liveness/readiness JSON. 200 si l'index IMDb est chargé, 503 sinon.
{
"status": "ok",
"uptime": 86400,
"pid": 12345,
"node": "v22.18.0",
"memory_mb": 943,
"imdb_ratings": 1664245
}
Exempté du rate limit.
Format Prometheus standard. Métriques exposées :
http_requests_total{method, route, status} — counter
http_request_duration_seconds{method, route, status} — histogram
search_cache_hits_total, search_cache_misses_total
imdb_ratings_total, search_workers{type}
- Métriques process Node par défaut (CPU, RSS, heap, event loop lag, GC)
Vue humaine disponible sur /admin (onglet Métriques). Exempté du rate limit.