دعم الموقع

I am currently exploring the capabilities of your API and have a few questions about implementing advanced search functionalities. Specifically, I would like to understand how to use the API for:

Searching movies by cast name (e.g., "List all movies of Salman Khan").
Filtering movies by genre in conjunction with cast (e.g., "List all action movies of Salman Khan").
Searching for movies involving multiple cast members (e.g., "List all movies featuring both Salman Khan and Katrina Kaif").
Utilizing AI-based natural language queries to search for movies, such as "List all action movies of Salman Khan."
Could you please guide me on the appropriate API endpoints, parameters, or request formats for achieving these functionalities? Additionally, if there are specific examples or documentation available for similar use cases, I would appreciate it if you could share those.

Thank you for your time and assistance. I look forward to your response.

5 ردود (على هذه الصفحة 1 من 1)

Jump to last post

@sandipsmahajan said:

I am currently exploring the capabilities of your API and have a few questions about implementing advanced search functionalities. Specifically, I would like to understand how to use the API for:

I will number and order the questions to make my answer easier.

1 - Searching movies by cast name (e.g., "List all movies of Salman Khan").
2 - Searching for movies involving multiple cast members (e.g., "List all movies featuring both Salman Khan and Katrina Kaif").
3 - Filtering movies by genre in conjunction with cast (e.g., "List all action movies of Salman Khan").

4 - Utilizing AI-based natural language queries to search for movies, such as "List all action movies of Salman Khan."
Could you please guide me on the appropriate API endpoints, parameters, or request formats for achieving these functionalities?

5 - Additionally, if there are specific examples or documentation available for similar use cases, I would appreciate it if you could share those.

Thank you for your time and assistance. I look forward to your response.

1 - Searching movies by cast name (e.g., "List all movies of Salman Khan").
2 - Searching for movies involving multiple cast members (e.g., "List all movies featuring both Salman Khan and Katrina Kaif").

Using Discover
https://developer.themoviedb.org/reference/discover-movie
Using the &with_cast= filter
You can use one Person ID or multiple Person IDs separated by commas.
Read the explanation at the beginning of the page:
AND/OR Logic

For example:
Salman Khan (there are several with the same name)
https://www.themoviedb.org/person/42802-salman-khan
Person ID 42802
Parameter
&with_cast=42802

Salman Khan and Katrina Kaif (There is more than one Katrina Kaif)
https://www.themoviedb.org/person/81869-katrina-kaif
Person ID 81869
Parameter
&with_cast=42802,81869

API Request Example
https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=en-US&page=1&with_cast=42802,81869

Let me know here if it worked.

3 - Filtering movies by genre in conjunction with cast (e.g., "List all action movies of Salman Khan").

In addition to the filter I explained earlier, also use the filter &with_genres=
The logic is the same.
In this case, Action has the ID 28.
You can also use more than one genre ID separated by commas.
See this link for the list of genre IDs.
https://developer.themoviedb.org/reference/genre-movie-list

Example with 2 actors and one genre:
https://api.themoviedb.org/3/discover/movie?api_key=THE_KEY&language=en-US&page=1&with_cast=42802,81869&with_genres=28

4 - Utilizing AI-based natural language queries to search for movies, such as "List all action movies of Salman Khan."
Could you please guide me on the appropriate API endpoints, parameters, or request formats for achieving these functionalities?

I believe my two previous answers answer your question.
If they don't, please ask in more detail.

5 - Additionally, if there are specific examples or documentation available for similar use cases,
I would appreciate it if you could share those.

Basically, we have the Documentation, the DOCs.
https://developer.themoviedb.org/docs/getting-started
https://developer.themoviedb.org/reference/intro/getting-started
I suggest you spend some time browsing through the documentation.
And testing it using the "Try it!" feature on the right side of the pages.

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول