CEDDSDEV
N

Niheaven

BuildingProven

A simple anime streaming scraper package

Visit site

Made by

CE
CEDDSDEV

@ceddsdev

Newbie Developer

Open to freelanceAklan, Philippines
View profile · 5 projects

Journey

No posts yet. CEDDSDEV shares progress on this project here.

README

nimeheaven-api

A simple anime streaming scraper package

Created by CEDDSDEV.

Installation

npm install nimeheaven-api

Quick start

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.

ESM usage

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';

Examples

Each example can be used independently after installing the package.

1. Get API information

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();

2. Get the home schedule

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.

3. Get new episodes

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();

4. Get popular anime

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();

5. Search for anime

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();

6. Search autocomplete suggestions

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();

7. Get anime from a season

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();

8. Get anime information

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();

9. Get stream information for an episode

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.

Available methods

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.

Error handling

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);
  }
}

TypeScript

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);

License

MIT © CEDDSDEV

More from CEDDSDEV

J

jaymar-profile

A personal profile website for Jaymar Alcedo, featuring an introduction and links to social profiles. Open source btw

Building
💻

Tikxedds-api

TikTok Downloader/Search/Profile

Live
P

Pinterest-dl

A lightweight, zero-dependency Node.js client for the CEDDSDEV Pinterest Downloader API. Resolve Pinterest pins, videos…

Building
🙂

Pinterest-Downloader

For Pinterest Downloader, support: gif, image and mp4

Live

Building a dev tool or hiring developers? Get seen here. Become our Sponsor

Stays free because of
  • Reymark Aguila
  • Doctor Scoliosis
  • Carlo Dandan
  • Blairwitchii
  • </Peter> "21st Dev Vinci"
  • Natzui Alyx
  • Francis Mike John Camogao
  • RCastromero()
  • Reymark Aguila
  • Doctor Scoliosis
  • Carlo Dandan
  • Blairwitchii
  • </Peter> "21st Dev Vinci"
  • Natzui Alyx
  • Francis Mike John Camogao
  • RCastromero()
  • Reymark Aguila
  • Doctor Scoliosis
  • Carlo Dandan
  • Blairwitchii
  • </Peter> "21st Dev Vinci"
  • Natzui Alyx
  • Francis Mike John Camogao
  • RCastromero()
  • Reymark Aguila
  • Doctor Scoliosis
  • Carlo Dandan
  • Blairwitchii
  • </Peter> "21st Dev Vinci"
  • Natzui Alyx
  • Francis Mike John Camogao
  • RCastromero()
Join them

Building a dev tool or hiring developers? Get seen here. Become our Sponsor

Stays free because of
  • Natzui Alyx
  • Reymark Aguila
  • Blairwitchii
  • </Peter> "21st Dev Vinci"
  • Carlo Dandan
  • Doctor Scoliosis
  • Francis Mike John Camogao
  • RCastromero()
  • Natzui Alyx
  • Reymark Aguila
  • Blairwitchii
  • </Peter> "21st Dev Vinci"
  • Carlo Dandan
  • Doctor Scoliosis
  • Francis Mike John Camogao
  • RCastromero()
  • Natzui Alyx
  • Reymark Aguila
  • Blairwitchii
  • </Peter> "21st Dev Vinci"
  • Carlo Dandan
  • Doctor Scoliosis
  • Francis Mike John Camogao
  • RCastromero()
  • Natzui Alyx
  • Reymark Aguila
  • Blairwitchii
  • </Peter> "21st Dev Vinci"
  • Carlo Dandan
  • Doctor Scoliosis
  • Francis Mike John Camogao
  • RCastromero()
Join them