API proxy/scraper for reelshort.com — a Chinese drama streaming platform.
Built with TypeScript + Express.
| Layer | Technology |
|---|---|
| Runtime | Node.js >= 18 |
| Framework | Express |
| HTTP Client | Axios |
| Language | TypeScript |
| API Docs | Swagger (swagger-jsdoc + swagger-ui-express) |
npm installnpm run devnpm run build
npm startServer runs at http://localhost:3000.
Swagger documentation at http://localhost:3000/docs.
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 |
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
}
]
}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": "..." }
]
}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": "..."
}
}# 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"| Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request — missing parameters |
| 404 | Not Found — video/bookshelf not found |
| 500 | Server Error |
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
- 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.mp4for download
npm run build
git push heroku mainThe Procfile is already set with web: node dist/index.js.
MIT
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.