Welcome to the EPG API! This documentation will guide you on how to use the API to retrieve Electronic Program Guide (EPG) data for TV channels.
To get the EPG for a channel with ID 114
, you would use the following request:
GET https://tatasky-epg.vercel.app/api/epg?id=114
The response will be in JSON format. Here’s a sample response:
{ "Channel": { "id": "114", "name": "National Geographic", "icon": "https://example.com/natgeo.png" }, "Current": { "title": "Wildlife Explorer", "desc": "Join the host as they venture into the wild to explore amazing wildlife around the globe.", "start": "2024-10-08 10:00:00", "stop": "2024-10-08 11:00:00", "icon": "https://example.com/current-show.png" }, "Upcoming": { "title": "Secrets of the Ocean", "desc": "Explore the mysteries of the deep ocean with experts in marine biology and oceanography.", "start": "2024-10-08 11:00:00", "stop": "2024-10-08 12:00:00", "icon": "https://example.com/upcoming-show.png" } }
import requests url = "https://tatasky-epg.vercel.app/api/epg?id=114" response = requests.get(url) if response.status_code == 200: data = response.json() print("Channel:", data['Channel']['name']) print("Current Show:", data['Current']['title']) else: print("Failed to retrieve data")
const https = require('https'); const url = 'https://tatasky-epg.vercel.app/api/epg?id=114'; https.get(url, (res) => { let data = ''; res.on('data', (chunk) => { data += chunk; }); res.on('end', () => { const epgData = JSON.parse(data); console.log("Channel:", epgData.Channel.name); console.log("Current Show:", epgData.Current.title); }); }).on("error", (err) => { console.log("Error: " + err.message); });
If the channel ID is not found, you’ll get a 404 error like this:
{ "error": { "code": "404", "message": "Channel not found." } }
No rate limiting is applied for this API. You can make as many requests as needed. Ensure that you use valid channel_id
values for accurate results.
If you encounter any issues or have questions, please reach out to our support team at support@example.com.