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>”;
}
?>