Page 2 of 7

Re: [NEW] REST search, JSON results

Posted: Sat Jul 21, 2018 12:17 am
by mntgoat
Is there a way to pass the year field on this new api like on the old one?

Is it really necessary to pass file size and hash together? can I just pass file size?

Thanks.

Re: [NEW] REST search, JSON results

Posted: Sat Jul 21, 2018 12:31 pm
by oss
Hi, it should work same as for xml-rpc SearchSubtitles(). If I am not mistaken, over there is also not allowed using filesize only function, it is because how the indexes in db are made, it is slower than using hash. MovieYear is also not accepted.

Re: [NEW] REST search, JSON results

Posted: Thu Aug 09, 2018 4:11 am
by mntgoat
Is it possible to perform a search with movie name, hash and file size and have it return everything not just the ones that match file size and hash?

Thanks.

Re: [NEW] REST search, JSON results

Posted: Tue Aug 21, 2018 12:24 pm
by oss
Hi,

you have to search by moviename (1st query) and then hash and filesize (2nd query)

Re: [NEW] REST search, JSON results

Posted: Tue Aug 21, 2018 6:41 pm
by mntgoat
Hi,

you have to search by moviename (1st query) and then hash and filesize (2nd query)
Will try it. Thanks.

Re: [NEW] REST search, JSON results

Posted: Tue Aug 21, 2018 7:03 pm
by mntgoat
Hi,

you have to search by moviename (1st query) and then hash and filesize (2nd query)
Just to be clear, are you suggesting I make two searches or that I rearrange the search parameters?

For example on this search:

https://rest.opensubtitles.org/search/m ... uageid-eng

only gives me results with the exact hash, but this other search fails:

https://rest.opensubtitles.org/search/q ... uageid-eng

Re: [NEW] REST search, JSON results

Posted: Tue Aug 21, 2018 11:15 pm
by oss
Hi

the best is to make two separate requests. To be clear:
https://rest.opensubtitles.org/search/m ... uageid-eng
is redirecting to
https://rest.opensubtitles.org/search/m ... uageid-eng

https://rest.opensubtitles.org/search/q ... uageid-eng
is redirecting to
https://rest.opensubtitles.org/search/m ... uageid-eng

so as you can see query is totally ignored when there is moviehash and moviebytesize, the best is "sort" parameters in URL as written in first message in this topic.

so 2nd query would be:
https://rest.opensubtitles.org/search/q ... uageid-eng

Re: [NEW] REST search, JSON results

Posted: Wed Aug 22, 2018 1:33 am
by mntgoat
Hi

the best is to make two separate requests. To be clear:
https://rest.opensubtitles.org/search/m ... uageid-eng
is redirecting to
https://rest.opensubtitles.org/search/m ... uageid-eng

https://rest.opensubtitles.org/search/q ... uageid-eng
is redirecting to
https://rest.opensubtitles.org/search/m ... uageid-eng

so as you can see query is totally ignored when there is moviehash and moviebytesize, the best is "sort" parameters in URL as written in first message in this topic.

so 2nd query would be:
https://rest.opensubtitles.org/search/q ... uageid-eng
Ok, two separate queries is how we have it implemented now, just wanted to make sure that was ok and there was no better way.

Re: [NEW] REST search, JSON results

Posted: Wed Aug 22, 2018 8:57 am
by oss
basically, the best is moviehash and size search, if that will bring no desired results, query is the last best option.

Re: [NEW] REST search, JSON results

Posted: Wed Aug 22, 2018 5:21 pm
by mntgoat
basically, the best is moviehash and size search, if that will bring no desired results, query is the last best option.
Yeah that is exactly how we are doing it, second query if the first was empty. Thanks.

Re: [NEW] REST search, JSON results

Posted: Sun Sep 02, 2018 9:55 am
by habibkazemi
What happens when using both imdbid and hash and bytesize,for example the below sample.
seems that it ignores the imdbid, the result with and without that is same
also episode and season seems useless when using size and hash.

https://rest.opensubtitles.org/search/e ... uageid-eng

Re: [NEW] REST search, JSON results

Posted: Mon Sep 03, 2018 11:32 am
by oss
yeah, thats right. If you search by hash and bytesize the results should be already good enough to have more filtering.

Re: [NEW] REST search, JSON results

Posted: Tue Sep 11, 2018 5:19 pm
by slingdev
Hi, I am new to opensubtitles and wanted to try out the search API, but I keep getting the following error "http useragent is not valid". I am using Postman with the following header :
GET /search/moviebytesize-750005572/moviehash-319b23c54e9cf314 HTTP/1.1
Host: rest.opensubtitles.org
Content-Type: application/json
User-Agent: "TemporaryUserAgent"
Cache-Control: no-cache

Please help...

Re: [NEW] REST search, JSON results

Posted: Mon Sep 17, 2018 10:31 am
by oss
Hi, it works here, try:

Code: Select all

curl -A 'TemporaryUserAgent' https://rest.opensubtitles.org/search/moviebytesize-750005572/moviehash-319b23c54e9cf314

Re: [NEW] REST search, JSON results

Posted: Sat Jan 05, 2019 10:35 pm
by muven89
Can you share REST documentation link ?

How many ways are there to query ?

1. query by movie name
2. query by series season and episode name
3. add language selection in the query

ple help me to understand these queries. Thanks,