Searching (Advanced)
Used for querying media only in the database via genres, tags, and more. Media will not be added to the mapping queue if there are no results found unlike the search route. Technical details regarding the usage of the search advanced function for anime, manga, and novels can be found below. Example code is provided for both JavaScript and Python, along with a response schema.
Rate Limits
The search advanced route has a rate limit of 25 requests per minute unless you provide a whitelisted API key.
Route Schema (URL)
https://api.anify.tv/search-advanced?query={query}&formats={formats}&type={type}&genres={genres}&genresExcluded={genresExcluded}&tags={tags}&tagsExcluded={tagsExcluded}&year={year}&page={page}&sort={sort}&sortDirection={sortDirection}
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
type | string | The type of media to search for. Must be either anime , manga , or novel . | Yes | "" |
query | string | The search query; i.e. the title of the item you are looking for. | No | "" |
formats | string | The formats to search for. | No | Based on the type given. Eg. anime will be TV,ONA,OVA,etc. |
genres | string array | Genres to include in searching. | No | [] |
genresExcluded | string array | Genres to exclude in searching. | No | [] |
tags | string array | Tags to include in searching. | No | [] |
tagsExcluded | string array | Tags to exclude in searching. | No | [] |
season | string | The season to search for. Must be SUMMER , SPRING , WINTER , FALL , or UNKNOWN . | No | UNKNOWN |
year | number | The year to search for. | No | 0 |
sort | string | How to sort the returned data. Must be either averageRating , averagePopularity , title , year , totalEpisodes , totalChapters , or totalVolumes . | No | title |
sortDirection | string | Which direction to sort. Must be either ASC or DESC . | No | ASC |
page | number | Page to search for. | No | 1 |
perPage | number | Results to show per page. | No | 20 |
apikey | string | Whitelisted API key | No | "" |
Request Samples
import axios from "axios";
const genresExcluded = ["Ecchi", "Slice of Life"];
// Using the example query "mushoku tensei"
const url = `https://api.anify.tv/search?query=mushoku%20tensei&type=anime&genres=[]&genresExcluded=${JSON.stringify(genresExcluded)}&formats=TV,ONA`;
const data = async () => {
try {
const { data } = await axios.get(url);
return data;
} catch (err) {
throw new Error(err.message);
}
};
console.log(data);
Response Schema
MIME Type: application/json
Reason: Occurs when the request was successful.
{
"results": [{
"id": "string",
"slug": "string",
"coverImage": "string",
"bannerImage": "string",
"trailer": "string | null",
"status": "FINISHED | RELEASING | NOT_YET_RELEASED | CANCELLED | HIATUS",
"season": "SUMMER | FALL | WINTER | SPRING",
"title": {
"native": "string | null",
"romaji": "string | null",
"english": "string | null"
},
"currentEpisode": "number | null",
"mappings": [
{
"id": "string",
"providerId": "string",
"similarity": "number",
"providerType": "ANIME | MANGA | META | INFORMATION"
},
],
"synonyms": ["string"],
"countryOfOrigin": "string",
"description": "string",
"duration": "number | null",
"color": "string | null",
"year": "number | null",
"rating": {
"mal": "number | null",
"tvdb": "number | null",
"kitsu": "number | null",
"anilist": "number | null",
"anidb": "number | null",
"tmdb": "number | null",
"comick": "number | null",
"mangadex": "number | null",
"novelupdates": "number | null"
},
"popularity": {
"mal": "number | null",
"tvdb": "number | null",
"kitsu": "number | null",
"anilist": "number | null",
"anidb": "number | null",
"tmdb": "number | null",
"comick": "number | null",
"mangadex": "number | null",
"novelupdates": "number | null"
},
"type": "ANIME | MANGA",
"format": "TV | TV_SHORT | MOVIE | SPECIAL | OVA | ONA | MUSIC | MANGA | NOVEL | ONE_SHOT | UNKNOWN",
"relations": [
{
"id": "number",
"data": {
"id": "number",
"type": "ANIME | MANGA",
"title": {
"userPreferred": "string"
},
"format": "TV | TV_SHORT | MOVIE | SPECIAL | OVA | ONA | MUSIC | MANGA | NOVEL | ONE_SHOT | UNKNOWN",
"status": "FINISHED | RELEASING | NOT_YET_RELEASED | CANCELLED | HIATUS",
"coverImage": {
"large": "string"
},
"bannerImage": "string | null"
},
"type": "ADAPTATION | PREQUEL | SEQUEL | PARENT | SIDE_STORY | CHARACTER | SUMMARY | ALTERNATIVE | SPIN_OFF | OTHER | SOURCE | COMPILATION | CONTAINS"
},
],
"characters": [
{
"name": "string",
"image": "string",
"voiceActor": {
"name": "string",
"image": "string"
}
}
],
"totalEpisodes": "number | null",
"totalVolumes": "number | null",
"totalChapters": "number | null",
"genres": ["string"],
"tags": ["string"],
"episodes": {
"latest": {
"updatedAt": "number",
"latestTitle": "string",
"latestEpisode": "number"
},
"data": [{
"episodes": [
{
"id": "string",
"img": "string | null",
"title": "string",
"hasDub": "boolean",
"description": "string | null",
"rating": "number | null",
"number": "number",
"isFiller": "boolean",
"updatedAt": "number"
}
],
"providerId": "string"
}]
},
"chapters": {
"latest": {
"updatedAt": "number",
"latestTitle": "string",
"latestChapter": "number"
},
"data": [{
"chapters": [
{
"id": "string",
"title": "string",
"number": "number",
"rating": "number | null",
"updatedAt": "number",
"mixdrop": "string | null"
}
],
"providerId": "string"
}]
},
"averageRating": "number",
"averagePopularity": "number",
"artwork": [
{
"img": "string",
"type": "banner | poster | clear_logo | top_banner",
"providerId": "string"
}
]
}],
"total": "number",
"lastPage": "number"
}