www.s4u.se - Swedish Subtitles | Xml / json / serialize Search - Help


Version 1.0

Added

-Download left

Show subtitles left to download @ IP / day

-Info

Now you see version and search query.


Please send feedback to forum or PM.


 

URL (Req)

Http://api.s4u.se/ Version / ApiKey / xml | json | serialize / movie | serie | all / imdb | tmdb | tvdb | title | rls | fname / SearchString /

Version

Api version.
Set version of api you use and you will not be affected by changes in api when it updates.
Current api version is 1.0

ApiKey

You need a key to use api.
Keys have a download limit set to 60 downloads @ IP / day. If you need a key that have a higher limit, tell us why.
For now you need to register/Login and send Admin a PM to get a ApiKey. Set "apikey" as subject and then add info: name(page/plugin/project), short info / url.
If you want to try out this api you can use "ApiTestKey". However, this key will keep change in random time.

xml | json | serialize

Set output.

movie | serie | all

To speed up search, set it to movie or serie.

imdb | tmdb | tvdb | title | rls | fname

Point search at:

imdb - (Movies/Series)imdb.com. Search subtitles by imdb ID. It need to be 7 digits long, so include all leading 0. SearchString can be like "tt1464540" or "1464540"
tmdb - (Movies)TheMovieDB.org. Search subtitles by tmdb ID. Valid input is like imdb.
tvdb - (Series)TheTVDB.com. Search subtitles by thetvdb ID. Valid input is like imdb.
title - Title is case insensitive. Search by movie/serie title, or part of a title. Single char input also work, like "V" in SearchString.
rls - Search by release. release name have to be exact, case insensitive

fname - Search by movie/serie/subtitle filename. Only input filename without ext. Ex. "dfn_fmj1080"

SearchString

This is the place you put your search input. You may use ending "/" and searchstring should be urlencoded.

NOTE!

You cannot use slash(/) in SearchString, So for example "2 1/2 män" need to be renamed to "2 1 2 män"

"2 1/2 män" => "2 1 2 män" => "2+1+2+m%C3%A4n"


URL (Limits)

Http://api.s4u.se/ ... / SearchString / year=(year) & season=(season) & episode=(episode) & limit=(1-30) & tvdb_ep_id=(thetvdb_episode_id)

 

NOTE!

No leading "?" before first limit!

In this example, between "SearchString/" and first limit "year=2011"!
Use "&" to separate limits.
Example:

Http://api.s4u.se/1.0/ApiTestKey/xml/all/title/searchstring/year=2010&season=1&episode=1...

year

Limit search result by year. Valid input is four digits(2011).

Series year is start year of serie.

season

Limit by season in serie search result.
Valid input is anything with atleast one digit(ex. S01, season1, 1, 01...).

episode

Limit by episode in serie search result.
Valid input is anything with atleast one digit(ex. S01, episode1, 1, 01...).

limit

Limit maximum hits of movies and series..

tvdb_ep_id

Limit serie search result by TheTVDB.com episode ID.

Example

Search for: Serie with title "Heroes" and only episodes from season 4. Result return in xml.

http://api.s4u.se/1.0/ApiTestKey/xml/serie/title/Heroes/season=4

Search for: All subtitles with a filename same as dfn_"fmj1080" and return result as seriealized.

http://api.s4u.se/1.0/ApiTestKey/serialize/all/fname/dfn_fmj1080/

Search for: Serie with TheTVDB id and TheTVDB episode id

http://api.s4u.se/1.0/ApiTestKey/xml/serie/tvdb/94971/tvdb_ep_id=2447101

Download Package

You can create and download yuor own zip package. However, its a download limit for subtitles set to 60 @ IP / Day.

Package can only have movie or serie subtitles.

To create a package you use the normal download_Zip url.

Http://www.s4u.se/dls.php ? file=(movie/serie) , (movie/serie id) & format=zip , ApiTestKey

Then you add movie or serie id and separate them with ","

Http://www.s4u.se/dls.php?file=serie,4757,4786,7161,7383,7395,7501,7615,8128,8129&format=zip,ApiTestKey

 


Results

Info

•Status
Return "false" if req input missing or search not been made else "true".
•Version
Show version number.
•DL_Left
Show subtitles left to download @ IP / day.

NOTE!

When you down to 0, an error will be trigger that stop this IP to do more searches.

•Query
Query api uses in search.
•Hits
Total number of hits from series and movies, but not subtitles.
•Hits_Movie
Movie hits.
•Hits_Movie_Sub
Number of subtitles for all movies.
•Hits_Serie
Serie hits
•Hits_Serie_Sub
Number of subtitles for all series.
•Error/Warning

Only appear if error or warning exists in xml, in Json/Serialize it will be a empty array. An error will stop search to complete.

NOTE!

Error/warnings

1XXX = Input validation problems
2XXX = Limit warnings.

 

XML

In xml output look like this when 1 error and 2 warnings appear.

<XmlResult>

<Info>

<Error id="1001">Message</Error>

<Warning id="2001">Message</Warning>

<Warning id="2002">Message</Warning>

</Info>

</XmlResult

Json/Serialize

Output will look like this when no error is found but 3 warnings

[Error] => Array

(

 

)

[Warning] => Array

(

[1001] => Message

[2001] => Message

[2002] => Message

)

/Info

 

Movie

•Sub_Hits
Number of subtitles for this movie.
•IMDB
Imdb id for this movie.
•TMDB
Themoviedb id for this movie
•Title
Movie title.
•Title_Sv
Swedish movie title if exists.
•Year
Movie release year.

Sub

•Id
Subtitle id. You usses this id when you create subtitle package.
•Rls
Return 0 or releasename of the movie.
•Rls_Group
Return 0 or releasegroup name.
•Translate
Return nick of the translator(s).
•File_Name
Subtitle filename.
•File_Type
Return file extension of file. Ex. "srt", "sub", "ssa"...
•File_Count

Number of files for this released subtitle.

If release is in 2 files, like CD1 and CD2 this result will be 2.

•File_Relation

File relation is the connection between subtitles/releases with more then 1 file.

If file_count is 2 then this number match 1 more subtitle in this movie.

Ex. serie release that have 2 files like release.CD1.avi and release.CD2.avi.

However, if you use Download_Zip URL these files is put together in zipfile.

•Download_File
Download_File URL download this subtitle file only.
•Download_Zip
Download_Zip URL download zip pakage with File_Relation files and poster included.

/Sub

/Movie

 

Serie

•Sub_Hits
Number of subtitles for this serie.
•IMDB
Imdb id for this serie.
•Title
Serie title.
•Title_Sv
Swedish serie title if exists.
•Year
Serie release year.
•TVDB
TheTVDB id for this serie.
•Seasons
Total of seasons for this serie.

Sub

•Id
Subtitle id. You usses this id when you create subtitle package.
•Rls
Return 0 or releasename of the serie.
•Rls_Group
Return 0 or releasegroup name.
•Translate
Return 0 or nick of the translator(s).
•File_Name
Subtitle filename.
•File_Type
Return file extension of file. Ex. "srt", "sub", "ssa"...
•File_Count

Number of files for this released subtitle.

If release is in 2 files, like CD1 and CD2 this result will be 2.

•File_Relation

File relation is the connection between subtitles/releases with more then 1 file.

If file_count is 2 then this number match 1 more subtitle in this serie.

Ex. serie release that have 2 files like release.CD1.avi and release.CD2.avi.

However, if you use Download_Zip URL these files is put together in zipfile.

•Download_File
Download_File URL download this subtitle file only.
•Download_Zip
Download_Zip URL download zip pakage with File_Relation files and poster included.
•TVDB_Ep
Return 0 or TheTVDB episode id.
•Ep_Title
Return 0 or title for this episode.
•Season
Season number.
•Episode
Episode number.

/Sub


/Serie