Integrate high-quality live TV channels into your website or application with our easy-to-use API. Get instant access to hundreds of channels with secure stream delivery.
Get Free API Key
// Get all channels
fetch('https://yourdomain.com/api/?action=channels', {
headers: { 'X-API-Key': 'your_api_key' }
})
.then(res => res.json())
.then(data => console.log(data));
Powerful features that make integration simple and secure
Stream URLs are hidden and protected. Tokens expire after 24 hours for maximum security.
CDN-optimized streams with 99.9% uptime guarantee and low latency playback.
Simple REST API with clear documentation. Works with PHP, JavaScript, Python, and more.
Track your API usage, views, and performance in real-time.
Works on all devices - desktop, mobile, tablet. Adaptive streaming support.
Dedicated support team to help you with integration and troubleshooting.
Complete guide to integrate SKY IPTV API into your website
First, create a free account to get your API key:
curl -X GET "https://yourdomain.com/api/index.php?action=channels" \ -H "X-API-Key: your_api_key_here"
All API requests require authentication using your API key. Include it in the request headers:
X-API-Key: your_api_key_here
https://yourdomain.com/api/?action=channels&api_key=your_api_key_here
{
"success": true,
"channels": [
{
"id": 28,
"channel_name": "Sony Ten 2",
"channel_name_bn": null,
"channel_logo": "/uploads/tv/logo.png",
"category": "Movies",
"featured": 0
}
],
"total": 14
}
{
"success": true,
"stream_url": "https://stream-proxy.yourdomain.com/play/28/token/1234567890",
"channel_name": "Sony Ten 2",
"expires": "2024-01-01 12:00:00"
}
{
"success": true,
"user": {
"username": "user123",
"plan_type": "free",
"daily_requests": 45,
"api_key": "iptv_abc123..."
}
}
<?php
// Configuration
$api_key = 'your_api_key_here';
$api_url = 'https://yourdomain.com/api/index.php';
// Get all channels
function getChannels($api_key) {
global $api_url;
$ch = curl_init($api_url . '?action=channels');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $api_key
]);
$response = curl_exec($ch);
curl_close($ch);
return json_decode($response, true);
}
// Get stream URL for a channel
function getStreamUrl($api_key, $channel_id) {
global $api_url;
$ch = curl_init($api_url . '?action=stream&id=' . $channel_id);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-API-Key: ' . $api_key
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
return $data['stream_url'] ?? null;
}
// Usage
$channels = getChannels($api_key);
foreach($channels['channels'] as $channel) {
echo "Channel: " . $channel['channel_name'] . "\n";
}
?>
<!DOCTYPE html>
<html>
<head>
<link href="https://cdn.plyr.io/3.7.8/plyr.css" rel="stylesheet">
</head>
<body>
<video id="player" controls></video>
<script src="https://cdn.plyr.io/3.7.8/plyr.js"></script>
<script>
const player = new Plyr('#player');
async function playChannel(channelId) {
const response = await fetch('get_stream.php?id=' + channelId);
const data = await response.json();
player.source = {
type: 'video',
sources: [{ src: data.stream_url, type: 'application/x-mpegURL' }]
};
player.play();
}
</script>
</body>
</html>
// Get all channels
async function getChannels(apiKey) {
const response = await fetch('https://yourdomain.com/api/index.php?action=channels', {
headers: {
'X-API-Key': apiKey
}
});
return await response.json();
}
// Get stream URL
async function getStreamUrl(apiKey, channelId) {
const response = await fetch(`https://yourdomain.com/api/index.php?action=stream&id=${channelId}`, {
headers: {
'X-API-Key': apiKey
}
});
const data = await response.json();
return data.stream_url;
}
// Complete player example with HLS.js
async function initPlayer(apiKey) {
const channels = await getChannels(apiKey);
const streamUrl = await getStreamUrl(apiKey, channels.channels[0].id);
if (Hls.isSupported()) {
const video = document.getElementById('video');
const hls = new Hls();
hls.loadSource(streamUrl);
hls.attachMedia(video);
}
}
// Usage
const API_KEY = 'your_api_key_here';
initPlayer(API_KEY);
const axios = require('axios');
const API_KEY = 'your_api_key_here';
const API_URL = 'https://yourdomain.com/api/index.php';
// Get all channels
async function getChannels() {
try {
const response = await axios.get(`${API_URL}?action=channels`, {
headers: { 'X-API-Key': API_KEY }
});
return response.data;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
// Get stream URL
async function getStreamUrl(channelId) {
try {
const response = await axios.get(`${API_URL}?action=stream&id=${channelId}`, {
headers: { 'X-API-Key': API_KEY }
});
return response.data.stream_url;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
// Usage
getChannels().then(data => {
console.log(`Found ${data.total} channels`);
});
import requests
API_KEY = 'your_api_key_here'
API_URL = 'https://yourdomain.com/api/index.php'
headers = {
'X-API-Key': API_KEY
}
# Get all channels
def get_channels():
response = requests.get(f'{API_URL}?action=channels', headers=headers)
return response.json()
# Get stream URL for a channel
def get_stream_url(channel_id):
response = requests.get(f'{API_URL}?action=stream&id={channel_id}', headers=headers)
data = response.json()
return data.get('stream_url')
# Usage
channels = get_channels()
for channel in channels['channels']:
print(f"Channel: {channel['channel_name']}")
# Get stream for first channel
if channels['channels']:
stream_url = get_stream_url(channels['channels'][0]['id'])
print(f"Stream URL: {stream_url}")
from flask import Flask, render_template, jsonify
import requests
app = Flask(__name__)
API_KEY = 'your_api_key_here'
API_URL = 'https://yourdomain.com/api/index.php'
@app.route('/')
def index():
return render_template('player.html')
@app.route('/api/channels')
def get_channels():
response = requests.get(f'{API_URL}?action=channels',
headers={'X-API-Key': API_KEY})
return jsonify(response.json())
@app.route('/api/stream/')
def get_stream(channel_id):
response = requests.get(f'{API_URL}?action=stream&id={channel_id}',
headers={'X-API-Key': API_KEY})
return jsonify(response.json())
if __name__ == '__main__':
app.run(debug=True)
<!DOCTYPE html>
<html>
<head>
<title>SKY IPTV Player</title>
<link href="https://vjs.zencdn.net/7.20.3/video-js.css" rel="stylesheet">
<link href="https://cdn.plyr.io/3.7.8/plyr.css" rel="stylesheet">
<style>
body { font-family: Arial; background: #000; color: #fff; margin: 0; padding: 20px; }
.player-container { max-width: 1200px; margin: 0 auto; }
.channel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; }
.channel-item { background: #333; padding: 10px; border-radius: 5px; cursor: pointer; text-align: center; }
.channel-item:hover { background: #667eea; }
</style>
</head>
<body>
<div class="player-container">
<video id="player" controls crossorigin playsinline></video>
<div id="channelList" class="channel-list">Loading...</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script src="https://cdn.plyr.io/3.7.8/plyr.js"></script>
<script>
const API_KEY = 'your_api_key_here';
const API_URL = 'https://yourdomain.com/api/index.php';
const player = new Plyr('#player');
let hls = null;
// Load channels
async function loadChannels() {
const response = await fetch(`${API_URL}?action=channels`, {
headers: { 'X-API-Key': API_KEY }
});
const data = await response.json();
const container = document.getElementById('channelList');
container.innerHTML = '';
data.channels.forEach(channel => {
const div = document.createElement('div');
div.className = 'channel-item';
div.innerHTML = `
<img src="${channel.channel_logo}" style="width: 50px; height: 50px;" onerror="this.src='/default.png'">
<div>${channel.channel_name}</div>
`;
div.onclick = () => playChannel(channel.id);
container.appendChild(div);
});
}
// Play channel
async function playChannel(channelId) {
const response = await fetch(`${API_URL}?action=stream&id=${channelId}`, {
headers: { 'X-API-Key': API_KEY }
});
const data = await response.json();
if (hls) {
hls.destroy();
}
const video = document.querySelector('#player');
if (Hls.isSupported()) {
hls = new Hls();
hls.loadSource(data.stream_url);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, () => {
video.play();
});
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = data.stream_url;
video.play();
}
}
// Initialize
loadChannels();
</script>
</body>
</html>
Get started for free, upgrade as you grow