qtorrent API (Beta)

This is a lightweight web service, (REST interface), which provides an easy way to access qtorrent's indexed magnet URIs.
An API (Application programming interface) is a protocol intended to be used as an interface by software components to communicate with each other.
Read more about APIs on Wikipedia.

API Endpoint(s)

- List torrents
  Currently, there's only one endpoint available which allows you to list the available torrents along with the working magnet URIs based on the search query provided by you.

Usage

If there is no error, only the JSON data containing the torrents (based on the search query) is loaded. But if there is an error, only the error message is loaded. {"error_message":"ERROR MESSAGE"}. No status / message is loaded along with the results. Status / Message is loaded only when there is any kind of error or crash.
Just make the usage clear by having a look at the sample code given below.

HTTP GET  http://www.qtorrent.in/api/v1/ (JSON)

ParametersDescription
query_term*No default set. This is the search term which you will provide to get the search results.
order_byDefault is set to popular. The values which can be supplied are:
-> popular (most popular torrent on top)
-> size (largest torrent on top)
-> time (latest torrent first)
-> num_files (torrent with most files on top)
limitDefault is set to 10 and currently cannot be changed.
* Parameters marked with this asterik are required to be supplied with the applicable value

Examples

1. http://www.qtorrent.in/api/v1/?query_term=family%20guy This will load the most popular torrents for family guy
2. http://www.qtorrent.in/api/v1/?query_term=family%20guy&order_by=time This will load the newest torrents for family guy

Sample Code (PHP)

<?php
error_reporting(0);
$data = json_decode(file_get_contents('http://www.qtorrent/api/v1/?query_term=fort+minor'));
$item = 0;
if(!$data->error_message)
    while($data[$item]){
        echo '<div style="padding:6px;">
             Title      : '.$data[$item]->title.'<br>
             Timestanp  : '.$data[$item]->timestamp.'<br>
             Popularity : '.$data[$item]->popularity.'<br>
             Size       : '.$data[$item]->size.'<br>
             Files      : '.$data[$item]->files.'<br>
             Magnet     : '.$data[$item]->magnet.'<br>
             </div>';
        $item++;
    }
else
    echo 'An Error Occurred!<br>
          Error Message: '.$data->error_message;

Output:

Title : Fort Minor
Timestanp : 2011-03-21 10:16:12
Popularity : 11406
Size : 650.39 MB
Files : 108
Magnet : magnet:?xt=urn:btih:CADFF95CEF267298FCD3DEEF2D361C9D239BF83F&dn=Fort+Minor&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : 02-fort_minor-remember_the_name_(feat._styles_of_beyond).mp3
Timestanp : 2008-07-10 03:50:45
Popularity : 7311
Size : 5.62 MB
Files : 1
Magnet : magnet:?xt=urn:btih:B906F1637D850ED576D8FD6470099DDDFA2B701F&dn=02-fort_minor-remember_the_name_%28feat._styles_of_beyond%29.mp3&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : Fort Minor - The Rising Tied [Deluxe Version] (2005)
Timestanp : 2012-06-10 06:01:49
Popularity : 5472
Size : 145.92 MB
Files : 22
Magnet : magnet:?xt=urn:btih:CAED4FC409C7219A98B6003D5E7306FF13B684EC&dn=Fort+Minor+-+The+Rising+Tied+%5BDeluxe+Version%5D+%282005%29&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : Fort Minor -The Rising Tied
Timestanp : 2008-03-01 07:18:09
Popularity : 4260
Size : 75.42 MB
Files : 23
Magnet : magnet:?xt=urn:btih:A88AADD8AFC721C5E8F9E99F426F2FF186035E5B&dn=Fort+Minor+-The+Rising+Tied&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : Fort Minor Discography
Timestanp : 2011-02-04 23:50:17
Popularity : 3532
Size : 1.72 GB
Files : 153
Magnet : magnet:?xt=urn:btih:F2EDBE0B96A3039F9AE4663CCDA2058E3D9688DA&dn=Fort+Minor+Discography&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : Fort Minor
Timestanp : 2008-06-26 01:43:00
Popularity : 2826
Size : 442.67 MB
Files : 20
Magnet : magnet:?xt=urn:btih:317EE165FEA7C22E656CF9C7AE8B4C7D64CE2AB5&dn=Fort+Minor&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : Fort Minor - We Major (DJ Green Lantern Mixtape)
Timestanp : 2005-10-29 00:02:26
Popularity : 2780
Size : 136.70 MB
Files : 20
Magnet : magnet:?xt=urn:btih:F53E7D6B5ACC9770D753C9B60EB824ED6B957DD5&dn=Fort+Minor+-+We+Major+%28DJ+Green+Lantern+Mixtape%29&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : 02 Fort Minor - Remember The Name (Featuring Styles of Beyond).flac
Timestanp : 2013-10-31 18:44:34
Popularity : 2265
Size : 25.44 MB
Files : 1
Magnet : magnet:?xt=urn:btih:BC71CB934815BAAE9EA2AA0211DE6341851E58E0&dn=02+Fort+Minor+-+Remember+The+Name+%28Featuring+Styles+of+Beyond%29.flac&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : Fort Minor - Remember The Name.mp3
Timestanp : 2012-04-08 15:42:09
Popularity : 2187
Size : 3.49 MB
Files : 1
Magnet : magnet:?xt=urn:btih:2C554601E4294280F6DF38AE5BEC54B48D6ADD26&dn=Fort+Minor+-+Remember+The+Name.mp3&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
Title : Fort Minor - The Rising Tied (Limited Edition) (2005)
Timestanp : 2015-02-02 05:59:14
Popularity : 1869
Size : 470.33 MB
Files : 47
Magnet : magnet:?xt=urn:btih:6C037741BF640A4595FCBF8A761991B439C8CC15&dn=Fort+Minor+-+The+Rising+Tied+%28Limited+Edition%29+%282005%29&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Fopen.demonii.com%3A1337&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337%2Fannounce
This output was recorded on June 25th, 2017. So, the result you'll get could vary.

Test this API freely and in case you find any bugs, just contact me at: utk [at] asia [dot] com.
© 2017 qtorrent.in
A free, fast and powerful Magnet URI indexer. Disclaimer
Free Web Hosting