Hi there, I'm fetching keyword data from the API, but each query returns an array with maximum of 20 results. Is there a way of getting the whole results? It's a React.js app, here's my code:
const fetchKeywords = (query) => {
axios
.get(`https://api.themoviedb.org/3/search/keyword`, {
params: {
api_key: apiKey,
query: query,
},
})
.then((response) => {
setKeywords(response.data.results);
console.log(response.data.results);
})
.catch((error) => {
console.error(error);
});
};
Thanks in advance.
لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها
هل تريد تقييم او اضافة هذا العنصر للقائمة؟
لست عضو؟
رد بواسطة Travis Bell
بتاريخ نوفمبر 1, 2023 في 5:28 مساءا
Hi @vitorary90,
We do not support setting a customer page size. All of our "list" API's are limited to 20 results per page.
Cheers.
رد بواسطة vitorary90
بتاريخ نوفمبر 1, 2023 في 6:25 مساءا
I wasn't aware of the "page" parameter, I thought there was only one array with 20 elements returned, but that is for page 1. My bad. Thanks for the feedback, Travis.