📚 API Documentation
Complete REST API reference, database schema, and platform guide for Anizil.
Quick Start
Tech Stack
PHP 8.x + MySQL + Tailwind CSS + Vanilla JS. No frameworks, no Composer.
Database
MySQL / MariaDB 10.4+. 40+ tables. All data in MySQL — no JSON files.
Frontend
HTML5 + Tailwind CSS (CDN) + Lucide Icons. Dark theme, responsive.
Features
Streaming, gamification, cards, premium, forum, PWA, REST API.
Installation
Upload Files
Upload all files to your web root (e.g., /public_html/).
Create Database
Run install/full_install.sql in phpMyAdmin or MySQL CLI. Creates database, 40+ tables, admin user.
Configure Connection
Edit config/db.php with your database credentials.
Admin Login
Go to /admin/ — Email: animelife7@gmail.com — Password: Sadhin12@
install/ directory after setup for security.REST API
Base URL: https://anizil.proo.one/api — All responses are JSON. No auth required for public endpoints.
https://anizil.proo.one/api/anime returns all published anime as JSON.Response Format
API Endpoints
🎬 Anime
📺 Episodes
🔗 AniList Integration
👤 Users
💬 Community
📁 Sub-Endpoints (Separate Files)
| File | Method | Description |
|---|---|---|
api/watchlist.php | GET POST | User watchlist CRUD |
api/watch_later.php | GET POST | Watch later list |
api/watch_party.php | GET POST | Watch party rooms |
api/timestamp.php | GET POST | Resume playback position |
api/report.php | POST | Report content |
api/push.php | POST | Subscribe to push |
api/search.php | GET | Advanced search |
api/badge_color.php | POST | Save pro badge color |
Implementation Guide
How to use the Anizil API to build your own anime streaming website.
Step 1: Get Anime List
Step 2: Get Anime Info + Episodes
Step 3: Get Stream URL (Video Sources)
Step 4: Build Your Player Page
Stream Code Format
stream_code. Format: AK{id}{8-char-md5}. Use this code in /api/stream/{code} to get video sources.Search Anime
GET /api/search?q=naruto — Search by title. Returns matching anime list.
Schedule
GET /api/calendar — Weekly broadcast schedule. GET /api/airing — Currently airing.
Random
GET /api/random — Get a random anime. Great for "Surprise Me" feature.
Trending
GET /api/trending?limit=10 — Top trending anime. GET /api/latest — Recently added.
Full Integration Flow
Load Anime List
Call GET /api/anime to get all anime. Cache the response for 5 minutes.
Show Anime Info Page
When user clicks anime, call GET /api/anime/{slug} for details + GET /api/anime/{slug}/episodes for episode list.
Play Episode
When user clicks episode, use stream_code to call GET /api/stream/{code}. Get video_url from sources and embed in iframe.
Handle Premium
Check is_premium flag. If true, check free_episodes. Episodes beyond free_episodes count require premium access.
Database Schema
40+ tables. MySQL only. Run install/full_install.sql to create all.
Core Tables
| Table | Description |
|---|---|
users | User accounts, roles, XP, level, premium status, badge color |
anime | Anime titles, metadata, premium flag, free episodes count |
episodes | Episode data, stream codes, view count |
episode_sources | Video sources per episode (SUB/DUB/RAW) |
User Features
| Table | Description |
|---|---|
watch_history | Viewing history |
watchlists | User watchlists |
watch_later | Watch later queue |
episode_timestamps | Resume playback positions |
user_cards | Collected cards |
user_themes | Profile themes |
Card System
| Table | Description |
|---|---|
cards | Card definitions (rarity, drop rate) |
characters_db | Character database |
Community
| Table | Description |
|---|---|
comments | Episode comments |
forum_posts | Forum threads |
reports | Content reports |
activity_feed | Social activity feed |
follows | User follow relationships |
Gamification
| Table | Description |
|---|---|
achievements | User achievements |
badge_shop | Badge marketplace |
redeem_codes | Gift codes (XP, Premium, Badges) |
Site Management
| Table | Description |
|---|---|
settings | Key-value site settings |
analytics | Daily view metrics |
audit_log | Admin action log |
notifications | User notifications |
password_resets | Password reset tokens |
backups | Database backup records |
Payments & Premium
| Table | Description |
|---|---|
donations | bKash/Nagad donations |
episode_ratings | Episode ratings |
user_reviews | Anime reviews |
Key Features
Streaming
Multi-source video player (Sub/Dub/RAW), server switching, resume playback, stream codes.
Gamification
XP & levels, collectible cards (30% drop rate), badge shop, achievements, redeem codes.
Social
User profiles with themes, watchlist sharing, forum, activity feed, follow system.
Premium
Premium anime gating, XP-based purchase, premium gifting, custom badge colors.
Content Import
Anikoto API, Anizen API, AniList GraphQL, Jikan API for character images.
PWA
Service worker for offline, app manifest for install, push notifications.
Stream Code Format
Deployment
Production Domains
Post-Install Checklist
Configure DB
Edit config/db.php with production credentials.
Set Base URL
Set base_url in Admin → Site Settings to match your domain.
Enable HTTPS
Configure SSL in .htaccess or server config.
Delete Install
Remove install/ directory after setup.
Configure SMTP
Set up email in Admin → Email Config for notifications.
External APIs
| API | Base URL | Auth |
|---|---|---|
| Anikoto | https://anikotoapi.site | None |
| Anizen | https://cdn.anizen.tr | None |
| AniList | https://graphql.anilist.co | None |
| Jikan | https://api.jikan.moe/v4 | None (1 req/sec) |