API Reference#

Client#

class kitsu.Client(session: Optional[aiohttp.client.ClientSession] = None)[source]#

User client used to interact with the Kitsu API

async get_anime(anime_id: int) kitsu.models.Anime[source]#

Fetch the information of an anime using its ID

Parameters

anime_id (int) – The ID of the Anime on kitsu.io

Return type

Anime

async search_anime(query: str = '', limit: int = 1, **filters) List[kitsu.models.Anime][source]#

Search for an Anime with its name or filters

Parameters
  • query (str, default: "") – The query you want to search with

  • limit (int, default: 1) – Limits the number of animes returned

  • **filters (dict, optional) – The possible filters are: season, season_year, streamers & age_rating

Return type

List[Anime]

async trending_anime() List[kitsu.models.Anime][source]#

Fetch trending animes

Return type

List[Anime]

async get_manga(manga_id: int) kitsu.models.Manga[source]#

Fetch the information of a manga using its ID

Parameters

manga_id (int) – The ID of the manga on kitsu.io

Return type

Anime

async search_manga(query: str = '', limit: int = 1, **filters) List[kitsu.models.Manga][source]#

Search for a Manga with its Name or Filters

Parameters
  • query (str, default: "") – The query you want to search with

  • limit (int, default: 1) – Limits the number of mangas returned

  • **filters (dict, optional) – The possible filters are: season, season_year, streamers & age_rating

Return type

List[Manga]

async trending_manga() List[kitsu.models.Manga][source]#

Fetch trending Mangas

Return type

List[Manga]

async close() None[source]#

Closes the internal HTTP session

API Models#

API Models are simply the raw JSON data wrapped in a class with attributes, properties and methods to obtain information.

Warning

🚧 This section is not complete yet. If you find any errors or have any suggestions please report them here

Anime#

class kitsu.Anime[source]#

The information about an Anime wrapped in a class

id#

The UUID of the Anime on Kitsu

Type

str

slug#

The name of the Anime with hyphens, It’s recommended to use title or canoncial_title instead. Example: cowboy-bebop

Type

str

canonical_title#

The canonical title of the Anime

Type

str

synopsis#

The synopsis/description of the Anime

Type

str

abbreviated_titles#

A list of abbreivated titles for the Anime

Type

Optional[List[str]]

rating_frequencies#

The rating fequencies of the Anime

Type

Optional[Dict[str, str]]

age_rating#

The age rating for the Anime

Type

Optional[Literal[“G”, “PG”, “R”, “R18”]]

age_rating_guide#

Elaborated age rating for the Anime

Type

Optional[str]

status#

The status of the anime

Type

Optional[Literal[“current”, “finished”, “tba”, “unreleased”, “upcoming”]]

tba#
Type

Optional[str]

subtype#

The subtype of the Anime

Type

Optional[Literal[“ONA”, “OVA”, “TV”, “movie”, “music”, “special”]]

youtube_video_id#

The youtube video ID associated with the Anime

Type

Optional[str]

nsfw#

If the Anime is NSFW(Not safe for work/18+)

Type

Optional[bool]

subtype: Optional[Literal['ONA', 'OVA', 'TV', 'movie', 'music', 'special']]#
youtube_video_id: Optional[str]#
nsfw: Optional[bool]#

The streaming links & information for the Anime

Return type

Optional[List[StreamingLink]]

property episodes: Optional[List[kitsu.models.Episode]]#

The episodes of the Anime

Return type

Optional[List[Episode]]

property episode_count: Optional[int]#

The number of episodes of this Anime

Return type

Optional[int]

property episode_length: Optional[int]#

The avg length of episodes of this Anime in minutes

Return type

Optional[int]

abbreviated_titles: Optional[List[str]]#
age_rating: Optional[Literal['G', 'PG', 'R', 'R18']]#
age_rating_guide: Optional[str]#
property average_rating: Optional[float]#

The average rating of the Anime/Manga on Kitsu

Return type

Optional[float]

canonical_title: str#
property categories: Optional[List[kitsu.models.Category]]#

The categories or genres of the Anime/Manga

Return type

Optional[List[Title]]

cover_image(_type: Optional[Literal['tiny', 'small', 'large', 'original']] = 'original') Optional[str]#

The cover image of the Anime/Manga

Parameters

_type (Optional[Literal["tiny", "small", "medium", "large", "original"]], default: "original") – The size in which the image should be returned. The size will be orginal by default

Returns

The URL of the image

Return type

Optional[str]

property created_at: Optional[datetime.datetime]#

When the Anime/Manga was added on Kitsu. (Use start_date instead)

Return type

Optional[datetime]

property end_date: Optional[datetime.datetime]#

The date on which the Anime/Manga ended.

Return type

Optional[datetime]

property favorites_count: Optional[int]#

The favorites count of the Anime/Manga on Kitsu

Return type

Optional[int]

id: str#
property popularity_rank: Optional[int]#

The popularity rank of the Anime/Manga on Kitsu

Return type

Optional[int]

poster_image(_type: Optional[Literal['tiny', 'small', 'medium', 'large', 'original']] = 'original') Optional[str]#

The poster image of the Anime/Manga

Parameters

_type (Optional[Literal["tiny", "small", "medium", "large", "original"]], default: "original") – The size in which the image should be returned. The size will be orginal by default

Returns

The URL of the image

Return type

Optional[str]

rating_frequencies: Optional[Dict[str, str]]#
property rating_rank: Optional[int]#

The rating rank of the Anime/Manga on Kitsu

Return type

Optional[int]

slug: str#
property start_date: Optional[datetime.datetime]#

The date on which the Anime/Manga started

Return type

Optional[datetime]

status: Optional[Literal['current', 'finished', 'tba', 'unreleased', 'upcoming']]#
synopsis: str#
tba: Optional[str]#
property title: Optional[kitsu.models.Title]#

The titles of the Anime/Manga in different languages. Other languages will be listed if they exist.

Return type

Optional[Title]

type: str#
property updated_at: Optional[datetime.datetime]#

The last time Anime/Manga was updated on Kitsu.

Return type

Optional[datetime]

property user_count: Optional[int]#

The user count of the Anime/Manga on Kitsu

Return type

Optional[int]

Manga#

class kitsu.Manga[source]#

The information about a Manga wrapped in a class

id#

The UUID of the Manga on Kitsu

Type

str

slug#

The name of the Manga with hyphens, It’s recommended to use title or canoncial_title instead. Example: shingeki-no-kyojin

Type

str

canonical_title#

The canonical title of the Manga

Type

str

synopsis#

The Synopsis/Description of the Manga

Type

str

abbreviated_titles#

A list of abbreivated titles for the Manga

Type

Optional[List[str]]

rating_frequencies#

The rating fequencies of the Manga

Type

Optional[Dict[str, str]]

age_rating#

The age rating for the Manga

Type

Optional[Literal[“G”, “PG”, “R”, “R18”]]

age_rating_guide#

Elaborated age rating for the Manga

Type

Optional[str]

status#

The status of the Manga

Type

Optional[Literal[“current”, “finished”, “tba”, “unreleased”, “upcoming”]]

subtype#

The subtype of the Manga

Type

Optional[Literal[“doujin”, “manga”, “manhua”, “manhwa”, “novel”, “oel”, “oneshot”]]

serialization#
Type

Optional[str]

subtype: Optional[Literal['doujin', 'manga', 'manhua', 'manhwa', 'novel', 'oel', 'oneshot']]#
serialization: Optional[str]#
property chapter_count: Optional[int]#

The number of chapters in this Manga

Return type

Optional[int]

property volume_count: Optional[int]#

The number of volumes of this Manga

Return type

Optional[int]

abbreviated_titles: Optional[List[str]]#
age_rating: Optional[Literal['G', 'PG', 'R', 'R18']]#
age_rating_guide: Optional[str]#
property average_rating: Optional[float]#

The average rating of the Anime/Manga on Kitsu

Return type

Optional[float]

canonical_title: str#
property categories: Optional[List[kitsu.models.Category]]#

The categories or genres of the Anime/Manga

Return type

Optional[List[Title]]

cover_image(_type: Optional[Literal['tiny', 'small', 'large', 'original']] = 'original') Optional[str]#

The cover image of the Anime/Manga

Parameters

_type (Optional[Literal["tiny", "small", "medium", "large", "original"]], default: "original") – The size in which the image should be returned. The size will be orginal by default

Returns

The URL of the image

Return type

Optional[str]

property created_at: Optional[datetime.datetime]#

When the Anime/Manga was added on Kitsu. (Use start_date instead)

Return type

Optional[datetime]

property end_date: Optional[datetime.datetime]#

The date on which the Anime/Manga ended.

Return type

Optional[datetime]

property favorites_count: Optional[int]#

The favorites count of the Anime/Manga on Kitsu

Return type

Optional[int]

id: str#
property popularity_rank: Optional[int]#

The popularity rank of the Anime/Manga on Kitsu

Return type

Optional[int]

poster_image(_type: Optional[Literal['tiny', 'small', 'medium', 'large', 'original']] = 'original') Optional[str]#

The poster image of the Anime/Manga

Parameters

_type (Optional[Literal["tiny", "small", "medium", "large", "original"]], default: "original") – The size in which the image should be returned. The size will be orginal by default

Returns

The URL of the image

Return type

Optional[str]

rating_frequencies: Optional[Dict[str, str]]#
property rating_rank: Optional[int]#

The rating rank of the Anime/Manga on Kitsu

Return type

Optional[int]

slug: str#
property start_date: Optional[datetime.datetime]#

The date on which the Anime/Manga started

Return type

Optional[datetime]

status: Optional[Literal['current', 'finished', 'tba', 'unreleased', 'upcoming']]#
synopsis: str#
tba: Optional[str]#
property title: Optional[kitsu.models.Title]#

The titles of the Anime/Manga in different languages. Other languages will be listed if they exist.

Return type

Optional[Title]

type: str#
property updated_at: Optional[datetime.datetime]#

The last time Anime/Manga was updated on Kitsu.

Return type

Optional[datetime]

property user_count: Optional[int]#

The user count of the Anime/Manga on Kitsu

Return type

Optional[int]

Title#

class kitsu.models.Title[source]#
property en: Optional[str]#

The title in english

Return type

Optional[str]

property en_jp: Optional[str]#

The japanese title in english characters

Return type

Optional[str]

property ja_jp: Optional[str]#

The title in japanese

Return type

Optional[str]

Category#

class kitsu.models.Category[source]#

Represents a category of an Anime/Manga

id#

The UUID of the category on kitsu

Type

str

title#

The title of the category

Type

str

description#

The description of the category

Type

str

total_media_count#

The total media count of the category

Type

str

nsfw#

If the category is NSFW(Not safe for work/18+)

Type

bool

id: str#
title: str#
description: str#
total_media_count: str#
nsfw: bool#
property created_at: Optional[datetime.datetime]#

The time when this category was added on Kitsu

Return type

Optional[datetime]

property updated_at: Optional[datetime.datetime]#

The last time this category was updated on Kitsu

Return type

Optional[datetime]

Episode#

class kitsu.models.Episode[source]#

Represents an episode of an Anime

id#

The UUID of the Episode on kitsu

Type

str

canonical_title#

The canonical title of the episode

Type

str

synopsis#

The synopsis/description of the episode

Type

str

season_number#

The season number this episode belongs to

Type

str

episode_number#

The number of the episode

Type

str

air_date#

The date on which this episode was aired

Type

str

id: str#
type: str#
canonical_title: str#
synopsis: str#
season_number: str#
episode_number: str#
air_date: str#
property title: Optional[kitsu.models.Title]#

The titles of the episode in different languages. Other languages will be listed if they exist.

Return type

Optional[Title]

property created_at: Optional[datetime.datetime]#

When this episode was added on Kitsu

Return type

Optional[datetime]

property updated_at: Optional[datetime.datetime]#

The last time this episode was updated on Kitsu

Return type

Optional[datetime]

thumbnail(_type: Optional[Literal['tiny', 'small', 'medium', 'large', 'original']] = 'original') Optional[str][source]#

The url to the thumbnail of this episode

Return type

Optional[str]