Υποστήριξη για το The Movie Database

I am using popular movies request (/3/movie/popular) with pages (/3/movie/popular?page=1, /3/movie/popular?page=2 etc.) and API returns same movies on different pages.

curl --request GET \
     --url 'https://api.themoviedb.org/3/movie/popular?language=en-US&page=1' \
     --header 'Authorization: Bearer  TOKEN' \
     --header 'accept: application/json'

Response ends with

{
  "page": 1,
  "results": [
    .... SOME MOVIES HERE ...
    {
      "adult": false,
      "backdrop_path": "/i1Lx1Whonfh8awXkYx3bGinK2V8.jpg",
      "genre_ids": [
        28,
        53
      ],
      "id": 872542,
      "original_language": "en",
      "original_title": "Agent Game",
      "overview": "Harris, a CIA interrogator at an Agency black site, finds himself the target of a rendition operation after being scapegoated for an interrogation gone horribly wrong. As the team tasked to bring Harris in begins to question their orders -- and each other --Olsen, a senior intelligence officer, and his subordinate, Visser, raise the stakes. Now, it's up to Harris and some newfound allies to uncover the truth and turn the tables.",
      "popularity": 501.754,
      "poster_path": "/qXJFjgcV7ESRHUSxZiBA4PzRMIx.jpg",
      "release_date": "2022-04-08",
      "title": "Agent Game",
      "video": false,
      "vote_average": 5,
      "vote_count": 74
    }
  ],
  "total_pages": 42872,
  "total_results": 857421
}

and the second page

curl --request GET \
     --url 'https://api.themoviedb.org/3/movie/popular?language=en-US&page=2' \
     --header 'Authorization: Bearer  TOKEN' \
     --header 'accept: application/json'

starts with same id 872542

{
  "page": 2,
  "results": [
    {
      "adult": false,
      "backdrop_path": "/mOQV573Tr0WxI2VVOLKwtfaRGZH.jpg",
      "genre_ids": [
        10749,
        35,
        12
      ],
      "id": 949429,
      "original_language": "th",
      "original_title": "ผจญภัยล่าขุมทรัพย์หมื่นลี้",
      "overview": "Joy, a secretary at a large multinational company, has an online shopping problem, likes to read adventure novels and watch travel and adventure shows. She daydreams about living a life of adventure.",
      "popularity": 511.393,
      "poster_path": "/z3SeS4wjKQ3TjHSvRidovGJbHYb.jpg",
      "release_date": "2023-12-22",
      "title": "The Adventures",
      "video": false,
      "vote_average": 6.364,
      "vote_count": 11
    },
    {
      "adult": false,
      "backdrop_path": "/i1Lx1Whonfh8awXkYx3bGinK2V8.jpg",
      "genre_ids": [
        28,
        53
      ],
      "id": 872542,
      "original_language": "en",
      "original_title": "Agent Game",
      "overview": "Harris, a CIA interrogator at an Agency black site, finds himself the target of a rendition operation after being scapegoated for an interrogation gone horribly wrong. As the team tasked to bring Harris in begins to question their orders -- and each other --Olsen, a senior intelligence officer, and his subordinate, Visser, raise the stakes. Now, it's up to Harris and some newfound allies to uncover the truth and turn the tables.",
      "popularity": 501.754,
      "poster_path": "/qXJFjgcV7ESRHUSxZiBA4PzRMIx.jpg",
      "release_date": "2022-04-08",
      "title": "Agent Game",
      "video": false,
      "vote_average": 5,
      "vote_count": 74
    }
.... OTHER MOVIES HERE ....
  ],
  "total_pages": 42873,
  "total_results": 857454
}

Is this behaviour ok for API or I missed something in documentation?

4 απαντήσεις(στη σελίδα 1 από 1)

Jump to last post

The data in the backend is refreshed once a day but during the refresh period there can be calls to any page number. If that page isn't in the cache yet, it will get cached which means that pages can be cached with either new or old results.

We make no guarantees of this not happening, and you should not treat every page as containing unique items that haven't been returned before it.

I'd like to get a number of movie info for my academical research, but find that only 500 pages can be loaded, which are far less than my demand. If it would be possible to load more data?

If you need more than 10000 movies (500 pages), you should use the Daily export file.

@superboy97 said:

If you need more than 10000 movies (500 pages), you should use the Daily export file.

Thanks a lot. I have already solved the issue~

Δεν μπορείτε να βρείτε κάποια ταινία ή σειρά; Συνδεθείτε για να τη δημιουργήσετε.

Σε όλες τις σελίδες

s Εστίαση στη μπάρα αναζήτησης
p Άνοιγμα μενού προφίλ
esc Κλείσιμο ανοιχτού παραθύρου
? Άνοιγμα παραθύρου συντομεύσεων πληκτρολογίου

Στις σελίδες μέσων

b Επιστροφή στην προηγούμενη σελίδα(ή στην αρχική σελίδα όταν είναι εφικτό)
e Μετάβαση στη σελίδα επεξεργασίας

Στις σελίδες κύκλων σειρών

(Δεξιό βέλος) Μετάβαση στον επόμενο κύκλο
(Αριστερό βέλος) Μετάβαση στον προηγούμενο κύκλο

Στις σελίδες επεισοδίων σειρών

(Δεξιό βέλος) Μετάβαση στο επόμενο επεισόδιο
(Αριστερό βέλος) Μετάβαση στο προηγούμενο επεισόδιο

Σε όλες τις σελίδες εικόνων

a Άνοιγμα παραθύρου προσθήκης εικόνας

Σε όλες τις σελίδες επεξεργασίας

t Άνοιγμα επιλογέα μετάφρασης
ctrl+ s Υποβολή φόρμας

Στις σελίδες συζήτησης

n Δημιουργία νέας συζήτησης
w Ρύθμιση κατάστασης παρακολούθησης
p Ρύθμιση ως δημόσια/ιδιωτική
c Ρύθμιση ανοίγματος/κλεισίματος
a Άνοιγμα δραστηριότητας
r Απάντηση στη συζήτηση
l Μετάβαση στην τελευταία απάντηση
ctrl+ enter Υποβολή μηνύματος
(Δεξιό βέλος) Επόμενη σελίδα
(Αριστερό βέλος) Προηγούμενη σελίδα

Ρυθμίσεις

Θέλετε να αξιολογήσετε ή να προσθέσετε αυτό το στοιχείο σε μια λίστα;

Σύνδεση