Skip to content

A self-hostable serverless Nyaa's API platform, deployed on Deno Deploy.

License

Notifications You must be signed in to change notification settings

jiang-zhexin/nyaapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nyaapi

This project is a simple RESTful API wrapper for nyaa.

How to use?

Use in JavaScript

// main.ts
const resp = await fetch('https://nyaapi.deno.dev')
if (resp.status !== 200) {
    console.error(await resp.text())
    return
} 
console.log(await resp.json())

Method

Only GET.

Param

Support Path Support Query For example
/ c = 1_0, 1_1 ,... ,6_2 /?c=1_3
/user/:name f = 0, 1, 2 /user/ANiTorrent?f=1
/view/:id q = any string /view/974380
/download/:id p = 1, ..., 100 /download/974380
/download/:id.torrent (other nyaa's query)

Warning

Unsupport Query: page=rss

Policies

  • This https://nyaapi.deno.dev is only a demo.
  • Do not frequently request this API. Due to the limitations of nyaa.si, excessive requests will be quickly blocked.
  • If you have a large number of requests, you can deploy for yourself.

Important

Please comply with the AGPL license.

Deploy

# To install Deno
curl -fsSL https://deno.land/install.sh | sh

git clone git@github.com:jiang-zhexin/nyaapi.git
cd nyaapi
deno install
deno task run
# Then your can visit http://localhost:8000

About

A self-hostable serverless Nyaa's API platform, deployed on Deno Deploy.

Resources

License

Stars

Watchers

Forks