XMLTV export
A country or a set of channels as a standard XMLTV file, up to 14 days ahead, for media centres and IPTV players.
Paid plansLive data
GEThttps://api.tvguideapi.com/v1/xmltv
Try itRuns the real call with your key
200 OK
Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| country | query | string | optional | A country code. | GB |
| channels | query | list | optional | Channel ids, comma separated, up to 50. | ch_jw83a3xg,ch_7qk3m2xa |
| days | query | integer | optional | Days ahead, 1 to 14. Defaults to 7. | 7 |
Request
curl -H "Authorization: Bearer $TVG_KEY" \ "https://api.tvguideapi.com/v1/xmltv"
$ch = curl_init("https://api.tvguideapi.com/v1/xmltv");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TVG_KEY")],
]);
$answer = json_decode(curl_exec($ch), true);
const r = await fetch("https://api.tvguideapi.com/v1/xmltv", {
headers: { Authorization: `Bearer ${process.env.TVG_KEY}` },
});
const { data, meta } = await r.json();
import os, requests
r = requests.get(
"https://api.tvguideapi.com/v1/xmltv",
headers={"Authorization": f"Bearer {os.environ['TVG_KEY']}"},
)
data = r.json()["data"]
Sample response
<?xml version="1.0" encoding="UTF-8"?>
<tv generator-info-name="tvguideapi.com">
<programme start="20261007190000 +0000" stop="20261007193000 +0000" channel="ch_jw83a3xg">
<title>EastEnders</title>
</programme>
</tv>