TV Shows

My API

Use my API to get info about upcoming or the latest episodes of your favorite TV shows.

json-code

If you use Conky in linux, you may also check TV Shows in Conky (linux).

My API uses https://api.themoviedb.org/ to get the latest and the next upcomming episode of TV Shows.

Now lets look at the requests...

To get details of one TV show:

curl -i -X GET https://api.bery.dev/tvshows/show/tt0489974/

You'll get a response like this:

{
    "tmdb_id": 90027,
    "imdb_id": "tt0489974",
    "name": "Carnival Row",
    "overview": "In a mystical and dark city filled with humans, fairies and other creatures, a police detective investigates a series of gruesome murders leveled against the fairy population. During his investigation, the detective becomes the prime suspect and must find the real killer to clear his name.",
    "origin_country": ["US"],
    "original_language": "en",
    "first_air_date": "2019-08-29",
    "poster_path": "https://image.tmdb.org/t/p/original/3UupR0nS9R6Di9letdz4ftX95GF.jpg",
    "poster_path_w500": "https://image.tmdb.org/t/p/w500/3UupR0nS9R6Di9letdz4ftX95GF.jpg",
    "backdrop_path": "https://image.tmdb.org/t/p/original/7gfLuaqVBdtNxKIxp9uc8sOUlQg.jpg",
    "backdrop_path_w500": "https://image.tmdb.org/t/p/w500/7gfLuaqVBdtNxKIxp9uc8sOUlQg.jpg",
    "imdb_url": "https://www.imdb.com/title/tt0489974/",
    "tmdb_url": "https://www.themoviedb.org/tv/90027/",
    "status": "Running",
    "prev": {
        "air_date": "2019-08-29",
        "episode": "S01E08",
        "name": "The Gloaming"
    }
}

To get a list of TV shows:

curl -i -X POST -H "Content-Type: application/json" -d '{}' https://api.bery.dev/tvshows/episodes/

Then the response will look like this:

{
    "total": 4,
    "items": [
        {
            "air_date": "2022-09-01",
            "episode": "S01E01",
            "name": "Shadow of the Past",
            "tv_show": {
                "name": "The Lord of the Rings: The Rings of Power",
                "imdb_id": "tt7631058",
                "imdb_url": "https://www.imdb.com/title/tt7631058/",
                "status": "Running",
                "api_url": "https://api.bery.dev/tvshows/show/tt7631058/"
            }
        },
        {
            "air_date": "2022-06-02",
            "episode": "S03E01",
            "name": "Payback",
            "tv_show": {
                "name": "The Boys",
                "imdb_id": "tt1190634",
                "imdb_url": "https://www.imdb.com/title/tt1190634/",
                "status": "Running",
                "api_url": "https://api.bery.dev/tvshows/show/tt1190634/"
            }
        },
        {
            "air_date": "2022-04-03",
            "episode": "S06E06",
            "name": "Lock and Key",
            "tv_show": {
                "name": "Peaky Blinders",
                "imdb_id": "tt2442560",
                "imdb_url": "https://www.imdb.com/title/tt2442560/",
                "status": "Running",
                "api_url": "https://api.bery.dev/tvshows/show/tt2442560/"
            }
        },
        {
            "air_date": "2022-02-18",
            "episode": "S02E07",
            "name": "THE HACK",
            "tv_show": {
                "name": "Space Force",
                "imdb_id": "tt9612516",
                "imdb_url": "https://www.imdb.com/title/tt9612516/",
                "status": "Running",
                "api_url": "https://api.bery.dev/tvshows/show/tt9612516/"
            }
        }
    ]
}

List with filter, order_by, limit and offset:

The -d '{}' is a json request body, where you can specify filter, order_by, limit and offset. Everything is optional.

{
    "filter": {
        "id__in": [imdb_id_1, imdb_id_2, ...],
        "air_date": iso_datetime,
        "air_date__gt": iso_datetime,
        "air_date__lt": iso_datetime,
        "air_date__gte": iso_datetime,
        "air_date__lte": iso_datetime
    },
    "order_by": "air_date" / "-air_date" / "name" / "-name",  # default '-air_date', which is like 'air_date DESC'
    "offset": 0,
    "limit": 100  # max 1000, default 100
}