tvschedule.org
API Docs / Patterns

Most aired last week

Live and CompleteMCP: most_aired

The shows and films a country aired most last week, ranked, with how far each moved on the week before.

ReturnsA ranked chart
Up to50 a call, 20 by default
FreshUp to an hour old
PlanLive and Complete
GEThttps://api.tvschedule.org/v1/countries/{cc}/most-aired

What it is for

Each week we count every airing in a country and rank the shows and films by how often they aired. Each row has its rank, whether it is a show or a film, its main genre, its count and its change in places on the week before.

It is a ready-made weekly chart for a country, and a quick read on what fills a market's schedules.

Weekly charts

Publish "the most aired shows in the UK this week".

Trends

Watch which shows climb or fall week on week.

Programming research

See what fills a country's schedules.

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.

Most aired last week

Needs Live or Complete

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

https://api.tvschedule.org/v1/countries/GB/most-aired
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/GB/most-aired" \
  -H "X-API-Key: <your key>"

Parameters

NameInTypeExampleWhat it does
ccrequiredpathstringGBThe country as a two-letter code, such as GB.
limitqueryinteger10How many rows of the chart, 20 when left out.
1 to 50

Returns

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

FieldTypeExampleWhat it holds
rankinteger1Its place in the chart, 1 first.
idstringsh_8f2k1m0qThe show or film id.
kindstringshowshow or film.
namestringHomes Under the HammerIts name
genrestringFactualIts main genre
airingsinteger412How many times it aired that week.
changeinteger2Places up (positive) or down (negative) on the week before.

Example answer

The example answer appears here as soon as this endpoint's data is live. Run above shows a real answer with your key.

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.
403upgrade_requiredThe weekly charts are on Live and Complete.The message names the plan that does. Upgrade on the same key at /pricing.
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.
422unknown_parameterA query parameter this endpoint does not take.The message lists the ones it does take.
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