tvschedule.org
API Docs / Directory

Every country

Free keyLive and CompleteMCP: list_countries

Every country we hold listings for, with how many channels it has and how much is listed today.

ReturnsEvery country, largest first
Up toAll in one answer
FreshUp to 6 hours old
PlanEvery plan, the free key too
GEThttps://api.tvschedule.org/v1/countries

What it is for

This is the top of the directory. Each row gives a country's two-letter code, which every country endpoint takes, with its channel count and today's activity: how many channels have listings today and how many programmes are listed.

Use it to build a country picker, to check coverage before you build for a market, or to watch how busy a country's schedule is from day to day. UK listings use GB, as ISO 3166 does.

A country picker

Fill a drop-down with every country and its channel count.

Checking coverage

See which markets are deep before you build for them.

A starting point

Take a code and list that country's channels next.

Try it

Calls the real API with your key and shows the answer below. Your key stays in this browser and fills in on every docs page.

Every country

Works on the free key

No key yet? Get a free key. It fills in here by itself once made.

https://api.tvschedule.org/v1/countries
Uses 1 call from your plan.
Calling

        

Code

Built from the form above, with your key in place. The language you pick is remembered.

curl "https://api.tvschedule.org/v1/countries" \
  -H "X-API-Key: <your key>"

Parameters

None. The key is all it needs.

Returns

A list under data, with meta.count beside it.

FieldTypeExampleWhat it holds
codestringADThe country's ISO 3166 two-letter code. The UK is GB.
namestringAndorraIts name
channelsinteger1How many channels we hold for the country.
channels_on_air_todayinteger1How many of them have listings today, UTC.
programmes_todayinteger20How many programmes are listed across the country today, UTC.

Example answer

A real answer from our data, cut to three rows, so you can see the shape before you run anything.

200 OKhttps://api.tvschedule.org/v1/countries
{
    "data": [
        {
            "code": "AD",
            "name": "Andorra",
            "channels": 1,
            "channels_on_air_today": 1,
            "programmes_today": 20
        },
        {
            "code": "AE",
            "name": "United Arab Emirates",
            "channels": 669,
            "channels_on_air_today": 678,
            "programmes_today": 20275
        },
        {
            "code": "AF",
            "name": "Afghanistan",
            "channels": 1,
            "channels_on_air_today": 1,
            "programmes_today": 49
        }
    ],
    "meta": {
        "count": 179,
        "took_ms": 2
    }
}

Errors

StatusCodeWhenWhat to do
401unauthorizedNo key was sent, or it is not an active TV Schedule key.Send it as Authorization: Bearer <key> or X-API-Key. Your keys are in your account.
400bad_requestA value is the wrong shape: a date that is not YYYY-MM-DD, a two-character search, a key sent in the address.Fix the value the message names and send it again.
429rate_limitedFaster than your plan's pace per minute.Wait for Retry-After seconds. The X-RateLimit headers show where you are.
429quota_exceededYour plan's allowance for the day or month is used.It resets at the time in the message, or upgrade for a bigger allowance.
500server_errorSomething went wrong on our side, or the data was out of reach for a moment.Try again in a minute. It has been logged, and /status shows the state of the service.

Next calls