This project includes:
- A scraper for the website "vidstream.to"
- A parser for the stream provider "rabbitstream.net"
Important
- This API is just an unofficial api for vidstream.to and is in no other way officially related to the same.
- The content that this api provides is not mine, nor is it hosted by me. These belong to their respective owners. This api just demonstrates how to build an api that scrapes websites and uses their content.
To get this project on your local machine run the following command.
git clone https://github.com/WBRK-dev/vidstream-api.git
After that go into the new directory and install all the dependencies.
npm install
When you are done with installing run the serve command.
npm start
Now the api is accessible through localhost:4030
.
/home
{
spotlight: [
{
id: string,
title: string,
banner: string,
poster: string,
rating: string,
year: string,
},
{ ... }
],
trending: {
movies: [
{
id: string,
title: string,
poster: string,
stats: {
duration: string,
rating: string,
year: string,
}
},
{ ... }
],
tvSeries: [
{
id: string,
title: string,
poster: string,
stats: {
seasons: string,
rating: string,
}
},
{ ... }
]
},
latestMovies: [
{
id: string,
title: string,
poster: string,
stats: {
duration: string,
rating: string,
year: string,
}
},
{ ... }
],
latestTvSeries: [
{
id: string,
title: string,
poster: string,
stats: {
seasons: string,
rating: string,
}
},
{ ... }
]
}
/search?q={searchQuery}&page={pageIndex}
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
searchQuery |
string | The search string. E.g. "family guy". | Yes | -- |
pageIndex |
number | The index of the page. | No | 1 |
{
items: [
{
id: string,
title: string,
poster: string,
stats: {
duration: string,
rating: string,
year: string,
}
},
{
id: string,
title: string,
poster: string,
stats: {
seasons: string,
rating: string,
}
},
{ ... }
],
pagination: {
current: number,
total: number,
}
}
/movie/{movieId}
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
movieId |
string | The movie id given in e.g. /home . |
Yes | -- |
episodeId is only available when type is equal to movie and only has one episode.
{
title: string,
description: string,
type: "movie" | "tvSeries",
stats: { name: string, value: string | string[] }[],
episodeId?: string,
related: [
{
id: string,
title: string,
poster: string,
stats: {
seasons: string,
rating: string,
}
},
{
id: string,
title: string,
poster: string,
stats: {
year: string,
duration: string,
rating: string,
}
},
{ ... }
]
}
/movie/{movieId}/seasons
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
movieId |
string | The movie id given in e.g. /home . |
Yes | -- |
{
seasons: [
{
id: string,
number: number,
},
{ ... }
]
}
/movie/{movieId}/episodes?seasonId={seasonId}
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
movieId |
string | The movie id given in e.g. /home . |
Yes | -- |
seasonId |
string | The season id given in /movie/{movieId}/seasons . |
Yes | -- |
{
episodes: [
{
id: string,
number: number,
title: string,
},
{ ... }
]
}
/movie/{movieId}/servers?episodeId={episodeId}
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
movieId |
string | The movie id given in e.g. /home . |
Yes | -- |
episodeId |
string | The episode id given in e.g. /movie/{movieId}/episodes . |
Yes | -- |
{
servers: [
{
id: string,
name: string,
},
{ ... }
]
}
/movie/{movieId}/sources?serverId={serverId}
Parameter | Type | Description | Required? | Default |
---|---|---|---|---|
movieId |
string | The movie id given in e.g. /home . |
Yes | -- |
serverId |
string | The server id given in /movie/{movieId}/servers . |
Yes | -- |
{
sources: [
{
src: string,
type: string,
},
{ ... }
],
tracks: [
{
file: string,
label: string,
kind: string,
default?: string,
},
{ ... }
]
}
None
- ghoshRitesh12/aniwatch-api for providing a codebase structure I used in this project.