API for Strike
Whats new in V2?
Fixed download endpoint to not return 200 even when a file was 404'd Fixed download endpoint to allow access origin * Info structure has been cleaned up - https://gist.github.com/Codeusa/92818fd7a0da398f0809 File sizes are now in bytes rather than a string of their total size. Added endpoint for descriptions Added sub category filtering to top 100, increased speeds up to 150% Removed download link from top 100, replaced with magnet. Removed download link from info, replaced with magnet Max excution time set to 5 seconds, should never be more than this; ever. Filter out strings by adding a - in front of them. (may increase search times) Added sub category searching to search endpoint
I for one understand the importance of getting information on torrents, scraping is a hassle and regex golf stops being fun after awhile
With this Open API I hope to help with the further development of your software/apps when it comes to locating information on your torrents.
Torrents are updated once an hour, this includes updating data like seeders/leechers but also adding new torrents. Querys are NOT cached and unknown torrents are logged to be added.
If you have any questions, concerns or request see my contact information at the bottom.
Web API ExamplesThe Web API is the centre of everything, from here you can get all the neat information about hashes, lets start by showing you a few examples.
If you just want to get the information of a single torrent based on its hash do the following
https://getstrike.net/api/v2/torrents/info/?hashes=B425907E5755031BDA4A8D1B6DCCACA97DA14C04
You will receive the following JSON output
{"results":1,"statuscode":200,"responsetime":0.0031,"torrents":[{"torrent_hash":"B425907E5755031BDA4A8D1B6DCCACA97DA14C04","torrent_title":"Arch Linux 2015.01.01 (x86\/x64)","torrent_category":"Applications","sub_category":"","seeds":645,"leeches":13,"file_count":1,"size":615514112,"upload_date":"Jan 6, 2015","uploader_username":"The_Doctor-","file_info":{"file_names":["archlinux-2015.01.01-dual.iso"],"file_lengths":[615514112]},"magnet_uri":"magnet:?xt=urn:btih:B425907E5755031BDA4A8D1B6DCCACA97DA14C04&dn=Arch+Linux+2015.01.01+%28x86%2Fx64%29&tr=udp:\/\/open.demonii.com:1337&tr=udp:\/\/tracker.coppersurfer.tk:6969&tr=udp:\/\/tracker.leechers-paradise.org:6969&tr=udp:\/\/exodus.desync.com:6969"}]}
Now if you require more torrents, simply place a comma and continue adding more hashes, the maximum is 50 a query. Duplicates are removed automatically by the API.
Go ahead and send this query
https://getstrike.net/api/v2/torrents/info/?hashes=B425907E5755031BDA4A8D1B6DCCACA97DA14C04,156B69B8643BD11849A5D8F2122E13FBB61BD041
You will receive yet another json object, this one containing two torrent arrays
{"results":2,"statuscode":200,"responsetime":0.003,"torrents":[{"torrent_hash":"156B69B8643BD11849A5D8F2122E13FBB61BD041","torrent_title":"Slackware 14.1 x86_64 DVD ISO","torrent_category":"Applications","sub_category":"","seeds":192,"leeches":9,"file_count":4,"size":2439219966,"upload_date":"Feb 24, 2014","uploader_username":"Nusantara","file_info":{"file_names":["slackware64-14.1-iso\\slackware64-14.1-install-dvd.iso"," slackware64-14.1-iso\\slackware64-14.1-install-dvd.iso.asc"," slackware64-14.1-iso\\slackware64-14.1-install-dvd.iso.md5"," slackware64-14.1-iso\\slackware64-14.1-install-dvd.iso.txt"],"file_lengths":[2438987776,198,67,231925]},"magnet_uri":"magnet:?xt=urn:btih:156B69B8643BD11849A5D8F2122E13FBB61BD041&dn=Slackware+14.1+x86_64+DVD+ISO&tr=udp:\/\/open.demonii.com:1337&tr=udp:\/\/tracker.coppersurfer.tk:6969&tr=udp:\/\/tracker.leechers-paradise.org:6969&tr=udp:\/\/exodus.desync.com:6969"},{"torrent_hash":"B425907E5755031BDA4A8D1B6DCCACA97DA14C04","torrent_title":"Arch Linux 2015.01.01 (x86\/x64)","torrent_category":"Applications","sub_category":"","seeds":645,"leeches":13,"file_count":1,"size":615514112,"upload_date":"Jan 6, 2015","uploader_username":"The_Doctor-","file_info":{"file_names":["archlinux-2015.01.01-dual.iso"],"file_lengths":[615514112]},"magnet_uri":"magnet:?xt=urn:btih:B425907E5755031BDA4A8D1B6DCCACA97DA14C04&dn=Arch+Linux+2015.01.01+%28x86%2Fx64%29&tr=udp:\/\/open.demonii.com:1337&tr=udp:\/\/tracker.coppersurfer.tk:6969&tr=udp:\/\/tracker.leechers-paradise.org:6969&tr=udp:\/\/exodus.desync.com:6969"}]}
If you wish to see how many torrents are indexed run this query
https://getstrike.net/api/v2/torrents/count/
You will receive the total number of index torrents
{"statuscode":200,"message":6355272}
If you wish to search, you can use the following query, you will be limited up to 100 results, you can also specify categories and sub categories
https://getstrike.net/api/v2/torrents/search/?phrase=Slackware%2014.1%20x86_64%20DVD%20ISO
You will receive the results as such
{"results":1,"statuscode":200,"responsetime":0.4725,"torrents":[{"torrent_hash":"156B69B8643BD11849A5D8F2122E13FBB61BD041","torrent_title":"Slackware 14.1 x86_64 DVD ISO","torrent_category":"Applications","sub_category":"","seeds":192,"leeches":9,"file_count":4,"size":2437393940.48,"download_count":40,"upload_date":"Feb 24, 2014","uploader_username":"Nusantara","page":"https:\/\/getstrike.net\/torrents\/156B69B8643BD11849A5D8F2122E13FBB61BD041","rss_feed":"https:\/\/getstrike.net\/torrents\/156B69B8643BD11849A5D8F2122E13FBB61BD041?rss=1","magnet_uri":"magnet:?xt=urn:btih:156B69B8643BD11849A5D8F2122E13FBB61BD041&dn=Slackware+14.1+x86_64+DVD+ISO&tr=udp:\/\/open.demonii.com:1337&tr=udp:\/\/tracker.coppersurfer.tk:6969&tr=udp:\/\/tracker.leechers-paradise.org:6969&tr=udp:\/\/exodus.desync.com:6969"}]}
You can also specify categories and sub categories as such
https://getstrike.net/api/v2/torrents/search/?phrase=windows&category=Applications&subcategory=WindowsHere is a valid list of categories and sub categories
Categories: Anime Applications Books Games Movies Music Other TV XXX Sub Categories: Highres Movies Hentai HD Video Handheld Games Fiction English-translated Ebooks Dubbed Movies Documentary Concerts Comics Books Bollywood Audio books Asian Anime Music Video Animation Android Academic AAC 3D Movies XBOX360 Windows Wii Wallpapers Video Unsorted UNIX UltraHD Tutorials Transcode Trailer Textbooks Subtitles Soundtrack Sound clips Radio Shows PSP PS3 PS2 Poetry Pictures PC Other XXX Other TV Other Music Other Movies Other Games Other Books Other Applications Other Anime Non-fiction Newspapers Music videos Mp3 Movie clips Magazines Mac Lossless Linux Karaoke iOS
If you wish to get a torrents description, you can do this to receive the base64 encoded version
https://getstrike.net/api/v2/torrents/descriptions/?hash=156B69B8643BD11849A5D8F2122E13FBB61BD041
If you need a physical torrent do the following call
https://getstrike.net/api/v2/torrents/download/?hash=0EB6605E041F1846B84BAA63346012A82706A95D
NPM Page npm install strike-api
Example use
var strike = require('strike-api');
strike.info('B425907E5755031BDA4A8D1B6DCCACA97DA14C04').then(function(res) {
var status = res.statuscode;
var results = res.torrents;
var result = results[0];
console.log('L:' + result.leeches + ' S:' + result.seeds + ' - ' + result.torrent_title + ' (' + result.size + ')')
});
strike.search('Slackware').then(function(res) {
var status = res.statuscode;
var results = res.torrents;
for(var i in results) {
console.log('L:' + results[i].leeches + ' S:' + results[i].seeds + ' - ' + results[i].torrent_title + ' (' + results[i].size + ')')
}
});
Repo/Creator Page WebService::Strike
Example use
use WebService::Strike;
my $t = strike 'B425907E5755031BDA4A8D1B6DCCACA97DA14C04';
say $t->title; # Arch Linux 2015.01.01 (x86\/x64)
say $t->magnet; # Returns a magnet link
my $torrent = $t->torrent; # Returns the torrent file
$t->torrent('file.torrent'); # Downloads the torrent file to 'file.torrent'
my @debian = strike_search 'Debian';
say 'Found ' . @debian . ' torrents matching "Debian"';
say 'First torrent has info hash ' . $debian[0]->hash;
my $mp = strike_search 'Modern perl', 1;
say 'Torrent has ' . $mp->count . ' files. They are:';
say join ' ', @{$mp->file_names};
If you wish to submit your own wrapper for this page, please see my contact information at the bottom. Your code will be reviewed. Please keep the naming standards as set above. Or visits the issues page and post it there ISSUES PAGE
Strike and its API will always be free, a lot of time was spent designing not only the code but the responsiveness of the site. If you wish to contribute even a dollar, you would be allowing more time to be spent perfecting this project I will never charge for the use of the API, but hosting does cost money.
If you wish to donate please follow this link to paypal
CLICK HEREIf you plan to make an app that uses this API or anything that end users get their hands on. Just be sure to inform them we provide you with your results on your about page or something viewable.