Page 1 of 1

JSON API Search for Subtitle behavior

Posted: Mon Feb 27, 2023 3:44 am
by wcominski
Hello,
I am having an odd behavior with the search for subtitle API url.

I am using the website https://opensubtitles.stoplight.io/docs ... -subtitles to build my request however when I specify an episode_number i get no results. At first i thought the issue was that my result set didn't have the episode I specified in the search criteria; however, the result count is 22 items and I found at least 2 episode 1s.

its possible it is something im doing wrong; maybe there is a field i am not specifying along with the episode number. Hence Im here looking for help.

Here is my test, i do have an API key i just removed it from the URL.

>> Works

Code: Select all

curl --request GET \ --url 'https://api.opensubtitles.com/api/v1/subtitles?languages=en&parent_imdb_id=2480514&parent_tmdb_id=46746&season_number=1' \ --header 'Api-Key: FAKE_PAI_KEY_HERE' \ --header 'Content-Type: application/json'
>>Does not return any data ( Content-length = 0 )

Code: Select all

curl --request GET \ --url 'https://api.opensubtitles.com/api/v1/subtitles?languages=en&parent_imdb_id=2480514&parent_tmdb_id=46746&season_number=1&episode_number=1' \ --header 'Api-Key: FAKE_API_KEY_HERE' \ --header 'Content-Type: application/json'

I have tried this on the default and VIP servers and i get the same behavior.

Your help is appreciated.

Re: JSON API Search for Subtitle behavior

Posted: Wed Mar 01, 2023 5:09 am
by wcominski
I have retested
Looks like a bug to me.
SeemsLikeAbug.png
SeemsLikeAbug.png (140.35 KiB) Viewed 3512 times

Re: JSON API Search for Subtitle behavior

Posted: Wed Mar 01, 2023 5:31 am
by wcominski
One more find,

Looks like specifying type as
episode
breaks it as well.

according to https://opensubtitles.stoplight.io/docs ... Parameters

type is supposed to accept all, movie, episode with the default being all.

Re: JSON API Search for Subtitle behavior

Posted: Wed Mar 01, 2023 1:57 pm
by oss
everything work, just specify --location to follow redirects. I will put big big red warning on DOCS, because it seems it is not enough to have there in big big red "Something wrong? Read about common mistakes and best practices"

Re: JSON API Search for Subtitle behavior

Posted: Thu Mar 02, 2023 10:16 pm
by wcominski
Image

Re: JSON API Search for Subtitle behavior

Posted: Sat Aug 05, 2023 12:10 pm
by riyajain
Hii,
please, explain me how we find imdb_id and tmdb_id by movies name.

Re: JSON API Search for Subtitle behavior

Posted: Sat Aug 05, 2023 3:41 pm
by oss
like this:

curl --request GET \
--url 'https://api.opensubtitles.com/api/v1/fe ... ery=matrix' \
--header 'Api-Key: <YOURAPIKEY>'