
A simple anime streaming scraper package
A simple anime streaming scraper package
Created by CEDDSDEV.
npm install nimeheaven-api
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const results = await api.search('naruto', { page: 1, limit: 10 });
console.log(results);
} catch (error) {
console.error(error);
}
}
cedds();
The package uses Node's built-in fetch, so it has no runtime dependencies.
The package supports both CommonJS and modern ESM imports:
import NimeHeaven from 'nimeheaven-api';
const api = new NimeHeaven();
const home = await api.home({ page: 1, limit: 20 });
console.log(home);
Named exports are also available:
import NimeHeaven, {
nimeheaven,
NimeHeavenError,
} from 'nimeheaven-api';
Each example can be used independently after installing the package.
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const info = await api.info();
console.log(info);
} catch (error) {
console.error(error);
}
}
cedds();
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const home = await api.home({ page: 1, limit: 20 });
console.log('Current schedule:', home.schedule);
console.log('Pagination:', home.pagination);
} catch (error) {
console.error(error);
}
}
cedds();
The home() method requests the API root with the supplied pagination options.
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const episodes = await api.newEpisodes({ page: 1, limit: 20 });
console.log(episodes);
} catch (error) {
console.error(error);
}
}
cedds();
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const popular = await api.popular({ page: 1, limit: 20 });
console.log(popular);
} catch (error) {
console.error(error);
}
}
cedds();
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const results = await api.search('one piece', {
page: 1,
limit: 10,
});
console.log(results);
} catch (error) {
console.error(error);
}
}
cedds();
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const suggestions = await api.fastSearch('one pi', {
page: 1,
limit: 10,
});
console.log(suggestions);
} catch (error) {
console.error(error);
}
}
cedds();
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const season = await api.season('2025summer', {
page: 1,
limit: 20,
});
console.log(season);
} catch (error) {
console.error(error);
}
}
cedds();
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const anime = await api.anime('1ht8d');
console.log('Title:', anime.title);
console.log('Anime details:', anime);
} catch (error) {
console.error(error);
}
}
cedds();
const NimeHeaven = require('nimeheaven-api');
async function cedds() {
try {
const api = new NimeHeaven();
const stream = await api.stream('1ht8d', 1165);
console.log('Stream information:', stream);
} catch (error) {
console.error(error);
}
}
cedds();
The stream() method uses an anime ID and episode ID to request stream information.
await api.info();
await api.home({ page: 1, limit: 20 });
await api.newEpisodes({ page: 1, limit: 20 });
await api.popular({ page: 1, limit: 20 });
await api.search('one piece', { page: 1, limit: 20 });
await api.fastSearch('one pi', { page: 1, limit: 10 });
await api.season('2025summer', { page: 1, limit: 20 });
await api.anime('1ht8d');
await api.stream('1ht8d', 1165);
Pagination defaults are provided by the API. limit must be from 1 to 100.
Network failures, timeouts, and API errors throw NimeHeavenError:
const { NimeHeavenError } = require('nimeheaven-api');
try {
await api.anime('unknown-id');
} catch (error) {
if (error instanceof NimeHeavenError) {
console.error(error.code, error.status, error.message);
}
}
Type declarations.
import NimeHeaven from 'nimeheaven-api';
const api = new NimeHeaven();
async function cedds() {
try {
const home = await api.home({
page: 1,
limit: 20,
});
const searchResults = await api.search('naruto', {
page: 1,
limit: 10,
});
console.log(home);
console.log(searchResults);
} catch (error) {
console.error(error);
}
}
cedds();
TypeScript generics when you have a known response shape:
interface SearchResponse {
results: unknown[];
pagination?: {
page: number;
total: number;
};
}
const results = await api.search<SearchResponse>('naruto');
console.log(results.results);
MIT © CEDDSDEV
No updates yet.
Building a dev tool or hiring developers? Get seen here. Become our Sponsor
Building a dev tool or hiring developers? Get seen here. Become our Sponsor