Before you begin

Note that you can bypass reading this document if you use the Ultimate Anime Scraper plugin together with this API. You should read this document only if you will create your own implementation of the code that will use this API. If this is the case, lets get started!

General Info

AnimeAPI is a simple HTTP REST API for searching and retrieving anime data from all over the web. It can help you answer questions like:

  • What anime matches my keyword query?
  • List me the full list of episodes for this specific anime.
  • List full description and details about a specific anime.

You can search for anime with any combination of the following criteria:

  • Keyword or phrase. Eg: find all anime containing the word ‘Naruto’.
  • Status. Eg: find all anime which is completed (not ongoing).
  • Genre. Eg: find all anime published in the vampire genre.
  • Release Year. Eg: find all anime released in 2021.

You can sort the results in the following orders:

  • Date published
  • Relevancy to search keyword
  • Popularity of source

API Keys

You need an API key to use the API – this is a unique key that identifies your requests. You can get an API key here (you will need a purchase code for the Ultimate Anime Scraper plugin). If you use this API key, you will have a 500 API call/day limit. If you wish to get more, you need to subscribe AnimeAPI on RapidAPI.

If you create an API key based on a purchase code of the Ultimate Anime Scraper plugin, authentication is handled with a simple API key. You can attach your API key to a request in this simple way: via the apikey query string parameter.
If you are using a subscription to AnimeAPIAPI from RapidAPI, you will need to pass the following headers to your request:

  • X-RapidAPI-Host: animeapi.p.rapidapi.com
  • X-RapidAPI-Key: YOUR_API_KEY_FROM_RAPIDAPI

In this case, you will not need to use the apikey URL parameter to send your API key, but the API key needs to be sent using the above header.

We strongly recommend the either of last two so that your API key isn’t visible to others in logs or via request sniffing.

API Base URLs

If you create an API key based on a purchase code of the Ultimate Anime Scraper plugin, the base URL of the API will be:

https://animeapi.org/apis/anime/v1

If you subscribe to AnimeAPI on RapidAPI, the base URL of the API will be:

https://animeapi.p.rapidapi.com

Endpoints

AnimeAPI has 1 main endpoint:

  • Everything /all – search every anime published by over 500 different sources large and small.

Examples of the above endpoints:

  • https://animeapi.org/apis/anime/v1/all

There is also a minor endpoint that can be used to retrieve a small subset of the publishers we can scan:

Example request (using the 500 API request/day API key):

https://animeapi.org/apis/anime/v1/all?apikey=xxxxxxxxxxxxxxxxxxx&q=naruto&pageSize=5

Endpoint: Everything

Search through thousands of anime from over 500 sources.

Request parameters:

  • apikey *REQUIRED

    Your API key. Get it using your purchase code for the Ultimate Anime Scraper plugin, from this page.

  • q

    Keywords or phrases to search for in the anime title and body. Advanced search is supported here:

    • Surround phrases with quotes (“) for exact match.
    • Prepend words or phrases that must appear with a + symbol. Eg: +naruto
    • Prepend words that must not appear with a – symbol. Eg: -boruto

    The complete value for q must be URL-encoded.

  • qInTitle

    The complete value for qInTitle must be URL-encoded.

    Keywords or phrases to search for in the anime title only.

    Advanced search is supported here:

    • Surround phrases with quotes (“) for exact match.
    • Prepend words or phrases that must appear with a + symbol. Eg: +naruto
    • Prepend words that must not appear with a – symbol. Eg: -boruto
  • genre

    A comma separated string of identifiers (maximum 10) of genres. The list of possible genres are listed below:

    • action
    • adventure
    • avant-garde
    • cars
    • childcare
    • comedy
    • crime
    • dementia
    • demons
    • detective
    • drama
    • dub
    • ecchi
    • family
    • fantasy
    • game
    • gender-bender
    • gourmet
    • harem
    • historical
    • horror
    • isekai
    • josei
    • kids
    • magic
    • mahou-shoujo
    • martial-arts
    • mecha
    • military
    • music
    • mystery
    • mythology
    • parody
    • police
    • psychological
    • romance
    • romantic-subtext
    • samurai
    • school
    • sci-fi
    • seinen
    • shoujo
    • shoujo-ai
    • shounen
    • shounen-ai
    • slice-of-life
    • space
    • sports
    • strategy-game
    • super-power
    • supernatural
    • suspense
    • thriller
    • time-travel
    • vampire
    • work-life
    • yaoi
    • yuri
  • status

    Can be: completed or ongoing

  • release

    The release year of the anime, example: 2020

  • noEpisodes

    Set to “on” to not return any episode related data in the API response

  • sortBy

    The order to sort the anime in. Possible options: relevancypopularitypublishedAt, random.
    relevancy = anime more closely related to q come first.
    popularity = anime from popular sources come first.
    publishedAt = newest anime come first.
    random = random anime.

    Default: publishedAt

  • pageSize *must be int

    The number of results to return per page.

    Default: 8. Maximum: 20.

  • page *must be int

    Use this to page through the results.

    Default: 1.

Response object

The results of the request:
– anime – array[anime]

– callcount – The number of API calls remaining for your API key

Contents of an anime object:

  • title
    The title of the anime.
  • description
    A description of the anime.
  • url
    The ID to the anime.
  • urlToImage
    The URL to a relevant image for the anime.
  • status
    The status of the anime. Can be: Completed or Ongoing.
  • release

    The release year of the anime. Example: 2020.

  • genre
    A comma separated list of genres which apply to the anime.
  • episodes
    An ordered list of anime episodes, each element containing multiple embed options of the same episode, from different websites.

Errors

If you make a bad request we’ll let you know by returning a relevant HTTP status code along with more details in the body. You will also get the “callcount” API response, containing the remaining number of API calls for your API key for the current day.

Example of an API response

image

Caching

You are required to cache all data you get from an API request to prevent subsequent requests of the same data. If you cache the data, you will be serving the data from your local system from memory. This will be much faster and more efficient than constantly making an API request. If we notice that you are not caching your requests and sending too many hits, we may have throttle your connection to the API.

You can use any caching methods you want. We recommend using Redis/Memcached.

HTTP Client

You can connect to the API using various methods. We highly recommend using Guzzle if you are using PHP.

Live Updates

The API has the capability to notify registered users about updates that are made. For example, when a new episode is added, the API will notify your site so that you can clear your cache accordingly to display the new data. If you would like to receive live updates from the API, contact us on Discord and ask for an API key along with your site URL.

WordPress Plugin which uses the API

Currently, you can use the AnimeAPI in the Ultimate Anime Scraper plugin for WordPress. It provides a done-for-you implementation of this API and it is always kept updated and functional.