This is a FastAPI-based proxy for AnimeUnity that allows you to:
- Search anime by title.
- Retrieve episodes for a specific anime.
- Get direct video stream URLs for episodes.
- Stream videos directly via
/stream_videowith full HTML5<video>support.
- Async streaming with
httpxfor efficient video delivery. - Supports
Rangerequests for HTML5<video>playback. - Provides JSON endpoints for search and episode listing.
-
Search Anime GET /search?title={title}
Returns a JSON list of matching anime. -
Get Episodes GET /episodes?anime_id={anime_id}
Returns a JSON list of episodes for a given anime ID. -
Get Stream URL GET /stream?episode_id={episode_id}
Returns a JSON object with the direct video download URL. -
Stream Video GET /stream_video?episode_id={episode_id}
Streams the video directly to the browser. Supports HTML5<video>seeking.
- Clone the repository:
git clone https://github.com/Pal-droid/Animeunity-API
cd Animeunity-API
- Install dependencies:
pip install -r requirements.txt
- Run the API:
uvicorn main:app --reload --host 0.0.0.0 --port 8000
- Access endpoints via:
http://127.0.0.1:8000/docs
to see the Swagger UI documentation.
HTML5 video playback:
<video controls width="640" height="360">
<source src="http://127.0.0.1:8000/stream_video?episode_id=71592" type="video/mp4">
</video>
The video will stream directly from the AnimeUnity source and supports seeking.
Some streams get 503'd, Try refreshing the page.