API service for anime
Read this description in another languages:
This API was intended to be used as an exercise in Uncover Vue 3 Reactivity System webinar. You can watch the playback in Uncover Vue 3 Reactivity System - the link is still refer to my blog, will update later if the playback is uploaded.
The anime data is taken from Kaggle: Anime Recommendation Database 2020 by Hernan Valdivieso.
You can take a look on awesome app that use this API in Awesome Anime Api - the link is still refer to my blog, will update later if the link is already created.
Base Url: https://anime-api-one.vercel.app/api
URL: /anime
Method: GET
Query Params:
q
, search keyword. E.g.:q=Naruto
sort
, sort data as ascendingasc
or descendingdesc
by the name. E.g.:sort=desc
sortBy
, sort data by certain field, value can be obtained from SortBy API. E.g.:sortBy=MAL_ID
page
, current result page, default value is1
. E.g.:page=3
size
, how much item is returned, default value is10
. E.g.:size=7
duration
, filtered by duration, value can be obtained from Duration API. E.g.:duration=1%20hr.
genres
, filtered by genres, value can be obtained from Genres API. E.g.:genres=Action
licensors
, filtered by licensors, value can be obtained from Licensors API. E.g.:licensors=4Kids%20Entertainment
producers
, filtered by producers, value can be obtained from Producers API. E.g.:producers=12%20Diary%20Holders
rating
, filtered by rating, value can be obtained from Rating API. E.g.:rating=G%20-%20All%20Ages
studios
, filtered by studios, value can be obtained from Studios API. E.g.:studios=10Gauge
type
, filtered by type, value can be obtained from Type API. E.g.:type=Movie
All the query params can be combined to filter the result with multiple condition. For instance:
/anime?q=Naruto&sort=desc&sortBy=Score&studios=Studio%20Pierrot&genres=Comedy&licensors=VIZ%20Media&producers=KSS
Sample Response:
{
"data": [
...
],
"total": 17562,
"page": 1757,
"size": 10,
"first": "/api/anime?page=1",
"last": "/api/anime?page=1757",
"prev": "/api/anime?page=1756",
"next": "/api/anime?page=1757"
}
URL: /sortby
Method: GET
Sample Response:
{
"data": [
"MAL_ID",
"Name",
...
"Score-2",
"Score-1"
]
}
URL: /duration
Method: GET
Sample Response:
{
"data": [
"1 hr.",
"1 hr. 1 min.",
...
"9 min. per ep.",
"Unknown"
]
}
URL: /genres
Method: GET
Sample Response:
{
"data": [
"Action",
"Adventure",
...
"Yaoi",
"Yuri"
]
}
URL: /licensors
Method: GET
Sample Response:
{
"data": [
"4Kids Entertainment",
"ADV Films",
...
"feel.",
"iQIYI"
]
}
URL: /producers
Method: GET
Sample Response:
{
"data": [
"12 Diary Holders",
"1st PLACE",
...
"teamKG",
"voque ting"
]
}
URL: /rating
Method: GET
Sample Response:
{
"data": [
"G - All Ages",
"PG - Children",
"PG-13 - Teens 13 or older",
"R - 17+ (violence & profanity)",
"R+ - Mild Nudity",
"Rx - Hentai",
"Unknown"
]
}
URL: /studios
Method: GET
Sample Response:
{
"data": [
"10Gauge",
"1IN",
...
"teamKG",
"ufotable"
]
}
URL: /type
Method: GET
Sample Response:
{
"data": [
"Movie",
"Music",
"ONA",
"OVA",
"Special",
"TV",
"Unknown"
]
}
Source code is available under MIT License