@book000/pixivts - v0.61.1
    Preparing search index...

    @book000/pixivts - v0.61.1

    pixivts

    pixiv Unofficial API Library for TypeScript

    This is NOT a fork of @ibaraki-douji/pixivts. However, it is used as a reference.

    • Zero runtime dependencies — no axios, no zod at runtime; uses native fetch
    • Result-typed API — every method returns Result<T, PixivError>; no thrown exceptions for API errors
    • Automatic token refresh — exchanges the refresh token for an access token on startup, and retries on 401
    • ESM + CJS dual output — works in Node.js ESM/CJS and edge runtimes
    • Paginated resultsPaginatedResultAsync with .pages() / .items() async generators for multi-page iteration
    • Resource-based namespacesillusts, novels, users, manga, ugoira, images
    • Optional MySQL recorder@book000/pixivts-db-mysql persists every API response via Drizzle ORM
    Package Description
    @book000/pixivts Core API client — zero runtime dependencies, Result-typed, ESM + CJS
    @book000/pixivts-db-mysql Optional MySQL recorder using Drizzle ORM
    npm install @book000/pixivts
    
    import { PixivClient } from '@book000/pixivts'

    const client = await PixivClient.of(process.env.PIXIV_REFRESH_TOKEN!)

    const result = await client.illusts.detail({ illustId: 12345 })
    if (result.isOk) {
    console.log(result.value.illust.title)
    }

    This project is licensed under the MIT License