List countries
Every country we hold TV listings for, with its channel count, its guide feeds and how many programmes it has today.
Free key and every planLive data
GEThttps://api.tvguideapi.com/v1/countries
Try itRuns the real call with your key
200 OK
Parameters
None: call it as it is.
Request
curl -H "Authorization: Bearer $TVG_KEY" \ "https://api.tvguideapi.com/v1/countries"
$ch = curl_init("https://api.tvguideapi.com/v1/countries");
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/countries", {
headers: { Authorization: `Bearer ${process.env.TVG_KEY}` },
});
const { data, meta } = await r.json();
import os, requests
r = requests.get(
"https://api.tvguideapi.com/v1/countries",
headers={"Authorization": f"Bearer {os.environ['TVG_KEY']}"},
)
data = r.json()["data"]
Sample response
{
"data": [
{
"code": "GB",
"name": "United Kingdom",
"channels": 612,
"feeds": 9,
"listings_today": 18400
},
{
"code": "TH",
"name": "Thailand",
"channels": 240,
"feeds": 5,
"listings_today": 6100
}
],
"meta": {
"count": 2,
"next": null,
"took_ms": 41
}
}