Skip to content

Latest commit

 

History

History
386 lines (252 loc) · 9.8 KB

anime.mdx

File metadata and controls

386 lines (252 loc) · 9.8 KB
sidebar_position
1

Anime

import ApiCodeBlock from '../../src/components/ApiCodeBlock'; import Highlight from '../../src/components/Highlight'; import ApiTryIt from '../../src/components/ApiTryIt';

export const endpoints = [ { method: 'GET', uri: '/v1/anime/:id' }, { method: 'GET', uri: '/v1/anime' }, { method: 'GET', uri: '/v1/random/anime/:count/:nsfw' } ];

This is an object representing an Anime show. The API allows you to retrieve individual Anime as well as a list of them using various filters.

The Anime object

Attributes


id

Unique identifier for an Anime.


anilist_id

AniList external unique identifier.


mal_id

MyAnimeList external unique identifier.


format

The show's format destination.

"TV": 0,
"TV_SHORT": 1,
"MOVIE": 2,
"SPECIAL": 3,
"OVA": 4,
"ONA": 5,
"MUSIC": 6

status

The show's global release status.

"FINISHED": 0,
"RELEASING": 1,
"NOT_YET_RELEASED": 2,
"CANCELLED": 3

titles

A dictionary of the show's titles organized by localization.


descriptions

A dictionary of the show's descriptions organized by localization.


start_date

The show's global release date.


end_date

The known show's global end date.


season_period

The season on which the show has been released.

"WINTER": 0,
"SPRING": 1,
"SUMMER": 2,
"FALL": 3,
"UNKNOWN": 4

season_year

The year on which the show has been released.


episodes_count

Number of episodes released for the show.


episode_duration

The show's episode average duration in minutes.


trailer_url

External link to the show's trailer video. Possible services:

  • Youtube
  • Dailymotion

cover_image

The show's cover image.


cover_color

The show's cover main color, in HEX format.


banner_image

The show's banner image.


genres

A collection of the show's associated genres. You can find all possible values here.


sequel

The show's precedent Anime's unique identifier in story-line.


prequel

The show's successive Anime's unique identifier in story-line.


score

The show's global appreciation indicator. Minimum value is 0 and maximum is 100.


Example

{
  "anilist_id": 21,
  "mal_id": 21,
  "format": 0,
  "status": 1,
  "titles": {
      "en": "One Piece",
      "jp": "ワンピース",
      "it": "One Piece"
  },
  "descriptions": {
      "en": "Gold Roger was known as the Pirate Ki...",
      "it": "Monkey D. Luffy (Nel doppiaggio itali..."
  },
  "start_date": "1999-10-20T00:00:00Z",
  "end_date": "1970-01-01T00:00:00Z",
  "season_period": 3,
  "season_year": 1999,
  "episodes_count": 981,
  "episode_duration": 24,
  "cover_image": "https://s4.anilist.co/file/anilistcdn/media/anime/cov...",
  "cover_color": "#e4a15d",
  "banner_image": "https://s4.anilist.co/file/anilistcdn/media/anime/ba...",
  "genres": [
      "Action",
      "Adventure",
      "Comedy",
      "Drama",
      "Fantasy",
      "Pirates",
      "Shounen",
      "Ensemble Cast",
      "Super Power",
      "Ships",
      "Male Protagonist",
      "Conspiracy",
      "Tragedy",
      "Crime",
      "Time Skip",
      "Politics",
      "Boys' Love",
      "War",
      "Shapeshifting",
      "Swordplay",
      "Lost Civilization",
      "Guns",
      "Animals",
      "Anachronism",
      "Primarily Adult Cast",
      "Cyborg",
      "Skeleton",
      "Espionage",
      "Primarily Male Cast",
      "Gender Bending",
      "Ninja",
      "Henshin",
      "Real Robot",
      "Anti-Hero",
      "Mermaid",
      "Battle Royale",
      "Assassins",
      "Tanned Skin",
      "Zombie",
      "Time Manipulation",
      "Kuudere"
  ],
  "score": 86,
  "id": 11
}

Retrieve a specific Anime

Retrieves an Anime show, based on its unique identifier.

Parameters

No parameters.

Returns

Returns an Anime object if a valid identifier was provided.

Try it

export const retrieveAnimeParams = [ { name: ':id', type: 'number', placeholder: ':id', value: '11' } ];

Get a list of Anime

Returns a list of Anime objects. The Anime are returned sorted by score, with the most popular Anime appearing first.

Parameters


title

A case-insensitive pattern filter on the list based on the titles field values.


anilist_id

A filter on the list based on the anilist_id field value.


mal_id

A filter on the list based on the mal_id field value.


formats

A filter on the list based on the format field value.


status

A filter on the list based on the status field value.


year

A filter on the list based on the season_year field value.


season

A filter on the list based on the season_period field value.


genres

A case-sensitive pattern filter on the list based on the genres field values.


nsfw

A filter on the list which excludes Anime classified as Not Safe For Work.


Returns

Returns an array of Anime objects with a size based on the filter provided.

Try it

export const getListAnimeParams = [ { name: 'title', type: 'text', placeholder: 'title', value: 'One Piece' }, { name: 'anilist_id', type: 'number', placeholder: 'anilist_id', value: '' }, { name: 'mal_id', type: 'number', placeholder: 'mal_id', value: '' }, { name: 'formats', type: 'text', placeholder: 'formats', value: '0,1' }, { name: 'status', type: 'text', placeholder: 'status', value: '1' }, { name: 'year', type: 'number', placeholder: 'year', value: '1999' }, { name: 'season', type: 'text', placeholder: 'season', value: '3' }, { name: 'genres', type: 'text', placeholder: 'genres', value: 'Pirates,War,Cyborg' }, { name: 'nsfw', type: 'checkbox', placeholder: 'nsfw', value: true }, ];

Retrieve random Anime

Retrieves a random Anime show list.

Parameters

No parameters.

Returns

Returns a random Anime list.

Try it

export const retrieveRandomAnimeParams = [ { name: ':count', type: 'number', placeholder: ':count', value: '5' }, { name: ':nsfw', type: 'checkbox', placeholder: 'nsfw', value: true } ];