Advertisement:

  • 25Feb

    AllSubs’s vast collection of movie and TV series subtitles is now accessible via a simple API.

    Usage example:
    http://api.allsubs.org/index.php?search=heroes+season+4&language=en&limit=3
    where
    search is the search string
    language is the language for the subtitles; if left empty all languages will be shown.
    Available languages are: en, sq, ar, bg, zh, hr, cs, da, nl, et, fi, fr, ka, de, el, he, hi, hu, it, ja, ko, lv, lt, mk, no, pl, pt, ro, ru, sk, sl, es, sv, tr, vn
    limit how many results to display, default is 10

    Note:

    • this API can be used by anyone. Anyway, we reserve the right to restrict access in case of abuse or excessiv traffic
    • feel free to add a link back to our site if you’re using our API. Its not a requirement but it would be nice :-)
    • there is always room for improvements; should you have questions/suggestions don’t hesitate to contact us

    Here’s a sample PHP code that you could use to read API’s results:
    <?

    $xml_request_url = ‘http://api.allsubs.org/index.php?search=heroes+season+4&language=en&limit=3′;
    $xml = new SimpleXMLElement($xml_request_url, null, true);

    echo “<BR>”.$xml->title;
    echo “<BR>”.$xml->link;
    echo “<BR>”.$xml->description;
    echo “<BR>”.$xml->language;
    echo “<BR>”.$xml->results;
    echo “<BR>”.$xml->found_results;

    foreach ( $xml->items->item as $item )
    {
    echo “<BR>Title :”.$item->title;
    echo “<BR>Link :”.$item->link;
    echo “<BR>Filename :”.$item->filename;
    echo “<BR>Files in archive :”.$item->files_in_archive;
    echo “<BR>Languages :”.$item->languages;
    echo “<BR>Added on :”.$item->added_on;
    echo “<BR>”;

    }

    ?>

    Filed under: HOWTOs, Subtitles
    19 Comments

19 Responses

WP_Lime_Slice
  • coolpie Says:

    nice work :)

  • Salle Says:

    The &-char (and) isn’t escaped in the files_in_archive-tag so the XML is invalid. Otherwise it looks nice.

  • Lupu Says:

    how do you download the resulted subtitles ?

  • Jason Says:

    Do you have an API for your movie trailers?

  • freman Says:

    API is good idea but should be able to search by file hash

  • admin Says:

    Good idea but we don’t have the file hash. If you’d have an idea on how to get that then we could add it on site/search :)

  • Peter Says:

    Thanks m8! will be using this 4 sure in my new app!

  • senior Says:

    agreed, an api for the trailers would be great

  • Masimo Says:

    do you provide search by movie hash as opensubtitles.org?

  • admin Says:

    No, we don’t offer this feature as we don’t know how to collect this data.
    If you have any advice on this we’d be glad to add this feature.

  • hilarleo Says:

    @Lupu- Right on! the problem is downloading from this site, not the searching. So difficult b/c when the captcha is legible- stacked letters, anyone? then it just keeps repeating, like it’s broke or case-sensitive or worse. This site takes so long to get a single download it’s lost the flava

  • admin Says:

    Thanks for sharing with us the difficulties you’re having with the CAPTCHA we’re using.
    It is on our TODO list, we’ll try to find a better way in the following weeks.
    Should you have other suggestions please don’t hesitate to share them with us.

  • ppafford Says:

    The API request response should have an XML tag at the beginning, could you add this to the response?

    AllSubs API: Subtitles Search
    http://www.allsubs.org

    en-us
    1
    24

    http://www.allsubs.org/subs-download/heroes+season+4/1223435/
    heroes-season-4-english-heroes-season-4-en.zip
    Heroes – 4×01-02 – Orientation.HDTV.FQM.en.srt|Heroes – 4×17 – The Art of Deception.HDTV.2HD.en.srt|Heroes – 4×07 – Strange Attractors.HDTV.LOL.en.srt|Heroes – 4×08 – Once Upon a Time in Texas.HDTV.2HD.en.srt|Heroes – 4×07 – Strange Attractors.720p HDTV.DIMENSION.en.srt|Heroes – 4×05 – Hysterical Blindness.720p HDTV.X264.en.srt|Heroes – 4×09 – Shadowboxing.HDTV.LOL.en.srt|Heroes – 4×16 – Pass Fail.HDTV.LOL.en.srt|Heroes – 4×04 – Acceptance.HDTV.en.srt|Heroes – 4×01-02 – Orientation.720p HDTV.DIMENSION.en.srt|Heroes – 4×06 – Tabula Rasa.HDTV.NoTV.en.srt|Heroes – 4×10 – Brother’s Keeper.HDTV.FQM.en.srt|Heroes – 4×04 – Acceptance.HDTV.FQM.en.srt|Heroes – 4×14 – Let It Bleed.720p HDTV.DIMENSION.en.srt|Heroes – 4×06 – Tabula Rasa.720p HDTV.SiTV.en.srt|Heroes – 4×08 – Once Upon a Time in Texas.HDTV.NoTV.en.srt|Heroes – 4×12 – The Fifth Stage.HDTV.LOL.en.srt|Heroes – 4×19 – Brave New World.HDTV.LOL.en.srt|Heroes – 4×15 – Close to You.720p HDTV.DIMENSION.en.srt|Heroes – 4×03 – Ink.720p HDTV.DIMENSION.en.srt|Heroes – 4×11 – Thanksgiving.720p HDTV.DIMENSION.en.srt|Heroes – 4×13 – Upon This Rock.720p HDTV.DIMENSION.en.srt|Heroes – 4×13 – Upon This Rock.HDTV.LOL.en.srt|Heroes – 4×14 – Let It Bleed.HDTV.LOL.en.srt|Heroes – 4×15 – Close to You.HDTV.LOL.en.srt|Heroes – 4×12 – The Fifth Stage.720p HDTV.DIMENSION.en.srt|Heroes – 4×18 – The Wall.HDTV.LOL.en.srt|Heroes – 4×08 – Once Upon a Time in Texas.720p HDTV.CTU.en.srt|Heroes – 4×17 – The Art of Deception.HDTV.CTU.en.srt|Heroes – 4×09 – Shadowboxing.720p HDTV.DIMENSION.en.srt|Heroes – 4×10 – Brother’s Keeper.720p HDTV.DIMENSION.en.srt|Heroes – 4×04 – Acceptance.720p HDTV.CTU.en.srt|Heroes – 4×11 – Thanksgiving.HDTV.FQM.en.srt|Heroes – 4×03 – Ink.HDTV.FQM.en.srt|Heroes – 4×05 – Hysterical Blindness.HDTV.XII.en.srt|
    en
    2010-02-16

  • Sharron Clemons Says:

    Good idea but we don’t have the file hash. If you’d have an idea on how to get that then we could add it on site/search :)

  • admin Says:

    We made this change, thanks for your suggestion.

  • komron Says:

    Nice work.

    I believe that a good add-on would be the returning xml to contain the official movie name and the movie’s year

  • admin Says:

    Well, it would be indeed but unfortunately that’s not so easy to implement because of AllSubs special approach that has its limitations.

  • Thomas Says:

    It would be nice if I could see the ratings in the xml.

  • admin Says:

    Good idea, thanks for it, we’ll try to implement it.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.