Developer Documentation

API & Embed Docs

Everything you need to embed the video player, stream movies and TV shows, or extract direct sources.

1. Base URL

Public embed player is hosted at the root endpoint

https://nhdapi.com

2. Embed Player

Works with TMDB numeric IDs or IMDb string IDs (starting with tt)

Movie URL Format
https://nhdapi.com/movie/{tmdb_id_or_imdb_id}
Iframe Embed Code
<iframe src="https://nhdapi.com/movie/550" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>

Built-in Player Features (No extra JS required)

Automatic Failover: Automatically switches between multiple high-speed servers if one is down.
Multi-Language Subtitles: Auto-fetched subtitles in over 20+ languages with customizable size and font.
Audio Language Switcher: Easily toggle between Original audio and Dubbed audio versions.
Smart Resume & Auto-Next: Remembers playback timestamp and automatically plays next TV episodes.

3. Direct Stream Extraction & Downloads

Direct JSON endpoints for custom native player applications

Movie Extraction
https://nhdapi.com/movie/299534?key=YOUR_API_KEY
TV Episode Extraction (S01E01)
https://nhdapi.com/tv/1399/1/1?key=YOUR_API_KEY
Download Page Example (No Key Required)
https://nhdapi.com/dl/movie/550
AI

4. Integrate with AI

Copy this prompt into ChatGPT, Claude, or Cursor to auto-build your streaming frontend

I am building a streaming website and want to embed the NHD Embed player via an iframe. Please write the integration code for me based on the following API reference.

### 1. Base URL
The player is hosted at: https://nhdapi.com

### 2. Endpoints
- Movie: https://nhdapi.com/movie/{tmdbId or imdbId}
- TV episode: https://nhdapi.com/tv/{tmdbId or imdbId}/{season}/{episode}
- Anime episode: https://nhdapi.com/anime/{aniListId}/{episode}

Use a TMDB numeric id, or an IMDb id starting with `tt` — both resolve automatically.

### 3. Minimal embed
<iframe src="https://nhdapi.com/movie/550" width="100%" height="100%" frameborder="0" allowfullscreen></iframe>
Wrap it in a fixed-aspect-ratio container (e.g. `aspect-ratio: 16/9`) — the player fills whatever box it's given.

### 4. What the player already handles internally
- Automatic failover across multiple sources if one is down
- A Server switcher and, for multi-dub titles, an Audio language switcher
- Subtitles across 20+ languages, auto-fetched per title
- A resume-from-last-position prompt, and next-episode auto-play for TV
- Chromecast/AirPlay casting where the browser supports it

5. Errors & Rate Limits

Standard JSON response error format

{ "success": false, "error": "Reason for error message" }
401
Invalid Key
429
Rate Limit
403
Title Blocked
500
Extraction Fail