Skip to content

serieEpisodesWithLanguage

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

This method returns a serie with episodes from the specified season type and language. 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
paths.languagestringYesThe serie language
pagestringOptionalRestrict results to a specific page.

Examples

Without page parameters

import { TheTVDB } from '@untidy/thetvdb';
const client = new TheTVDB('access token');
const data = await client.serieEpisodesWithLanguage({ id: '71663', seasonType: 'official', language: 'eng' });
Successful response output
{
status: 'success',
data: {
id: 71663,
name: 'The Simpsons',
episodes: [
{
id: 4350173,
seriesId: 71663,
name: 'Good Night',
aired: '1987-04-19',
// ...
},
// ...
],
// ...
},
links: {
prev: null,
self: 'https://api4.thetvdb.com/v4/series/71663/episodes/official/eng?page=0',
next: 'https://api4.thetvdb.com/v4/series/71663/episodes/official/eng?page=1',
total_items: 827,
page_size: 500,
},
};

Restricted results to page 1

import { TheTVDB } from '@untidy/thetvdb';
const client = new TheTVDB('access token');
const data = await client.serieEpisodesWithLanguage({ id: '71663', seasonType: 'official', language: 'spa' }, '1');
Successful response output
{
status: 'success',
data: {
id: 71663,
name: 'The Simpsons',
slug: 'the-simpsons',
episodes: [
{
id: 420653,
seriesId: 71663,
name: 'En el nombre del abuelo',
aired: '2009-03-22',
runtime: 25,
// ...
},
// ...
],
// ...
},
links: {
prev: 'https://api4.thetvdb.com/v4/series/71663/episodes/official/spa?page=0',
self: 'https://api4.thetvdb.com/v4/series/71663/episodes/official/spa?page=1',
next: null,
total_items: 827,
page_size: 500,
},
};