MinzuTV Streaming API Documentation

Welcome to the MinzuTV Streaming Platform API documentation. Our REST API provides access to movies, TV series, episodes, and streaming functionality.

0
Movies Available
0
TV Series
1
Streaming Servers
99.9%
Uptime

Base URL

https://your-domain.com/api

All API requests should be made to the base URL above.

Authentication

Our API supports multiple authentication methods for different use cases.

API Key Authentication

Include your API key in the request header:

Authorization: Bearer YOUR_API_KEY
X-API-Key: YOUR_API_KEY

JWT Token Authentication

For user-specific requests, use JWT tokens:

Authorization: Bearer YOUR_JWT_TOKEN

API Endpoints Overview

GET /api/stats

Get platform statistics

GET /api/movies

Retrieve list of available movies

GET /api/series

Retrieve list of available TV series

POST /api/player-data

Get streaming URLs for content

Movies API

Get All Movies

GET /api/movies

Parameters

Parameter Type Required Description
page integer No Page number for pagination (default: 1)
limit integer No Number of results per page (default: 20, max: 100)
category string No Filter by category
year integer No Filter by release year

Response

200 OK
{
  "success": true,
  "data": [
    {
      "uid": "abc123",
      "title": "Example Movie",
      "slug": "example-movie",
      "synopsis": "Movie description...",
      "cover": "https://example.com/cover.jpg",
      "backdrop": "https://example.com/backdrop.jpg",
      "year": 2024,
      "rating": "8.5",
      "duration": 120,
      "video_quality": "4K",
      "audio_type": "Dolby Atmos",
      "views": 15420,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 20,
    "total": 150,
    "total_pages": 8
  }
}

Get Single Movie

GET /api/movies/{uid}

Path Parameters

Parameter Type Required Description
uid string Yes Unique identifier for the movie

Series API

Get All Series

GET /api/series

Retrieve a paginated list of all TV series.

{
  "success": true,
  "data": [
    {
      "uid": "series123",
      "title": "Example Series",
      "synopsis": "Series description...",
      "cover": "https://example.com/series-cover.jpg",
      "total_seasons": 3,
      "total_episodes": 36,
      "status": "ongoing",
      "year": 2023,
      "rating": "9.2"
    }
  ]
}

Get Series Episodes

GET /api/series/{uid}/seasons/{season}/episodes

Get episodes for a specific season of a series.

Player API

Get Player Data

POST /api/player-data

Request Body

{
  "uid": "abc123",
  "type": "movie",
  "server": 1
}

Response

{
  "success": true,
  "data": {
    "title": "Example Movie",
    "streaming_url": "https://cdn.example.com/stream/abc123.m3u8",
    "subtitle_urls": {
      "en": "https://cdn.example.com/subtitles/abc123_en.vtt",
      "th": "https://cdn.example.com/subtitles/abc123_th.vtt"
    },
    "quality_options": ["1080p", "720p", "480p"],
    "thumbnail": "https://cdn.example.com/thumbnails/abc123.jpg"
  }
}

Statistics API

Get Platform Statistics

GET /api/stats

Get real-time statistics about the platform.

Response

{
  "success": true,
  "data": {
    "movies_series": 150000,
    "monthly_streams": 2500000,
    "servers": 12,
    "uptime": 99.9
  }
}

Get Live Statistics

GET /api/stats/live

Get detailed real-time statistics including user counts, server status, and performance metrics.

Error Handling

Our API uses conventional HTTP response codes to indicate the success or failure of requests.

HTTP Status Codes

Code Status Description
200 OK Request successful
400 Bad Request Invalid request parameters
401 Unauthorized Authentication required
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error occurred

Error Response Format

{
  "success": false,
  "error": {
    "code": 400,
    "message": "Invalid request parameters",
    "details": "The 'uid' parameter is required"
  }
}

Code Examples

JavaScript (Fetch API)

// Get movies list
async function getMovies() {
  try {
    const response = await fetch('/api/movies?page=1&limit=10');
    const data = await response.json();
    
    if (data.success) {
      console.log('Movies:', data.data);
    } else {
      console.error('Error:', data.error);
    }
  } catch (error) {
    console.error('Network error:', error);
  }
}

// Get player data
async function getPlayerData(uid) {
  try {
    const response = await fetch('/api/player-data', {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_API_KEY'
      },
      body: JSON.stringify({
        uid: uid,
        type: 'movie',
        server: 1
      })
    });
    
    const data = await response.json();
    return data;
  } catch (error) {
    console.error('Error:', error);
  }
}

PHP (cURL)

Python (Requests)

import requests
import json

class StreamAPI:
    def __init__(self, base_url, api_key):
        self.base_url = base_url
        self.headers = {
            'Authorization': f'Bearer {api_key}',
            'Content-Type': 'application/json'
        }
    
    def get_movies(self, page=1, limit=10, category=None, year=None):
        """Get list of movies with optional filters"""
        params = {'page': page, 'limit': limit}
        if category:
            params['category'] = category
        if year:
            params['year'] = year
            
        response = requests.get(
            f'{self.base_url}/api/movies',
            params=params,
            headers=self.headers
        )
        return response.json()
    
    def get_player_data(self, uid, content_type='movie', server=1):
        """Get streaming URLs for content"""
        data = {
            'uid': uid,
            'type': content_type,
            'server': server
        }
        
        response = requests.post(
            f'{self.base_url}/api/player-data',
            json=data,
            headers=self.headers
        )
        return response.json()

# Usage example
api = StreamAPI('https://your-domain.com', 'YOUR_API_KEY')

# Get movies
movies = api.get_movies(page=1, limit=20, category='action')
print(f"Found {len(movies['data'])} movies")

# Get player data
player_data = api.get_player_data('abc123')
if player_data['success']:
    print(f"Stream URL: {player_data['data']['streaming_url']}")