falcon71181 / Anime-API

Anime API (using web scraping)
https://api-anime-rouge.vercel.app
GNU General Public License v3.0
56 stars 28 forks source link
anime anime-scraper aniwatch zoro

⚡Anime-API⚡


api-anime-rouge.vercel.app



Check it out at api-anime-rouge.vercel.app.

## ⚡ Web Scraping Status Anime Websites | STATUS -------------- | ------------- aniwatch | DONE gogoanime | WORKING ON IT kickassanime | IN FUTURE >[!NOTE] >More Websites Will be Added in Future ## Index - [AniWatch](#aniwatch) - [GogoAnime](#gogoanime) ## AniWatch ### `GET` AniWatch Home Page #### Endpoint ```url https://api-anime-rouge.vercel.app/aniwatch/ ``` #### Request sample ```typescript const resp = await fetch("https://api-anime-rouge.vercel.app/aniwatch/"); const data = await resp.json(); console.log(data); ``` #### Response Schema ```typescript { spotlightAnimes: [ { id: string, name: string, rank: number, img: string, episodes: { eps: number, sub: number, dub: number, }, duration: string, quality: string, category: string, releasedDay: string, descriptions: string, }, {...}, ], trendingAnimes: [ { id: string, name: string, img: string, }, {...}, ], latestEpisodes: [ { id: string, name: string, img: string, episodes: { eps: number, sub: number, dub: number, }, duration: string, rated: boolean, }, {...}, ], top10Animes: { day: [ { id: string, name: string, rank: number, img: string, episodes: { eps: number, sub: number, dub: number, }, }, {...}, ], week: [...], month: [...] }, featuredAnimes: { topAiringAnimes: [ { id: string, name: string, img: string, }, {...}, ], mostPopularAnimes: [ { id: string, name: string, img: string, }, {...}, ], mostFavoriteAnimes: [ { id: string, name: string, img: string, }, {...}, ], latestCompletedAnimes: [ { id: string, name: string, img: string, }, {...}, ], }, topUpcomingAnimes: [ { id: string, name: string, img: string, episodes: { eps: number, sub: number, dub: number, }, duration: string, rated: boolean, }, {...}, ], genres: string[] } ``` ### `GET` AniWatch A to Z List Page #### Endpoint ```url https://api-anime-rouge.vercel.app/aniwatch/az-list?page=${page} ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `page` | number | Page No. of Search Page | YES | 1 | #### Request sample ```typescript const resp = await fetch("https://api-anime-rouge.vercel.app/aniwatch/az-list?page=69"); const data = await resp.json(); console.log(data); ``` #### Response Schema ```typescript [ { "id": string, "name": string, "category": string, "img": string, "episodes": { "eps": number, "sub": number, "dub": number } }, {...}, ], ``` ### `GET` Anime About Info #### Endpoint ```sh https://api-anime-rouge.vercel.app/aniwatch/anime/:id ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `id` | string | The unique Anime ID | YES | ----- | > [!NOTE] > Anime ID should be In Kebab Case #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/aniwatch/anime/jujutsu-kaisen-2nd-season-18413" ); const data = await res.json(); console.log(data); ``` #### Response Schema ``` typescript { "info": { "id": string, "anime_id": number, "mal_id": number, "al_id": number, "name": string, "img": string, "rating": string, "episodes": { "eps": number, "sub": number, "dub": number }, "category": string, "quality": string, "duration": string, "description": string }, "moreInfo": { "Japanese:": string, "Synonyms:": string, "Aired:": string, "Premiered:": string, "Duration:": string, "Status:": string, "MAL Score:": string, "Studios:": string[], "Genres": string[], "Producers": string[] }, "seasons": [ { "id": string, "name": string, "seasonTitle": string, "img": string, "isCurrent": boolean }, {...}, }, "relatedAnimes": [ { "id": string, "name": string, "category": string, "img": string, "episodes": { "eps": number, "sub": number, "dub": number } }, {...}, ], "recommendedAnimes": [ { "id": string, "name": string, "img": string, "episodes": { "eps": number, "sub": number, "dub": number }, "duration": string, "rated": boolean }, {...}, ], "mostPopularAnimes": [ { "id": string, "name": string, "category": string, "img": string, "episodes": { "eps": number, "sub": number, "dub": number } }, {...}, ], } ``` ### `GET` Search Anime #### Endpoint ```sh https://api-anime-rouge.vercel.app/aniwatch/search?keyword=$(query)&page=$(page) ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `query` | string | Search Query for Anime | YES | ----- | | `page` | number | Page No. of Search Page | YES | 1 | > [!NOTE] >
Search Query should be In Kebab Case
>
Page No should be a Number
#### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/aniwatch/search?keyword=one+piece&page=1" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript { "animes": [ { "id": string, "name": string, "img": string, "episodes": { "eps": number, "sub": number, "dub": number }, "duration": string, "rated": boolean }, {...}, ], "mostPopularAnimes": [ { "id": string, "name": string, "category": string, "img": string, "episodes": { "eps": number, "sub": number, "dub": number } }, {...}, ], "currentPage": number, "hasNextPage": boolean, "totalPages": number, "genres": string[] } ``` ### `GET` Category Anime #### Endpoint ```sh https://api-anime-rouge.vercel.app/aniwatch/:category?page=$(page) ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `category`| string | Search Query for Anime | YES | ----- | | `page` | number | Page No. of Search Page | YES | 1 | > [!NOTE] >
category should be In Kebab Case
>
Page No should be a Number
> [!TIP] > Add type to Category - "subbed-anime" | "dubbed-anime" | "tv" | "movie" | "most-popular" | "top-airing" | "ova" | "ona" | "special" | "events"; #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/aniwatch/ona?page=1" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript { "animes": [ { "id": string, "name": string, "img": string, "episodes": { "eps": number, "sub": number, "dub": number }, "duration": string, "rated": boolean }, {...}, ], "top10Animes": { "day": [ { "id": string, "name": string, "rank": number, "img": string, "episodes": { "eps": number, "sub": number, "dub": number } }, {..}, ], "week": [ { "id": string, "name": string, "rank": number, "img": string, "episodes": { "eps": number, "sub": number, "dub": number } }, {...}, ], "month": [ { "id": string, "name": string, "rank": number, "img": string, "episodes": { "eps": number, "sub": number, "dub": number } }, {...}, ], "category": string, "genres": string[], "currentPage": number, "hasNextPage": boolean, "totalPages": number } ``` ### `GET` Anime Episodes #### Endpoint ```sh https://api-anime-rouge.vercel.app/aniwatch/episodes/:id ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `id` | string | Anime ID | YES | ----- | > [!NOTE] >
Anime ID should be In Kebab Case
#### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/aniwatch/episodes/one-piece-100" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript { "totalEpisodes": number, "episodes": [ { "name": string, "episodeNo": number, "episodeId": string, "filler": boolean }, {...}, ] } ``` ### `GET` Anime Episodes Servers #### Endpoint ```sh https://api-anime-rouge.vercel.app/aniwatch/servers?id=${id} ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `id` | string | Episode ID | YES | ----- | > [!NOTE] >
Episode ID should be In Kebab Case
important > [!NOTE] >
id is a combination of AnimeId and EpisodeId
eg. ```bash one-piece-100?ep=84802 ``` #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/aniwatch/servers?id=one-piece-100?ep=84802" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript { "episodeId": string, "episodeNo": number, "sub": [ { "serverName": string, "serverId": number }, {...}, ], "dub": [ { "serverName": string, "serverId": number }, {...}, ], } ``` ### `GET` Anime Episode Streaming Source Links #### Endpoint ```sh https://api-anime-rouge.vercel.app/anime/episode-srcs?id={episodeId}&server={server}&category={category} ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :--------: | :----: | :-------------------------------------------: | :-------: | :--------------: | | `id` | string | episode Id | Yes | -- | | `server` | string | server name. | No | `"vidstreaming"` | | `category` | string | The category of the episode ('sub' or 'dub'). | No | `"sub"` | #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/aniwatch/episode-srcs?id=solo-leveling-18718?ep=120094&server=vidstreaming&category=sub" ); const data = await resp.json(); console.log(data); ``` > [!CAUTION] > decryption key changes frequently ..., it sometime may not work #### Response Schema ```typescript { headers: { Referer: string, "User-Agent": string, ... }, sources: [ { url: string, isM3U8: boolean, quality?: string, }, {...} ], subtitles: [ { lang: "English", url: string, }, {...} ], anilistID: number | null, malID: number | null, } ``` ## GoGoAnime ### `GET` GoGoAnime Recent Releases ### `GET` GoGoAnime Home #### Endpoint ```sh https://api-anime-rouge.vercel.app/gogoanime/home ``` #### Request sample ```javascript const resp = await fetch("https://api-anime-rouge.vercel.app/gogoanime/home"); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript [ "genres": string[], "recentReleases": [ { "id": string, "name": string, "img": string, "episodeId": string, "episodeNo": number, "subOrDub": "SUB" | "DUB", "episodeUrl": string, }, {...}, ], "recentlyAddedSeries": [ { "id": string, "name": string, "img": string, }, {...}, ], "onGoingSeries": [ { "id": string, "name": string, "img": string, }, {...}, ], ] ``` #### Endpoint ```sh https://api-anime-rouge.vercel.app/gogoanime/recent-releases?page=${page} ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `page` | number | Page No. of Search Page | YES | 1 | #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/gogoanime/recent-releases" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript [ { "id": string, "name": string, "img": string, "episodeId": string, "episodeNo": number, "episodeUrl": string, "subOrDub": string // "SUB" | "DUB" }, {...}, ] ``` ### `GET` GoGoAnime New Seasons #### Endpoint ```sh https://api-anime-rouge.vercel.app/gogoanime/new-seasons?page=${page} ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `page` | number | Page No. of Search Page | YES | 1 | #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/gogoanime/new-seasons" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript [ { "id": string, "name": string, "img": string, "releasedYear": string, "animeUrl": string }, {...}, ] ``` ### `GET` GoGoAnime Popular #### Endpoint ```sh https://api-anime-rouge.vercel.app/gogoanime/popular?page=${page} ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `page` | number | Page No. of Search Page | YES | 1 | #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/gogoanime/popular" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript [ { "id": string, "name": string, "img": string, "releasedYear": string, "animeUrl": string }, {...}, ] ``` ### `GET` GoGoAnime Anime Movies #### Endpoint ```sh https://api-anime-rouge.vercel.app/gogoanime/anime-movies?page=${page} ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `page` | number | Page No. of Search Page | YES | 1 | #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/gogoanime/anime-movies" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript [ { "id": string, "name": string, "img": string, "releasedYear": string, "animeUrl": string }, {...}, ] ``` ### `GET` GoGoAnime Top Airing #### Endpoint ```sh https://api-anime-rouge.vercel.app/gogoanime/top-airing?page=${page} ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `page` | number | Page No. of Search Page | YES | 1 | #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/gogoanime/top-airing" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript [ { "id": string, "name": string, "img": string, "latestEp": string, "animeUrl": string, "genres": string[] }, {...}, ] ``` ### `GET` Search Anime #### Endpoint ```sh https://api-anime-rouge.vercel.app/gogoanime/search?keyword=$(query)&page=$(page) ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `query` | string | Search Query for Anime | YES | ----- | | `page` | number | Page No. of Search Page | YES | 1 | > [!NOTE] >
Search Query should be In Kebab Case
>
Page No should be a Number
#### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/gogoanime/search?keyword=one+piece&page=1" ); const data = await res.json(); console.log(data); ``` #### Response Schema ```typescript { "animes": [ { "id": string, "name": string, "img": string, "releasedYear": string }, {...}, ], "mostPopularAnimes": [ { "id": string, "name": string, "category": string, "img": string, "episodes": { "eps": number, "sub": number, "dub": number } }, {...}, ], "currentPage": number, "hasNextPage": boolean, "totalPages": number } ``` ### `GET` Anime About Info #### Endpoint ```sh https://api-anime-rouge.vercel.app/gogoanime/anime/:id ``` #### Query Parameters | Parameter | Type | Description | Required? | Default | | :-------: | :----: | :----------------------------------: | :-------: | :-----: | | `id` | string | The unique Anime ID | YES | ----- | > [!NOTE] > Anime ID should be In Kebab Case #### Request sample ```javascript const resp = await fetch( "https://api-anime-rouge.vercel.app/gogoanime/anime/one-piece" ); const data = await res.json(); console.log(data); ``` #### Response Schema ``` typescript { "id": string, "info": { "name": string, "img": string, "type": string, "genre": string[], "status": string, "aired_in": number, "other_name": string, "episodes": number } } ``` ############################################################################# ## 🖱️ For Front End > [!TIP] > Kindly use this repo to make Front End - [Eltik / Anify](https://github.com/Eltik/Anify) ############################################################################# ## 🤝 Thanks ❤️ - [consumet.ts](https://github.com/consumet/consumet.ts) - [ghoshRitesh12](https://github.com/ghoshRitesh12)