API Documentation

Complete guide to using the GZMovie API for streaming and downloading movies and series.

Getting Started

The GZMovie API provides a simple REST interface for searching, streaming, and downloading movies and TV series. All endpoints return JSON responses and support CORS for browser-based applications.

Base URL

https://your-domain.com

API Key

Godszeal

Format

JSON

API Endpoints

GET/api/item-details

Get detailed information about a specific movie or series

Parameters

NameTypeRequiredDescription
subjectIdstringYesThe unique subject ID

Examples

curl -X GET "https://your-domain.com/api/item-details?subjectId=12345"
GET/api/media

Get streaming and download links with proxied URLs

Parameters

NameTypeRequiredDescription
subjectIdstringYesThe unique subject ID
detailPathstringYesThe detail path from item details
seasonnumberNoSeason number for TV series (default: 0)
episodenumberNoEpisode number for TV series (default: 0)

Examples

curl -X GET "https://your-domain.com/api/media?subjectId=12345&detailPath=/path/to/detail&season=1&episode=1"
POST/api/stream

Get streaming data for playback

Parameters

NameTypeRequiredDescription
subjectIdstringYesThe unique subject ID
detailPathstringYesThe detail path
seasonnumberNoSeason number (default: 0)
episodenumberNoEpisode number (default: 0)

Examples

curl -X POST "https://your-domain.com/api/stream" \
  -H "Content-Type: application/json" \
  -d '{"subjectId": "12345", "detailPath": "/path/to/detail", "season": 1, "episode": 1}'
GET/api/proxy

Proxy streaming content to bypass CORS restrictions

Parameters

NameTypeRequiredDescription
urlstringYesThe encoded URL to proxy

Examples

curl -X GET "https://your-domain.com/api/proxy?url=https%3A%2F%2Fexample.com%2Fvideo.mp4"
GET/api/proxy-download

Download media files with proper filename (name is required)

Parameters

NameTypeRequiredDescription
urlstringYesThe encoded URL to download
namestringYesMovie/series name for filename (REQUIRED)
qualitystringNoQuality label (e.g., 1080p, 720p)

Examples

curl -X GET "https://your-domain.com/api/proxy-download?url=https%3A%2F%2Fexample.com%2Fvideo.mp4&name=Avengers&quality=1080p" -o gzmovie_avengers_1080p.mp4
Complete Workflow Example

Here is a complete example showing how to search for a movie and get its streaming/download links.

"""
GZMovie API - Complete Workflow Example
This script demonstrates how to search, get details, and download a movie
"""

import requests
from urllib.parse import quote

BASE_URL = "https://your-domain.com"

def search_movie(query):
    """Search for movies by title"""
    response = requests.get(f"{BASE_URL}/api/search", params={"query": query})
    return response.json()

def get_details(subject_id):
    """Get movie details"""
    response = requests.get(f"{BASE_URL}/api/item-details", params={"subjectId": subject_id})
    return response.json()

def get_media_links(subject_id, detail_path, season=0, episode=0):
    """Get streaming and download links"""
    response = requests.get(f"{BASE_URL}/api/media", params={
        "subjectId": subject_id,
        "detailPath": detail_path,
        "season": season,
        "episode": episode
    })
    return response.json()

def download_movie(url, filename):
    """Download the movie file"""
    print(f"Downloading: {filename}")
    response = requests.get(url, stream=True)
    with open(filename, "wb") as f:
        for chunk in response.iter_content(chunk_size=8192):
            f.write(chunk)
    print(f"Download complete: {filename}")

# Example usage
if __name__ == "__main__":
    # 1. Search for a movie
    search_results = search_movie("Avengers Endgame")
    
    if search_results.get("data", {}).get("subjects"):
        movie = search_results["data"]["subjects"][0]
        subject_id = movie["subjectId"]
        detail_path = movie["detailPath"]
        title = movie["title"]
        
        print(f"Found: {title}")
        
        # 2. Get media links
        media = get_media_links(subject_id, detail_path)
        
        if media.get("data", {}).get("downloads", {}).get("data", {}).get("downloads"):
            download = media["data"]["downloads"]["data"]["downloads"][0]
            
            # 3. Download using the provided URL (already includes movie name)
            download_url = download["downloadUrl"]
            print(f"Download URL: {download_url}")
            
            # The filename will be: gzmovie_avengers_endgame_1080p.mp4

Need Help?

Join our Telegram community for support and updates.