Skip to content

This is a unofficial API for KickassTorrents. This API can be used to search for torrents in KickassTorrents and to retrive magnet links for torrents.

License

Notifications You must be signed in to change notification settings

janardannn/KickassTorrentsAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ABOUT

This is an unofficial API for KickassTorrents.

Installation

pip install -r requirements.txt

Usage

Search for torrents using the API

from KickAssAPI import KickAssAPI

api = KickAssAPI()
results = api.search("Attack on Titan")

for key in results:
    print(results[key]['title'])
    print(results[key]['page_url'])

Get the magent link of a selected torrent from search results

from KickAssAPI import KickAssAPI

api = KickAssAPI()
results = api.search("Attack on Titan")

magnet_link  = api.magnet(results[index]['page_url'])
print(magnet_link)

API

Using the API deployed on Heroku

Searching for torrents using the API

import requests, json

API_SEARCH = "https://kickass-api-unofficial.herokuapp.com/search?torrent="

resp = requests.get(API_SEARCH + "Attack on titan")
results = json.loads(resp.text)

for key in results:
    print(results[key]['title'])
    print(results[key]['page_url'])

Getting magnet links using the API

import requests, json

API_MAGNET = "https://kickass-api-unofficial.herokuapp.com/magnet?page_url="

page_url = results[index]['page_url']
resp = requests.get(API_MAGNET+page_url)

magnet = json.loads(resp.text)

magnet_link = magnet['magnet']

About

This is a unofficial API for KickassTorrents. This API can be used to search for torrents in KickassTorrents and to retrive magnet links for torrents.

Topics

Resources

License

Stars

Watchers

Forks

Languages