npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shadowmanga-scraper

v0.1.2

Published

TypeScript client for consuming the shademanga.com REST APIs

Readme

shadowmanga-scraper

A TypeScript client for consuming the shademanga.com REST APIs. Search manga, browse tags, and fetch series details with full type safety.

Installation

npm install shadowmanga-scraper

Requires Node.js 18+ (uses native fetch).

Usage

import { ShadeMangaClient } from 'shadowmanga-scraper';

const client = new ShadeMangaClient();

// Get all available tags
const tags = await client.getTags();
console.log(tags); // ['Acción', 'Adventure', 'Comedy', ...]

// Search for manga
const results = await client.search({ query: 'frieren' });
console.log(results[0].titulo); // 'Sousou no Frieren'

// Get series detail with chapters
const series = await client.getSeries('zUIH4L');
console.log(series.titulo);           // 'Sousou no Frieren'
console.log(series.capitulos.length); // 100+

API Reference

new ShadeMangaClient(options?)

Creates a new client instance.

| Option | Type | Default | Description | |----------|----------|--------------------------|--------------------------| | baseUrl | string | https://shademanga.com | API base URL | | timeout | number | 10000 | Request timeout in ms |

client.getTags(): Promise<string[]>

Returns all available manga tags/genres.

Endpoint: GET /api/series-locales/tags

client.search(options): Promise<MangaSearchResult[]>

Search manga by title.

| Option | Type | Default | Description | |-------------------|-----------|---------|------------------------------------| | query | string | — | Required. Search query | | tags | string | — | Filter by tag/genre (e.g. Fantasía) | | includeAdult | boolean | false | Include adult content | | showSinPortada | boolean | false | Show results without cover | | take | number | 120 | Max results to return |

Endpoint: GET /api/series-locales/search-candidates?q={query}&...

client.getSeries(idOrPublicId): Promise<SeriesDetail>

Get full series detail including chapters.

| Parameter | Type | Description | |------------------|--------------------|----------------------------------| | idOrPublicId | string \| number | Series numeric ID or public ID |

Endpoint: GET /api/series-locales/{idOrPublicId}

client.getChapterPages(serieId, capituloId): Promise<ChapterPages>

Get all page URLs for a specific chapter.

| Parameter | Type | Description | |-------------|--------------------|------------------------------------| | serieId | string \| number | Series numeric ID or public ID | | capituloId | string \| number | Chapter numeric ID or public ID |

Endpoint: GET /api/series-locales/{serieId}/capitulos/{capituloId}/paginas

Returns: ChapterPages with paginas (array of image URLs), totalPaginas, and IDs.

client.getPopular(options?): Promise<PopularMangaResponse>

Get paginated list of popular manga.

| Option | Type | Default | Description | |----------|----------|---------|--------------------------| | pageSize | number | 24 | Items per page | | page | number | 1 | Page number |

Endpoint: GET /api/series-locales/populares?pageSize={pageSize}&page={page}

Returns: PopularMangaResponse with items, pagination info (page, pageSize, total, totalPages), and pageTokens for cursor-based navigation.

Types / Interfaces

All types are fully exported:

import type {
  Chapter,
  ChapterPages,
  MangaSearchResult,
  SeriesDetail,
  SearchOptions,
  ShadeMangaClientOptions,
  PopularMangaResponse,
  PopularMangaResult,
  PageTokens,
  PopularOptions,
} from 'shadowmanga-scraper';

MangaSearchResult

interface MangaSearchResult {
  id: number;
  publicId: string;
  titulo: string;
  autor: string | null;
  generos: string;
  titulosAlternativos: string | null;
  estado: string;
  esMayorDeEdad: boolean;
  esDestacada: boolean;
  puntuacion: number | null;
  fechaActualizacion: string;
  portadaUrl: string;
  sinPortada: boolean;
  grupoScanNombre: string | null;
  grupoScanSlug: string | null;
}

SeriesDetail

interface SeriesDetail {
  id: number;
  publicId: string;
  titulo: string;
  descripcion: string | null;
  autor: string | null;
  tags: string | null;
  tagsDescripcion: string | null;
  portadaUrl: string;
  portadaFocalPoint: string | null;
  generos: string;
  titulosAlternativos: string | null;
  esMayorDeEdad: boolean;
  estaEnEmision: boolean;
  esDestacada: boolean;
  esRevisado: boolean;
  visible: boolean;
  puntuacion: number | null;
  estado: string;
  tipo: string | null;
  fechaCreacion: string;
  fechaActualizacion: string;
  grupoScanId: number | null;
  grupoScanNombre: string | null;
  grupoScanSlug: string | null;
  capitulos: Chapter[];
}

ChapterPages

interface ChapterPages {
  paginas: string[];
  totalPaginas: number;
  capituloId: number;
  publicCapituloId: string;
  serieId: number;
  publicSerieId: string;
}

Chapter

interface Chapter {
  id: number;
  publicId: string;
  numeroCapitulo: number;
  titulo: string | null;
  archivoNombre: string;
  archivoTamano: number;
  totalPaginas: number;
  fechaSubida: string;
  orden: number;
  visible: boolean;
  tomoId: number | null;
}

PopularMangaResult

interface PopularMangaResult {
  id: number;
  publicId: string;
  titulo: string;
  autor: string | null;
  generos: string;
  portadaUrl: string;
  esMayorDeEdad: boolean;
  esDestacada: boolean;
  fechaActualizacion: string;
  fechaCreacion: string;
  puntuacion: number | null;
  estado: string;
  totalCapitulos: number;
}

PopularMangaResponse

interface PopularMangaResponse {
  items: PopularMangaResult[];
  page: number;
  pageSize: number;
  total: number;
  totalPages: number;
  pageTokens: PageTokens;
}

PageTokens

interface PageTokens {
  current: string;
  prev: string | null;
  next: string | null;
  first: string;
  last: string;
}

Error Handling

All methods throw on failure:

  • HTTP errors: ShadeManga API error: {status} {statusText}
  • Timeouts: ShadeManga API request timed out after {timeout}ms
  • Network errors: Native fetch errors are re-thrown
try {
  const series = await client.getSeries('invalid-id');
} catch (error) {
  if (error instanceof Error) {
    console.error(error.message);
  }
}

License

MIT