{"success":true,"name":"NM Player API","baseUrl":"https://api.nmplayer.top","app":{"home":"GET /","help":"GET /help","health":"GET /health","routes":["/","/source/:sourceId","/search","/category","/watch","/downloads","/live-tv","/live-tv/player","/profile"]},"sources":["Server 1","Server 2","Server 3","Server 4","Server 5","Server 6"],"sourceBody":{"sourceId":"server-6","referer":"Optional playback/scraper referer override","origin":"Optional playback/scraper origin override","userAgent":"Optional user-agent override"},"movies":{"overview":{"method":"POST","path":"/api/source/overview","description":"Return categories plus the first movie grid for a source."},"categories":{"method":"POST","path":"/api/categories","description":"Return source category/navigation links."},"page":{"methods":["GET","POST"],"path":"/api/movies/page/:page","body":["baseUrl","startPath or path","referer","origin","userAgent","requestTimeoutMs","allowPartial","render"]},"pages":{"methods":["GET","POST"],"path":"/api/movies/pages?start=1&end=3"},"search":{"methods":["GET","POST"],"path":"/api/search?q=query&page=1"},"searchPages":{"methods":["GET","POST"],"path":"/api/search/pages?q=query&start=1&end=3"},"details":{"methods":["GET","POST"],"path":"/api/movie/details","queryOrBody":{"url":"Required movie/detail URL.","baseUrl":"Required source base URL."},"returns":["metadata","relatedMovies","parts/episodes","playbackHeaders","m3u8 or directVideoUrl when available"]}},"playbackProxy":{"method":"GET","path":"/proxy","description":"Proxy HLS playlists, segments, keys, images, and direct video with optional playback headers.","query":{"url":"Required upstream URL.","referer":"Optional upstream Referer.","origin":"Optional upstream Origin.","userAgent":"Optional upstream User-Agent."},"example":"https://api.nmplayer.top/proxy?url=https%3A%2F%2Fexample.com%2Fmaster.m3u8"},"downloader":{"description":"Inspect an HLS/M3U8 URL, create a one-time MP4 video+audio token, stream the file, and monitor progress.","tools":{"ytDlp":"Install yt-dlp so yt-dlp.exe or yt-dlp works from the OS terminal/PATH.","ffmpeg":"Install ffmpeg so ffmpeg.exe or ffmpeg works from the OS terminal/PATH."},"headers":{"referer":"Optional query/body value. If missing or blank, defaults to downloader.referer from env.js.","origin":"Optional query/body value. Defaults to downloader.origin from env.js.","userAgent":"Optional query/body value. Defaults to downloader.userAgent from env.js."},"endpoints":{"qualities":{"methods":["GET","POST"],"path":"/api/quality","legacyPath":"/api/quialitiy","query":{"url":"Required HLS/M3U8 or supported video URL."},"example":"/api/quality?url=https://example.com/video.m3u8"},"createDownload":{"methods":["GET","POST"],"path":"/api/download","legacyPath":"/api/donload","query":{"url":"Required HLS/M3U8 or supported video URL.","quality":"Optional quality such as best, 1080p, 720p, or a yt-dlp format id.","queality":"Legacy alias for quality.","name":"Optional output filename without extension."},"example":"/api/download?url=https://example.com/video.m3u8&quality=720p&name=my-video"},"tokenMeta":{"method":"GET","path":"/api/download/:token/meta"},"tokenProgress":{"method":"GET","path":"/api/download/:token/progress","responseType":"text/event-stream"},"pauseDownload":{"method":"POST","path":"/api/download/:token/pause"},"resumeDownload":{"method":"POST","path":"/api/download/:token/resume"},"cancelDownload":{"method":"POST","path":"/api/download/:token/cancel"},"streamDownload":{"method":"GET","path":"/d/:token","responseType":"video/mp4 attachment"}},"flow":["Call /api/quality with url to list available quality options.","Call /api/download with url and quality to create a one-time token.","Use download.downloadUrl from the response to start the MP4 download.","Use download.metaUrl or download.progressUrl to inspect status and progress.","Use download.pauseUrl and download.resumeUrl while the download connection is open.","If the browser/client closes the download connection, the backend yt-dlp process is stopped automatically."],"notes":["Download tokens expire after 6 hours.","Each token is locked to the client that created it.","Each token can be streamed only once.","Pause/resume controls suspend and continue the backend process. They do not resume a cancelled browser connection."]},"examples":{"app":"https://api.nmplayer.top","help":"https://api.nmplayer.top/help","serverOverview":{"method":"POST","url":"https://api.nmplayer.top/api/source/overview","body":{"sourceId":"server-6"}},"movieDetails":{"method":"POST","url":"https://api.nmplayer.top/api/movie/details","body":{"sourceId":"server-6","url":"Movie detail URL returned by /api/source/overview or /api/search"}}}}