Supporto The Movie Database

Hi,

Had a couple of questions for my usecase. Firstly wanted to say love the support and the API, really appreciative to the amazing developers and community contributors!!!

Context:
Building a website with rows of content from discover endpoint and each row has poster.

Calling discover endpoint for each row.

I need to call details endpoint for each poster in the row for following parameters:
english_backdrop: Since the posters are horizontal with no embedded title, I need the English backdrop for each poster. I append to response the image endpoint
Runtime: On hover for movies I show runtime
Seasons: On hover for shows I show seasons
Genre / Date are also shown on hover but I can get from initial discover response.

Issues / Questions: I have roughly 25 rows with 20 posters each - so total of 25 discover + (25 * 20 details) = 525 requests per page per user. This is obviously higher than the limit of 50 requests per second.

  1. Can I rely on the rate issue 525 error to wait? So for each of my posters I call details endpoint and if I get a 425 wait 1 seconds, keep doing this until I get response or error.

    • Would this potentially get me blocked / slowed down even more for abuse? I'm not sure what the CDN would think if every user gets rate limited for 10 seconds straight.
  2. Secondly, seems like the API rate limits are per IP address. But my requests are sent via cloud functions to prevent users from seeing my API key. Wouldn't that mean that there's only 1 IP address, my server IP?

    • This would mean that in the 10 seconds that user 1 is getting results, they block all other users from calling TMDb since its all from the same IP.
    • Is this accurate + are there any workarounds / solutions?

Suggestions / Feature Requests:

  • Mainly asking for workarounds, but this issue could be entirely solved with either a batching solution for details endpoint, or an append_to_response for discover endpoint.
    • GraphQL implementation would also be very helpful - this forum here have people volunteering to take care of the GraphQL schema: link.
    • I do need to call the details endpoint for every single content just to get english backdrop. I would just refactor other details properties like runtime / seasons if I could get english backdrop for discover.
    • As an example, this would reduce my calls from 525 requests per page to only 25. Also would greatly reduce response payload for each row from (entire discover payload + (content payload * 20) to (entire discover payload + (3 properties of each content * 20)

Thank you!

6 risposte (nella pagina 1 di 1)

Jump to last post

A reminder.
In a standard Discover response, you already receive the film's Poster and Backdrop, in the specified language.

https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=pt-BR&page=1

Maybe it will help to reduce the number of Requests.

      "adult": false,
      "backdrop_path": "/xgGGinKRL8xeRkaAR9RMbtyk60y.jpg",
      "genre_ids": [
        16,
        10751,
        10402,
        14,
        35
      ],
      "id": 901362,
      "original_language": "en",
      "original_title": "Trolls Band Together",
      "overview": "Depois de dois filmes de amizade verdadeira e paquera implacável, Poppy e Tronco agora são oficialmente, finalmente, um casal! À medida que se aproximam, Poppy descobre que Tronco tem um passado secreto.",
      "popularity": 1745.484,
      "poster_path": "/7mC4iunNnWrHIBamKqiHkpFI32X.jpg",
      "release_date": "2023-10-12",
      "title": "Trolls 3 - Juntos Novamente",
      "video": false,
      "vote_average": 7.2,
      "vote_count": 283

I leave your other questions to someone with more knowledge to answer.

Yes that makes sense but most of the time its no language - I think it just gets the most popular. I have to make sure that its English because I am not showing the content title in my poster.

So what I'm doing now is appending images to details endpoint and filtering all backdrops to only ones with english

but this requires details endpoint

@Respearme said:
Yes that makes sense but most of the time its no language - I think it just gets the most popular.
I have to make sure that its English because I am not showing the content title in my poster.
So what I'm doing now is this:
but this requires details endpoint

It may be best to specify in detail what data you need that is not in the initial Discover API Request.
If possible, separate the list for film and series.
Untitled Poster
Untitled Backdrop (usually they are already untitled)
Duration
ETC... ​

Here is the data I need for initial Discover endpoint:

Both Movies and Shows: Backdrop - English if available, if not then untitled (Right now Discover doesn't give this so I need to call details endpoint)

Movies: Runtime

Shows: Seasons count

@Respearme said:
Here is the data I need for initial Discover endpoint:
Both Movies and Shows: Backdrop - English if available, if not then untitled (Right now Discover doesn't give this so I need to call details endpoint)

Movies
I'm not entirely sure, but I believe that in the case of Backdrop, the response prefers the one with a title in the specified language and, if it doesn't exist, it sends the one without a title.

TV Show
I do not remember. But probably the same rule.
I would need to take a test. Or you do it yourself.

Movies: Runtime

Need Details.

Shows: Seasons count

Need Details.

Yes I've tested everything and need details for it all. That's why I asked the 2 questions above about workarounds / solutions.

Also would love some sort of batch send / append to response solution to greatly reduce payload + number of requests.

Non riesci a trovare un film o una serie Tv? Accedi per crearlo.

Globale

s focalizza la barra di ricerca
p apri menu profilo
esc chiudi una finestra aperta
? apri finestra scorciatoia tastiera

Su tutte le pagine di media

b torna indietro (o al precedente quando applicabile)
e vai alla pagina di modifica

Nelle pagine delle stagioni TV

(freccia destra) vai alla stagione successiva
(freccia sinistra) vai alla stagione precedente

Nelle pagine degli episodi TV

(freccia destra) vai all'episodio successivo
(freccia sinistra) vai all'episodio precedente

Su tutte le pagine di immagini

a apri finestra aggiungi immagine

Su tutte le pagine di modifica

t apri selettore traduzione
ctrl+ s invia modulo

Sulle pagine di discussione

n crea nuova discussione
w segna come visto/non visto
p cambia publico/privato
c cambia chiuso/aperto
a apri attivita
r rispondi alla discussione
l vai all'ultima risposta
ctrl+ enter invia il tuo messaggio
(freccia destra) pagina successiva
(freccia sinistra) pagina precedente

Impostazioni

Vuoi valutare o aggiungere quest'elemento a una lista?

Accedi