Developer Docs

Kazemi Docs

JavaScript sources, extractors and extension syntax

Everything you need to understand the current extension contract, build compatible sources, and apply practical implementation patterns.

Overview

How Kazemi extensions are organized

Sources provide catalogs and metadata. Extractors resolve playable video URLs from hosts or embed pages.

🧩

Source extensions

A source exposes discovery functions like popular, latest and search, then returns detailed items, children and mirrors.

🔓

Extractor extensions

An extractor takes a host URL such as an embed page and resolves it into final playable streams like MP4 or HLS.

Source Syntax

Basic source structure

Every source starts with a `SOURCE` object plus a small set of async functions.

1. Define `SOURCE`

Include stable metadata like id, name, baseUrl, language, version and optional iconUrl/contentKind.

2. Add browse functions

Implement `fetchPopular`, `fetchLatest` and `fetchSearch` when available so the app can build lists and search results.

3. Return detail and children

Use `fetchItemDetails(id)` and `fetchChildren(itemId)` to describe the media item and its playable parts.

Functions

Current source contract

These are the main functions the runtime expects today.

01

`fetchPopular`, `fetchLatest`, `fetchSearch`

Return lightweight lists of media items for home sections and search results.

02

`fetchItemDetails`, `fetchChildren`

Return the full item plus its children, parts or entries using neutral naming.

03

`fetchVideoList`

Return candidate mirrors or direct streams. Extractors may be used later to resolve those URLs.

Extractor Syntax

Basic extractor structure

Extractors are focused: detect supported domains and resolve a host URL into playable streams.