People that are interested in using our service for automated storing of their newly created .torrent files or storing massive amounts of older files, can do so by using one of our APIs.
This page contains some documentation on the APIs but also some example code in different programming languages. If you have some code for any additional language we do not cover, please give us some working example code over e-mail.
All files will be stored at<INFO_HASH>.torrent


The SOAP API is probably the most easy to use in a modern scripting/programming language. The WSDL offers one simply function - storeTorrent(). The function returns the info hash of the torrent on success, or an error message if there was an error. The SOAP WSDL is located at


Below is example code in PHP to store "my.torrent". You would need to compile PHP with --enable-soap option.

    $client = new SoapClient( '' );
    $infoHash = $client -> storeTorrent( base64_encode( file_get_contents( 'my.torrent' ) ) );


Perl code to store "my.torrent". Requires SOAP::Lite (libsoap-lite-perl in debian)


use MIME::Base64 ();
use SOAP::Lite ();

open( FILE, 'my.torrent' ) or die "$!";
while( read( FILE, $buf, 60*57 ) ) { $tor .= MIME::Base64::encode( $buf ); }
close( FILE );

$infoHash = SOAP::Lite->service( '' )->storeTorrent( $tor );

print $infoHash;


If you don't have support for SOAP there is a normal HTTP POST interface. Here we show some example code for that as well.


Below is example code to store "my.torrent". This feature requires the pecl_http extension.

    $files = array(
            'name' => 'torrent',			// Don't change
            'type' => 'application/x-bittorrent',
            'file' => 'my.torrent'			// Full path for file to upload

    $http_resp = http_post_fields( '', array(), $files );
    $headers   = http_parse_headers ( $http_resp );             
    if ( $headers["X-Thetorrent-Result"] == "stored" )
        $infoHash = $headers["X-Thetorrent-Hash"];
        echo $infoHash;
     elseif ( $headers["X-Thetorrent-Result"] == "failed" )
        $error =  $headers["X-Thetorrent-Error"];
        echo $error;
    unset( $headers, $http_resp, $files, $error );


There are 46490676 stored torrents.