Get anime information
It accepts a valid anime ID or name as path parameter in the endpoint and returns all information on that anime.
Endpoint:
# Using anime id
/anime/<anime_id>
# Or using anime name
/anime/<anime_name>Both approaches work, but querying by anime ID is recommended: it is faster and exact. A name can return the wrong anime if it does not match closely.
Return
It will return the following JSON object:
{
"status": "success",
"data": {
"id": 188,
"name": "One Punch Man",
"episodeCount": 12,
"summary": "The seemingly unimpressive Saitama has a rather unique hobby: being a hero. In order to pursue his childhood dream, Saitama relentlessly trained for three years, losing all of his hair in the process. Now, Saitama is so powerful, he can defeat any enemy with just one punch. However, having no one capable of matching his strength has led Saitama to an unexpected problem—he is no longer able to enjoy the thrill of battling and has become quite bored. One day, Saitama catches the attention of 19-year-old cyborg Genos, who witnesses his power and wishes to become Saitama's disciple. Genos proposes that the two join the Hero Association in order to become certified heroes that will be recognized for their positive contributions to society. Saitama, who is shocked that no one knows who he is, quickly agrees. Meeting new allies and taking on new foes, Saitama embarks on a new journey as a member of the Hero Association to experience the excitement of battle he once felt."
}
}Example:
We are using the built-in global
fetchAPI here, which is both available in browser and NodeJS as of now. But you can use any other programming language or request lib.
const response = await fetch(`${BASE_URL}/anime/188`)
// or
const response = await fetch(`${BASE_URL}/anime/One Punch Man`)
const anime = await response.json()