دعم الموقع

Hello...When I search for this movie name on the website: "The Secret Gifts of Christmas", it returns 1 result with the title "The Secret Gift of Christmas" (note the plural "Gifts" vs singular "Gift").

However, when I search for the same exact movie name via the API, it returns 0 results. Is there some "trick" to force the API to conduct the search exactly the same way as the website front-end does?

Here is the website results page: https://www.themoviedb.org/search?query=The%20Secret%20Gifts%20of%20Christmas

Here is the API call and response via curl:

curl --request GET \
     --url 'https://api.themoviedb.org/3/search/movie?query=The%20Secret%20Gifts%20of%20Christmas&include_adult=false&language=en-US&page=1' \
     --header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxE' \
     --header 'accept: application/json'
{
  "page": 1,
  "results": [],
  "total_pages": 1,
  "total_results": 0
}

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

Jump to last post

@playonjeff said:

Hello...When I search for this movie name on the website: "The Secret Gifts of Christmas", it returns 1 result with the title "The Secret Gift of Christmas" (note the plural "Gifts" vs singular "Gift").

However, when I search for the same exact movie name via the API, it returns 0 results. Is there some "trick" to force the API to conduct the search exactly the same way as the website front-end does?

Here is the website results page: https://www.themoviedb.org/search?query=The%20Secret%20Gifts%20of%20Christmas

Here is the API call and response via curl:

curl --request GET \
     --url 'https://api.themoviedb.org/3/search/movie?query=The%20Secret%20Gifts%20of%20Christmas&include_adult=false&language=en-US&page=1' \
     --header 'Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxE' \
     --header 'accept: application/json'
{
  "page": 1,
  "results": [],
  "total_pages": 1,
  "total_results": 0
}

Using search with API.
Plural title: The Secret Gifts of Christmas
Result: ZERO movies
Singular title: The Secret Gift of Christmas
Result: 1 movie

Using website search
The same film always appears.
Regardless of whether the search is in the plural or singular.

I believe that the WEB interface considers that there may be more typing errors in the search.
Therefore, it does not take into account whether the search word is singular or plural.
The answer also includes words in the singular and plural.

My guess?
I think it's compensating for the current custom of not giving much importance to typing text.
After all, text without commas, full stops, question marks is common.

But a fix is on the way for the next WEB 4.1 interface update.
Allow search by exact term.

It's already on Trello's To-Do list.
There is no implementation deadline.
If you want you can vote. More votes, faster. :-)
See here: https://trello.com/c/FhpxaRAx/132-support-searching-for-exact-matches

@ticao2 said: "I think it's compensating for the current custom of not giving much importance to typing text After all, text without commas, full stops, question marks is common."

If so, it would be great if the TMDB leadership could provide some sample code (or at least a description) of the logic that is implemented by the website to account for such variations in how it interacts with the API. The goal is simple: How do I use the search API to produce the exact same results as a website search for the same exact terms. That should be achievable without having to wait for the next interface update.

Any chance someone from TMDB can chime in on this one?

Here is another example where it happens. Searching for: The Man From The Diner's Club

The website handles it. The API does not. Would really love to know what pre-submission edit rules the website does on the search string to make it work better there.

@travisbell, would it be possible to document this somewhere?

And another example: Be a Rish Man

Website handles it. API does not.
There are clearly many differences/corrections that the website is making to search terms before submitting it to the search API.
It would be really really really nice to know what those are and/or how to use the API to get the same exact search results as the website.

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

عام

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

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

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

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

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

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

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

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

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

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

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

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

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

الاعدادات

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

تسجيل الدخول