Skip to content

serieEpisodes

GET /v4/series/:id/episodes/:seasonType

This method returns a serie with episodes from the specified season type. For official documentation of the endpoint, please refer to the Swagger documentation.

Parameters

ParamsTypeRequiredDescription
pathsobjectYesPath parameters for retrieving the episodes
paths.idstringYesThe serie id
paths.seasonTypestringYesThe season type
queriesobjectOptionalSearch parameters to restrict the result
queries.airDatestringOptionalThe air date of the episode (yyyy-mm-dd)
queries.episodeNumberstringOptionalRestrict results to a specific episode (requires season).
queries.seasonstringOptionalRestrict results to a specific season.
queries.pagestringOptionalRestrict results to a specific page.

Examples

Without queries parameters

import { TheTVDB } from '@untidy/thetvdb';
const client = new TheTVDB('access token');
const data = await client.serieEpisodes({ id: '75978', seasonType: 'default' });
Successful response output
{
status: 'success',
data: {
series: {
id: 75978,
name: 'Family Guy',
slug: 'family-guy',
// ...
},
episodes: [
{
id: 181165,
seriesId: 75978,
name: 'Stewie Griffin: The Untold Story',
aired: '2006-05-21',
// ...
},
// ...
],
},
links: {
prev: null,
self: 'https://api4.thetvdb.com/v4/series/75978/episodes/default?page=0',
next: null,
total_items: 468,
page_size: 500,
},
};

Restrict episodes to airDate query

import { TheTVDB } from '@untidy/thetvdb';
const client = new TheTVDB('access token');
const data = await client.serieEpisodes({ id: '75978', seasonType: 'default' }, { airDate: '2024-03-06' });
Successful response output
{
status: 'success',
data: {
series: {
id: 75978,
name: 'Family Guy',
// ...
},
episodes: [
{
id: 10168117,
seriesId: 75978,
name: 'TBA',
aired: '2024-03-06',
// ...
},
],
},
links: {
prev: null,
self: 'https://api4.thetvdb.com/v4/series/75978/episodes/default?airDate=2024-03-06&page=0',
next: null,
total_items: 468,
page_size: 500,
},
};