Soporte de The Movie Database

Hey everyone,

I'm developing a small clone of themovieDB in react js.

I noticed one thing what looks awesome pagination. How would I go about requesting more data from the API without encountering duplicates ? By default it looks like 20 but I see like 99 + pages on the movies and tv section.

How could I accomplish this ?

Any form of feedback related to this would be awesome

Cheers,

Alex

3 respuestas (en la página 1 de 1)

Jump to last post

Hi Alex,

What kind of request are you looking to make? A paginated request looks like the following:

https://api.themoviedb.org/3/movie/popular?api_key=###&page=1
https://api.themoviedb.org/3/movie/popular?api_key=###&page=2
https://api.themoviedb.org/3/movie/popular?api_key=###&page=3

Etc.

Each page contains 3 fields useful for pagination, page, total_results and total_pages. You can make your own choices about what to do with the available pages. One more thing to note, we only let you access up to page 1000 (the top 20,000 items) of any request.

Cheers.

I'm using v4 Lists and have a list with 144 items in it. I'm trying to pull the entire list results into a Google sheet but I'm only getting 20 of the 144 items. Is there a way to pull all the results via v4 API (eg. 'page=all' or something to this effect), or do I have to make a specific GET request for each of the 8 pages?

Hi @tylerkinglee,

Unfortunately, no. You have to page through each page like I show above.

¿No encuentras una película o serie? Inicia sesión para crearla:

Global

s centrar la barra de búsqueda
p abrir menú de perfil
esc cierra una ventana abierta
? abrir la ventana de atajos del teclado

En las páginas multimedia

b retrocede (o a padre cuando sea aplicable)
e ir a la página de edición

En las páginas de temporada de televisión

(flecha derecha) ir a la temporada siguiente
(flecha izquierda) ir a la temporada anterior

En las páginas de episodio de televisión

(flecha derecha) ir al episodio siguiente
(flecha izquierda) ir al episodio anterior

En todas las páginas de imágenes

a abrir la ventana de añadir imagen

En todas las páginas de edición

t abrir la sección de traducción
ctrl+ s enviar formulario

En las páginas de discusión

n crear nueva discusión
w cambiar el estado de visualización
p cambiar público/privado
c cambiar cerrar/abrir
a abrir actividad
r responder a la discusión
l ir a la última respuesta
ctrl+ enter enviar tu mensaje
(flecha derecha) página siguiente
(flecha izquierda) página anterior

Configuraciones

¿Quieres puntuar o añadir este elemento a una lista?

Iniciar sesión