Home

Awesome

LK21 API

cover-banner

Unofficial LK21 (LayarKaca21) and NontonDrama APIs for streaming movies, animations, and series with Indonesian subtitles. LK21 API is perfect for improving your coding skills or just having fun exploring movies from around the world. Best of all, you can enjoy this API without any financial commitment!

Table of Contents

Getting Started

Installation

Step 1: Clone this repository.

git clone https://github.com/febriadj/lk21-api.git

Step 2: Rename the .env.example file to .env and complete the required environment variables.

Step 3: Install dependencies.

npm install

Step 4: Enable Git hooks and compile the TypeScript code.

npm run prepare && npm run build

Step 5: Run the project.

npm start

Environment Variables

The target URLs have the potential to change at any time because their servers are extremely vulnerable to being blocked. Therefore, I declared the target URLs in the Node environment variables.

# LK21 (LayarKaca21) URL
LK21_URL = https://tv.lk21official.live

# NontonDrama URL
ND_URL = https://tv.nontondrama.lol

Reference

List of Endpoints

RequestResponsePagination
GET /moviesRecent upload movies
GET /movies/{movieId}The movie details-
GET /popular/moviesPopular movies
GET /seriesRecent upload series
GET /series/{seriesId}The series details-
GET /popular/seriesPopular series
GET /search/{movieOrSeriesTitle}Searched movies or series-
GET /genresA set of genres-
GET /countriesA set of countries-
GET /yearsA set of years-

See more LK21 API endpoints.

Pagination

Some endpoints support a way of paging the dataset, taking a page as query parameters:

GET /popular/movies?page=5

FAQ

<details> <summary><strong>What is LK21?</strong></summary>

LK21 (LayarKaca21) is a large-scale Indonesian streaming service that offers you to watch movies, animations, and series with Indonesian subtitles. This is a popular #1 streaming service in Indonesia because LK21 serves thousands of movies from around the world such as the US, Japan, Korea, and more for free.

</details> <details> <summary><strong>Is this the Official LK21 API?</strong></summary>

NO, it's unofficial LK21 API, I fetch their movies by web scraping with Node.js, @axios, and @cheerio.

</details> <details> <summary><strong>What is NontonDrama?</strong></summary>

NontonDrama is another source used by LK21 to serve movie series with updated episodes.

</details> <details> <summary><strong>Streaming URLs is blocked and not working</strong></summary>

To display the movie streaming sources in the <iframe> you need to run your application on HTTPS. For security reasons, LK21 prohibits loading of the resources in the <iframe> outside of their domain.

</details>

Showcase

Feel free to showcase your projects here by creating a pull request.

List of projects using LK21 API:

License

Distributed under the MIT License.

Disclamer

The movies contained in this API are obtained from the original LK21 and NontonDrama websites by web scraping. Developers using this API must follow the applicable regulations by mentioning this project or the official owner in their projects and are prohibited from abusing this API for personal benefits.

(Back to Top)