isohunt-0.1.3: Bindings to the isoHunt torrent search API

Safe HaskellSafe-Infered




IsoHunt API; see

Sample use:

 resp <- search (simpleQuery "ubuntu")

The following terms and conditions apply to the IsoHunt API, as stated in the above link:

In using our search API, you are free to do with it as you wish on condition that if your app is available publicly to users, you must link to torrent details pages on, whether you link to the .torrent files or not. We reserve the right to ban you from using our API if you don't follow this simple rule. Refer to Louish's iPhone app for a good example of including links to our torrent details pages. Our torrent details pages have URLs like this:

While we don't require developer tokens or place hard limits on api calls usage, excessive calls will also result in bans. If you think your app will consistently sustain multiple calls per second to our api, email admin at this site's domain first.

You are free to promote your app using our API, by replying under this post ( or post under this forum ( If your app is really good, we'll likely want to spotlight it on isoHunt's frontpage. Multiple posts to promote your app on our forum or comments is not allowed however, and will be treated as spam.


The main function

search :: Query -> IO ResponseSource

Search IsoHunt with the given query.

Throws MalformedJSON or MalformedResponse if the result is of an expected format.


data Query Source

See also simpleQuery and def for constructing queries




searchTerm :: !String
start :: !Int

start+rows <= 1000

rows :: !Int

<= 100

sort :: !Sort
order :: !Order

simpleQuery :: String -> QuerySource

A default query for the given search term

data Sort Source



Overall factors such as age, query relevance seed/leechers counts and vots


Seeds + leechers



The Response, Item, Image data types all share some field names, such as title. To resolve ambiguity in these fields, use qualified imports as follows:

 import qualified IsoHunt.Response as Response
 import qualified IsoHunt.Item as Item
 import qualified IsoHunt.Image as Image

 ... Response.title r ... Item.title i ... Image.title im ...

The fields in these datatypes are mostly undocumented; see for an example response.


data MalformedJSON Source

The response was invalid JSON. The unparsed contents are included.


MalformedJSON !ByteString 

data MalformedResponse Source

The response was valid JSON, but not of the expected format. Error message and the JSON value are included.