The Twilight Zone API

Make HTTP requests on the original Twilight Zone television series, seasons 1-5 (1959-1964).



Documentation

Welcome to the Twilight Zone API. This documentation should provide you with all the information you need to start making your HTTP requests. This API is free. Feel free to use it in your projects.


Rate Limit

Although this API is free, there is a rate limit of 10,000 requests a day to prevent malicious activity. That means that if you happen to reach that limit, you will receive a 429 status code, after which you will be able to make requests again after 24 hours.


Base Url

https://the-twilight-zone-api.vercel.app/


Episode Attributes

AttributeTypeDescription
idintegerUnique id per episode
titlestringEpisode title
seasonstringSeason number
episodestringEpisode number
directed_bystringEpisode director(s)
written_bystringEpisode writer
air_yearstringOriginal year episode aired
air_datestringOriginal air date
storylinestringBrief overview of episode
castarrayEpisode actor(s)
opening_narrationstringNarration at opening of episode
closing_narrationstringNarration at closing of episode
imgstringImage from episode
wikipediastringLink to episode Wikipedia page
imdbstringLink to episode IMDb page

Get all episodes

Endpoint to retrieve information from all episodes.

/episodes


The request for all of the episodes looks like this.

fetch('https://the-twilight-zone-api.vercel.app/episodes')
  .then(response => response.json())
  .then(json => console.log(json))


Get a single episode

Example request by episode id. In this example, episode with an id of 1 is being requested.

fetch('https://the-twilight-zone-api.vercel.app/episodes/1')
  .then(response => response.json())
  .then(json => console.log(json))


Running this script will return the following data.

{
    "id": 1,
    "title": "Where Is Everybody?",
    "season": "1",
    "episode": "1",
    "directed_by": "Robert Stevens",
    "written_by": "Rod Serling",
    "air_year": "1959",
    "air_date": "10-02-1959",
    "storyline": "Mike Ferris finds himself alone in the small Oakwood town and without recollection about his name, where he is or who he is. Mike wanders through the town trying to find a living soul. The tension increases and Mike has a breakdown.",
    "cast": [
        "Earl Holliman",
        "James Gregory",
        "Garry Walberg"
    ],
    "opening_narration": "The place is here. The time is now, and the journey into the shadows that we are about to watch, could be our journey.",
    "closing_narration": "The barrier of loneliness: The palpable, desperate need of the human animal to be with his fellow man. Up there, up there in the vastness of space, in the void that is sky, up there is an enemy known as isolation. It sits there in the stars waiting, waiting with the patience of eons, forever waiting... in The Twilight Zone.",
    "img": "https://i.postimg.cc/DycfzqTJ/where-is-everybody.png",
    "wikipedia": "https://en.wikipedia.org/wiki/Where_Is_Everybody%3F",
    "imdb": "https://www.imdb.com/title/tt0734692/"
}


Get all episodes by season

Endpoint to retrieve information from all episodes by season. To indicate the season, add the season number (1-5) at the end.

/season1


The request for all of the episodes from season 1 looks like this.

fetch('https://the-twilight-zone-api.vercel.app/season1')
  .then(response => response.json())
  .then(json => console.log(json))


Get a single episode of a particular season

Example request by episode id from a particular season. In this example, episode with an id of 39 from season 2 is being requested.

fetch('https://the-twilight-zone-api.vercel.app/season2/39')
  .then(response => response.json())
  .then(json => console.log(json))


Running this script will return the following data.

{
    "id": 39,
    "title": "Nervous Man in a Four Dollar Room",
    "season": "2",
    "episode": "3",
    "directed_by": "Douglas Heyes",
    "written_by": "Rod Serling",
    "air_year": "1960",
    "air_date": "10-14-1960",
    "storyline": "Small time criminal Jackie Rhoades must face both his past and his conscience while waiting for his next assignment.",
    "cast": [
        "Joe Mantell",
        "William D. Gordon"
    ],
    "opening_narration": "This is Mr. Jackie Rhoades, age thirty-four, and where some men leave a mark of their lives as a record of their fragmentary existence on Earth, this man leaves a blot, a dirty, discolored blemish to document a cheap and undistinguished sojourn amongst his betters. What you're about to watch in this room is a strange mortal combat between a man and himself, for in just a moment, Mr. Jackie Rhoades, whose life has been given over to fighting adversaries, will find his most formidable opponent in a cheap hotel room that is in reality the outskirts of The Twilight Zone.",
    "closing_narration": "Exit Mr. John Rhoades, formerly a reflection in a mirror, a fragment of someone else's conscience, a wishful thinker made out of glass, but now made out of flesh, and on his way to join the company of men. Mr. John Rhoades, with one foot through the door and one foot out of the Twilight Zone.",
    "img": "https://i.postimg.cc/vZpzZWWb/nervous-man-in-a-four-dollar-room.png",
    "wikipedia": "https://en.wikipedia.org/wiki/Nervous_Man_in_a_Four_Dollar_Room",
    "imdb": "https://www.imdb.com/title/tt0734596/"
}

Resources

The Twilight Zone API comes with a set of 6 common resources:

/episodes156 episodes
/season1Season 1 episodes
/season2Season 2 episodes
/season3Season 3 episodes
/season4Season 4 episodes
/season5Season 5 episodes