CTOON API
Responses in this documentation are examples that have been shortened. Feel free to GET the ressources yourselves to try it out.
Rate-limits
Currently, we’re not rate-limiting requests, but note that it might be introduced if we notice some clients hammering our servers. Please be responsible and try to wait 2 minutes in between requests.
Schedule ¶
API version 2.0.0
Data related to schedules.
Available dates ¶
Get all days we haveGET/schedule/v2/days
This endpoint retrieves an array wich contains all the dates we have in our database.
Example URI
200
Headers
Content-Type: application/json
Body
[
"2018-07-07",
"2018-07-06",
"2018-07-05",
"2018-07-04",
"2018-07-03",
"2018-07-02",
"2018-07-01",
"2018-06-30",
"2018-06-29",
"2018-06-28",
"2018-06-27",
"2018-06-26",
...
]
Get a day ¶
Get the data for a specific dayGET/schedule/v2/day/{day}
This endpoint retrieves the data for a specific day only, if available.
Details of a day element
-
date
contains the selecte day in theYYYY-MM-DD
format -
lastupdate
is a timestamp of the last time we checked -
schedule
which contains the different sources. If no data is available from one, its value isnull
cn
,zap
,tvguide
,as
contains an array with the scheduletime
with the EST time in 12 hours format (ie.6:00 am
)date
againshow
is the name of the… show! Could be “MOVIE” or “SPECIAL” tootitle
the name of the episode/moviecolors
based on the schedule archive project withforeground
andbackground
valuestimestamp
in seconds from UNIX Epoch, when this element startstimestamp_end
for when it endsminutes
for the duration of the elementslots
[deprectated] how many 15-minutes “slots” it used
-
stats
which contains the different sources. If no data is available from one, its value isnull
cn
,zap
,tvguide
,as
contains an array with the stats of how many times a show airedtitle
for the name of the showcolor
for it’s main color (background)minutes
for its total durationslots
[deprectard] how many 15-minutes “slots” it usedpercentage
for a precalculated percentage of share for that day
Example URI
- day
string
(required) Example: 2018-06-01The date in
YYYY-MM-DD
format.
200
Headers
Content-Type: application/json
Body
{
"schedule": {
"cn": [
{
"time": "6:00 am",
"date": "2018-06-01",
"show": "Steven Universe",
"title": "Garnet's Universe",
"colors": {
"foreground": "#ffdc4f",
"background": "#f04937"
},
"timestamp": 1527847200,
"timestamp_end": 1527848100,
"minutes": 15,
"slots": 1
},
{
"time": "6:15 am",
"date": "2018-06-01",
"show": "Justice League Action",
"title": "Keeping Up with the Kryptonians",
"colors": {
"foreground": "#f8ed51",
"background": "#3a52a3"
},
"timestamp": 1527848100,
"timestamp_end": 1527849000,
"minutes": 15,
"slots": 1
},
{
"time": "6:30 am",
"date": "2018-06-01",
"show": "Teen Titans",
"title": "Deception",
"colors": {
"foreground": "#ffff00",
"background": "#000000"
},
"timestamp": 1527849000,
"timestamp_end": 1527850800,
"minutes": 30,
"slots": 2
},
{
"time": "7:00 am",
"date": "2018-06-01",
"show": "Ben 10",
"title": "Mayhem in Mascot",
"colors": {
"foreground": "#000000",
"background": "#95c93d"
},
"timestamp": 1527850800,
"timestamp_end": 1527851700,
"minutes": 15,
"slots": 1
},
...
],
"zap": [
...
],
"tvguide": [
...
],
"as": null
},
"stats": {
"cn": [
{
"title": "Teen Titans Go!",
"color": "#ffff00",
"minutes": 300,
"slots": 20,
"percentage": 35.7
},
{
"title": "MOVIE",
"color": "#bfbfbf",
"minutes": 210,
"slots": 14,
"percentage": 25
},
{
"title": "Amazing World of Gumball",
"color": "#48c1e4",
"minutes": 195,
"slots": 13,
"percentage": 23.2
},
...
],
"zap": [
...
],
"tvguide": [
...
],
"as": null
},
"date": "2018-06-01",
"lastupdate": 1529658338
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"code": 404,
"message": "There isn't any data available about that day."
}
}
Get a range of days ¶
Get the data for a rangeGET/schedule/v2/range/{start}/{end}
This endpoint retrieves the data for a range of days, if available.
You could select from 2018-06-01
to 2028-01-01
, the system will try to return you everything it can, even tho we don’t have data until the end
date.
But if there isn’t anything at all, a 404 is returned.
Example URI
- start
string
(required) Example: 2018-06-01The start of the range, in
YYYY-MM-DD
format.- end
string
(required) Example: 2018-06-08The end of the range, in
YYYY-MM-DD
format.
200
For the content of each day in the array, refer to /schedule/v2/day/{day}
.
Headers
Content-Type: application/json
Body
{
"2018-06-01": {
"schedule": {
...
},
"stats": {
...
},
"date": "2018-06-01",
"lastupdate": 1529658338
},
"2018-06-02": {
"schedule": {
...
},
"stats": {
...
},
"date": "2018-06-02",
"lastupdate": 1529658338
},
"2018-06-03": {
"schedule": {
...
},
"stats": {
...
},
"date": "2018-06-03",
"lastupdate": 1529658338
},
"2018-06-04": {
"schedule": {
...
},
"stats": {
...
},
"date": "2018-06-04",
"lastupdate": 1529658338
},
"2018-06-05": {
"schedule": {
...
},
"stats": {
...
},
"date": "2018-06-05",
"lastupdate": 1529658338
},
"2018-06-06": {
"schedule": {
...
},
"stats": {
...
},
"date": "2018-06-06",
"lastupdate": 1529658338
},
"2018-06-07": {
"schedule": {
...
},
"stats": {
...
},
"date": "2018-06-07",
"lastupdate": 1529658338
},
"2018-06-08": {
"schedule": {
...
},
"stats": {
...
},
"date": "2018-06-08",
"lastupdate": 1529658338
}
}
404
Headers
Content-Type: application/json
Body
{
"error": {
"code": 404,
"message": "There isn't any data available in that range."
}
}
Get the most recent entries ¶
Get schedule data for today and onwardsGET/schedule/v2/current
This is a shorthand to load a range from today to the maxium of data we have for the future.
Example: using this endpoint on June 20th will have the same results as /schedule/v2/range/2018-06-20/2099-12-31
.
Example URI
200
Please refer to /schedule/v2/range/{start}/{end}
and /schedule/v2/day/{day}
.
Body
{...}