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

boothmate

v0.4.0

Published

Booth用の非公式スクレイピングライブラリ

Downloads

13

Readme

BoothMate

npm version TypeScript License: MIT

TypeScriptで書かれたBooth用の非公式スクレイピングライブラリです。Boothの利用規約に抵触しない範囲でご自由に利用ください。

使い方

インポート・初期化

import { BoothMate } from 'boothmate';

const client = new BoothMate({
  sessionToken: 'your_session_token',
  csrfToken: 'your_csrf_token'
});

// もしくはトークンを省略して初期化も可能です
// const client = new BoothMate();

このライブラリでは,セッショントークンやCSRFトークンを省略することもできます。トークンを指定した場合はログイン状態でのAPI操作が可能になり,省略した場合は公開データのみ取得できます。トークンの取得方法については,オプション・設定をご覧ください。

商品の情報を取得

// 商品検索
const searchResult = await client.item.search('VRChat', {
  category: Category.THREE_D_MODEL,
  min_price: 0,
  max_price: 5000,
});

console.log(`検索結果: ${searchResult.total_items}件`);
searchResult.items.forEach((item) => {
  console.log(`- ${item.name}: ¥${item.min_price}`);
});

// 特定の商品の詳細を取得
const item = await client.item.get(123456);
console.log(item.description);

ショップ情報取得

// ショップ情報の取得
const shop = await client.shop.get('vrcalphabet');
console.log(`ショップ名: ${shop.name}`);

// ショップの商品一覧の取得
const shopItems = await client.shop.getItems('vrcalphabet');

ウィッシュリスト操作

// 作成したウィッシュリスト一覧取得
const wishlists = await client.wishlist.getNames();
console.log(`ウィッシュリスト数: ${wishlists.length}`);

// ウィッシュリスト内の商品一覧を取得
const wishlistItems = await client.wishlist.getItems('pQ9TlbPV');
console.log(`アイテム数: ${wishlistItems.total_items}`);

// 商品をウィッシュリストに追加
await client.wishlist.addItem('pQ9TlbPV', 123456);

// ウィッシュリストから商品を削除
await client.wishlist.removeItem('pQ9TlbPV', 123456);

ここで紹介したAPIは,ほんの一部にしかすぎません。API一覧は,ドキュメンテーションサンプルをご覧ください。

コードの書き方でお困りですか?AIにご相談ください

インストール

npm

npm install boothmate

yarn

yarn add boothmate

pnpm

pnpm add boothmate

オプション・設定

認証情報の取得

  1. セッショントークン (Cookie _plaza_session_nktz7u の値):

    • Boothにログイン後、Cookie-EditorなどのCookie閲覧ツールを使用して値を取得
  2. CSRFトークン:

    • ページのHTMLから<meta name="csrf-token" content="...">を探してcontentの値を取得
    • または、document.querySelector('meta[name="csrf-token"]').contentを実行して取得

デバッグモード

デバッグモードを有効にするには,オプションのdebugtrueを指定します。

const client = new BoothMate({ debug: true }); // デバッグモード有効

デバッグモードを有効にすると、HTTPリクエストの詳細がコンソールに出力されます(例)。

200  GET  https://alphahub.booth.pm/items?page=1 (224ms)
200  GET  https://accounts.booth.pm/wish_lists.json?item_ids%5B%5D=6794919 (132ms)

貢献

プロジェクトへの貢献を歓迎します!以下のルールに従うと,あなたの貢献がスムーズになります!

Issue / PR

Issueを立てる際は,バグ報告・機能要望のどちらかを明記してください。 PRの説明には,目的・変更点・影響範囲・サンプルコードがあるとありがたいです。

ライセンス

MIT License

詳細はLICENSEファイルを参照してください。

変更履歴・リリース情報

v0.1.0 (2025-09ー15)

  • 初回リリース

v0.1.4 (2025-09-15)

  • コードの統一やREADMEなどを修正

v0.2.0 (2025-09-16)

  • サンプルコードの追加やenumプロパティの変更を行った

v0.3.0 (2025-09-17)

  • utilityサービスクラスへのアクセスをutilsに名前変更した

v0.4.0 (2025-11-07)

  • トークンを省略して初期化できるようにした

短期目標

  • より詳細なエラーハンドリング
  • メッセージの取得・送信
  • カート内商品の取得
  • 購入履歴とライブラリの取得
  • URLから直接データを取得できるようにする
  • 無料や購入したデジタル商品をダウンロードできるようにする

作者・クレジット

あるふぁべっと (vrcalphabet) - プロジェクト作成者・メンテナー

謝辞

  • Booth.pm - 素晴らしいプラットフォームを提供
  • TypeScriptコミュニティ - 優れた型システム
  • オープンソースコミュニティ - 継続的なサポート

注意: このライブラリは非公式です。Booth.pmの利用規約(サービス共通利用規約, Booth利用規約)を遵守してご利用ください。また,各APIは1秒以上ごとに実行するなどしてBoothのサーバに負荷が掛からないように配慮してください。