tvschedule.org
API Docs / Patterns

A show's airing pattern

Live and CompleteFree key: empty with a noteMCP: show_pattern

A show's usual slot, worked out from every airing we hold, as a weekday by hour grid with its repeat share.

ReturnsThe show's fingerprint
Up toOne record
FreshUp to an hour old
PlanLive and Complete
GEThttps://api.tvschedule.org/v1/shows/{id}/pattern

What it is for

We count every time a show aired and turn it into its fingerprint: the slot it usually takes in words ("Mon to Thu around 19:30"), the channel that airs it most, a 7 by 24 grid of airings by weekday and hour, and how many of those airings were repeats.

Live reads the last 90 days and Complete reads all time. It is how you show "usually on" without waiting for this week's listings, or spot a show moved to a new slot.

"Usually on"

Show the regular slot on a show page.

Heatmaps

Draw the grid as a weekday by hour heatmap.

Spotting moves

Notice when a show leaves its usual slot.

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.

A show's airing pattern

Needs Live or Complete

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

https://api.tvschedule.org/v1/shows/sh_sdkgxsfs/pattern
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/shows/sh_sdkgxsfs/pattern" \
  -H "X-API-Key: <your key>"

Parameters

NameInTypeExampleWhat it does
idrequiredpathstringsh_sdkgxsfsThe show id, from show search.

Returns

One record under data, with meta beside it.

FieldTypeExampleWhat it holds
usualobjectMon to Thu around 19:30Its usual slot in words, such as "Mon to Thu around 19:30". Empty when it has no regular slot.
gridarrayAirings by weekday (7 rows, Monday first) and hour (24 columns), in the show's home country's local time.
main_channelobjectThe channel that airs it most: id and name.
airingsinteger1912How many times it aired
channelsinteger4How many channels
repeat_sharenumber0.38The share of airings that were repeats, from 0 to 1.
window_daysinteger90The days counted: 90 on Live, all time on Complete.

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_requiredYour plan does not read this: a day outside its window, or an endpoint on Live and Complete.The message names the plan that does. Upgrade on the same key at /pricing.
404not_foundNo show has that id.Take ids from the search and directory endpoints. Every address is listed in these docs.
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