Narou is a TypeScript library that provides a fluent interface wrapper for the Narou Developer APIs (dev.syosetu.com), which allow programmatic access to data from the Japanese web novel publishing site Shousetsuka ni Narou. It supports various APIs including novel search, ranking retrieval, ranking history, and R18 novel search. The library currently stands at version 2.0.1, with recent releases showing active maintenance and minor bug fixes. It differentiates itself by offering a method-chaining syntax, full TypeScript type safety, and multi-environment compatibility, automatically selecting between native `fetch` for Node.js and JSONP for browser environments. It also boasts comprehensive coverage of all Narou Developer APIs, ensuring access to the full range of data provided by the Narou Developer Portal.
npm install narouVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates searching for novels by keywords and genre, and retrieving daily rankings, showcasing the fluent API.
Ensure your Node.js environment is v18+ for native `fetch`, or provide a global `fetch` polyfill if using Node.js v16-v17. This usually does not require changes unless you had custom `fetchOptions`.
Upgrade your Node.js runtime to version 16.0.0 or later. Use `nvm` or a similar tool for managing Node.js versions.
Change your import statement from `import { search } from 'narou'` to `import { search } from 'narou/browser'` for browser builds.Upgrade to `narou@2.0.1` or later if you are using `rankingHistory` in a browser environment and rely on `fetchOptions`.
Use ES module import syntax: `import { search } from 'narou';` instead of `const { search } = require('narou');`.Ensure you are using `import { search } from 'narou'` for Node.js and `import { search } from 'narou/browser'` for browser environments. Check your bundler configuration to ensure correct module resolution.Upgrade your Node.js environment to v18 or newer, or install a `fetch` polyfill (e.g., `node-fetch`) and ensure it's globally available before importing `narou`.
No dependency data recorded yet.