Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rest Api ReelShort

API proxy/scraper for reelshort.com — a Chinese drama streaming platform.
Built with TypeScript + Express.

Stack

Layer Technology
Runtime Node.js >= 18
Framework Express
HTTP Client Axios
Language TypeScript
API Docs Swagger (swagger-jsdoc + swagger-ui-express)

Installation

npm install

Running

Development (hot reload)

npm run dev

Production

npm run build
npm start

Server runs at http://localhost:3000.
Swagger documentation at http://localhost:3000/docs.

API Endpoints

All endpoints are prefixed with /api/v1/reelshort.

Method Endpoint Description
GET /search?keywords=... Step 1: Search dramas
GET /episodes/{book_id}?filtered_title=... Step 2: Episode list
GET /video/{book_id}/{episode_num}?filtered_title=...&chapter_id=... Step 3: Video URL
GET /dramadub "Dramas with Dub" bookshelf (full)
GET /newrelease "New Releases" bookshelf (full)
GET /recommended "More Recommended" bookshelf (full)
GET /health Check server status

Step 1 — Search

GET /api/v1/reelshort/search?keywords={keywords}

Save book_id and filtered_title for the next step.

Response:

{
  "results": [
    {
      "book_id": "...",
      "book_title": "...",
      "filtered_title": "...",
      "book_pic": "...",
      "chapter_count": 0
    }
  ]
}

Step 2 — Episode List

GET /api/v1/reelshort/episodes/{book_id}?filtered_title={slug}

Save episode and chapter_id for the next step.

Response:

{
  "episodes": [
    { "episode": 1, "chapter_id": "..." }
  ]
}

Step 3 — Video URL

GET /api/v1/reelshort/video/{book_id}/{episode_num}?filtered_title={slug}&chapter_id={chapter_id}

Response:

{
  "video_url": "https://...",
  "episode": 1,
  "duration": 600,
  "next_episode": {
    "episode": 2,
    "chapter_id": "..."
  }
}

cURL Examples

# Step 1
curl "http://localhost:3000/api/v1/reelshort/search?keywords=drama"

# Step 2
curl "http://localhost:3000/api/v1/reelshort/episodes/BOOK_ID?filtered_title=FILTERED_TITLE"

# Step 3
curl "http://localhost:3000/api/v1/reelshort/video/BOOK_ID/1?filtered_title=FILTERED_TITLE&chapter_id=CHAPTER_ID"

# Bookshelf
curl "http://localhost:3000/api/v1/reelshort/dramadub"

Response Codes

Code Meaning
200 Success
400 Bad Request — missing parameters
404 Not Found — video/bookshelf not found
500 Server Error

Project Structure

src/
├── index.ts        # Entry point — Express + Swagger setup
├── reelshort.ts    # ReelShortAPI class (scraper logic)
├── routes.ts       # Express router definitions
└── types.ts        # TypeScript interfaces

dist/               # Compilation output (automatic)
package.json        # Dependencies & scripts
tsconfig.json       # TypeScript config
Procfile            # Heroku: node dist/index.js
README.md
LICENSE

Notes

  • book_id in the bookshelf is obtained automatically from the internal search via filtered_title
  • Bookshelf endpoints call search in the background for each book — do not over-call them
  • Video URL format is .m3u8 (HLS streaming), needs conversion to .mp4 for download

Deployment (Heroku)

npm run build
git push heroku main

The Procfile is already set with web: node dist/index.js.

License

MIT

⚠️ Legal Warning

Use this API wisely and responsibly.
This project is for educational and learning purposes only.
Do not use it for:

  • Distributing pirated content
  • Illegal commercialization
  • Violating ReelShort's ToS
  • Activities that break the law in your country

All risks and responsibility lie with the user themselves.

About

REST API proxy/scraper for ReelShort built with TypeScript & Express. Search dramas, browse episodes, retrieve HLS video URLs, and access curated bookshelf collections with Swagger API documentation.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages