תמיכת The Movie Database

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.

2 תגובות (בדף 1 מתוך 1)

Jump to last post

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.

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.

.לא מצאת סרט או סדרה? היכנס כדי ליצור אותם

עולמי

s התמקד בשורת החיפוש
p פתח תפריט פרופיל
esc סגור חלון פתוח
? פתח חלון קיצורי דרך של מקלדת

בדפי מדיה

b לך חזרה (או אל הורה אם ישים)
e לך אל דף עריכה

בדפי עונות

(חץ ימני) לך אל העונה הבאה
(חץ שמאלי) לך אל העונה הקודמת

בדפי סדרות

(חץ ימני) לך אל הפרק הבא
(חץ שמאלי) לך אל הפרק הקודם

בכל דפי תמונה

a פתח חלון הוספת תמונה

בכל דפי עריכה

t פתח בוחר תרגום
ctrl+ s הגש טופס

בדפי דיון

n צור דיון חדש
w עורר מעמד צפייה
p עורר ציבורי/פרטי
c עורר סגירה/פתיחה
a פתח פעילות
r השב אל דיון
l לך אל תשובה אחרונה
ctrl+ enter הגש את הודעתך
(חץ ימני) הדף הבא
(חץ שמאלי) הדף הקודם

הגדרות

?רוצה לדרג או להוסיף פריט אל רשימה

היכנס