TVDB

TVDB

Video

Television data

Visit APIπŸ” Alternatives

πŸ“š Documentation & Examples

Everything you need to integrate with TVDB

πŸš€ Quick Start Examples

TVDB Javascript Examplejavascript
// TVDB API Example
const response = await fetch('https://thetvdb.com/api-information', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

Using theTVDB API with JavaScript

If you're a developer looking to integrate theTVDB API into your web application or project, you're in the right place. theTVDB is a powerful resource for TV show and episode data, and their API is designed to be easily integrated into any number of different projects.

In order to get started with theTVDB API, you'll first need to sign up for an API key. This key will be used to authenticate your requests and give you access to all of the API's features.

Once you have your API key, you can begin making requests to the API using JavaScript. Here are a few examples of how you might make different types of requests:

Search for TV Shows

To search for TV shows by name, you can use the GET /search/series endpoint. Here's an example of how you might query this endpoint using JavaScript:

const apiKey = '<your API key>';
const searchTerm = 'Breaking Bad';

fetch(`https://api.thetvdb.com/search/series?name=${searchTerm}`, {
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Accept-Language': 'en'
  }
})
  .then(response => response.json())
  .then(data => console.log('search results:', data.data));

This code would query the API for any TV shows that match the search term "Breaking Bad". The response would be an array of TV show objects, each with a variety of attributes like id, name, and overview.

Get TV Show Details

To get details about a specific TV show, you can use the GET /series/{id} endpoint. Here's an example of how you might query this endpoint using JavaScript:

const apiKey = '<your API key>';
const showId = 81189; // theTVDB ID for 'Breaking Bad'

fetch(`https://api.thetvdb.com/series/${showId}`, {
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Accept-Language': 'en'
  }
})
  .then(response => response.json())
  .then(data => console.log('show details:', data.data));

This code would query the API for details about the TV show with ID 81189 (which happens to be Breaking Bad). The response would include a wide range of information about the show, including its name, description, air status, and episode list.

Get Episode Details

To get details about a specific episode of a TV show, you can use the GET /episodes/{id} endpoint. Here's an example of how you might query this endpoint using JavaScript:

const apiKey = '<your API key>';
const episodeId = 1573275; // theTVDB ID for 'Breaking Bad' Season 1, Episode 1

fetch(`https://api.thetvdb.com/episodes/${episodeId}`, {
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Accept-Language': 'en'
  }
})
  .then(response => response.json())
  .then(data => console.log('episode details:', data.data));

This code would query the API for details about the first episode of the first season of Breaking Bad. The response would include information like the episode's title, air date, and plot summary.

Conclusion

theTVDB API is an incredibly powerful resource for developers who want to build TV show and episode data into their applications. With its easy-to-use endpoints, and the flexibility of modern programming languages like JavaScript, integrating theTVDB into your project has never been easier.

How to Get a TheTVDB API Key (v4)

The current API is v4 at https://api4.thetvdb.com/v4; the older api.thetvdb.com (v3) is legacy and being phased out. In v4, keys are issued to projects, not individual end users.

  1. Create or sign in to your account at https://thetvdb.com.
  2. Open the Dashboard (top-right menu) β†’ Account β†’ API Keys β†’ "Create a v4 API Key" in the Developers box.
  3. Fill in your project name, description, and company details to generate the key.

Authenticate by exchanging your key for a bearer token, then send that token on subsequent calls:

curl -X POST https://api4.thetvdb.com/v4/login \
  -H "Content-Type: application/json" \
  -d '{"apikey":"YOUR_API_KEY"}'
# returns { "data": { "token": "..." } } β€” then send Authorization: Bearer <token>

Licensing: negotiated company keys are billed, while the free "user-supported" model requires each end user to supply a subscriber PIN (from their own TheTVDB subscription) in the login call as "pin". See https://thetvdb.com/api-information for plan details.

Explore More

Best TVDB alternatives (2026)Best Video APIs

Related APIs in Video