-
An user was searching for "Metropolis" via API and got: This will return {
"title": "Metropolis",
"year": 1927
"ids": {
"imdb": "tt0017136",
"slug": "metropolis-1927",
"tmdb": 19,
"trakt": 15
},
} Usually, to redirect an user to the HTML detail page on trakt, i use The web search for TraktId 15 For some yet unknown reason, this case works by adding a leading zero |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The API prefers IDs and the website prefers slugs as the first thing it searches. The API is easily able to get the IDs which is why it's the preference there. This section in the API docs explains it in more detail: https://trakt.docs.apiary.io/#introduction/website-media-links So in your case, I recommend using this URL for the redirect: |
Beta Was this translation helpful? Give feedback.
The API prefers IDs and the website prefers slugs as the first thing it searches. The API is easily able to get the IDs which is why it's the preference there. This section in the API docs explains it in more detail: https://trakt.docs.apiary.io/#introduction/website-media-links
So in your case, I recommend using this URL for the redirect:
/search/trakt/:id?id_type=movie