Skip to content
cccskills
FreePublished on GitHub

kokkai

国会会議録検索システムの公式APIで国会議事録(第1回国会1947年〜最新)を検索する。発言本文のキーワード・発言者・会議名・院・開催日・回国数での検索に対応し、発言単位/会議単位/会議一覧の3モードで返す。APIキー・ログイン不要。

法律の条文そのものはegov-laws、書誌はndl-booksを使う。投票結果・議員個人の属性情報は対象外。

The English summary is being prepared. Showing the original description.

See how to install

Files included (6)

  • SKILL.md5.0 KB
  • lookup.py5.0 KB
  • tests/fixtures/error_maxrecords.json158 B
  • tests/fixtures/meeting_higashinihon.json2.5 KB
  • tests/fixtures/speech_kenpo.json7.1 KB
  • tests/test_lookup.py3.0 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

kokkai

国会会議録検索システム(国立国会図書館)の公式APIで、国会の全会議録・全発言を検索するスキル。第1回国会(1947年)から最新までカバーし、APIキー・ログイン・ユーザー登録は一切不要。

実測日: 2026-10-01。以下のURL・構造・件数はすべて当日の実測で確認。

エンドポイント(3つ、使い分けが本質)

モードURL返るもの最大件数
発言単位https://kokkai.ndl.go.jp/api/speechヒットした発言の本文+会議情報100
会議単位https://kokkai.ndl.go.jp/api/meeting会議録+全発言の本文10
会議一覧https://kokkai.ndl.go.jp/api/meeting_list会議の情報のみ(軽量)100

既定はXML。recordPacking=json を必ず付ける。件数未指定だとspeech/listは30件、meetingは3件。

使い方(ヘルパー)

python3 kokkai/lookup.py --any 憲法 --max 3                 # 発言検索
python3 kokkai/lookup.py --speaker 山田 --house 参議院       # 発言者+院
python3 kokkai/lookup.py --meeting 本会議 --mode list        # 会議一覧
python3 kokkai/lookup.py --any 科学技術 --mode meeting --max 1  # 会議+全発言
python3 kokkai/lookup.py --any 防災 --from-date 2026-01-01 --until-date 2026-03-31

実測で確認したこと (2026-10-01)

  • any=国会: 608,479発言。any=憲法: 184,057。any=消費税: 62,548(うち参議院 26,928)。
  • 最古は第1回国会(1947年)。最新の本会議は2026-07-24(第221回)、委員会を含む最新発言は2026-08-26。収録には約1か月のラグがある。
  • 本会議だけで8,886会議。宮沢賢治が国会で言及された発言は69件。
  • speaker=山田 は部分一致で50,286件(山田吉彦ほか)。姓名フルネームで渡すのが安全。

実測で確認した罠

  1. 3エンドポイントの最大件数が違う。 speech/listは100、meetingは10。maximumRecords=101 を渡すと HTTP 400 で {"message":"(19011)検索条件の入力に誤りがあります。","details":["...maximumRecordsには1~100の値を指定してください。"]} が返る(2026-10-01実測)。エラーは日本語で具体的。
  2. any はスペース区切りでAND、nameOfMeeting はスペース区切りでOR。 逆なので注意(実測: any=北海道 青森 → 両方を含む発言3,867件(2026-10-05再実測。「北海道」単独115,795件・「青森」単独18,908件より少ないのでAND)、nameOfMeeting=文部 文教 → どちらかを含む会議)。
  3. any の検索対象は発言本文だけ。 会議名・発言者は別パラメータ(nameOfMeeting / speaker)。
  4. 既定はXML。 recordPacking=json を忘れるとXMLが返る。
  5. speechIDに日付と回次が埋まっている。 121704080X00920250411_169 = 第121回・2025-04-11。発言を一意に参照するIDとして使える。
  6. 掲載ラグ約1か月。 「昨日の国会で何が言われたか」はまだ取れないことが多い。最新日を確認してから答える。

失敗時の対応

  • 0件: キーワードの表記(漢字/かな)を変える。発言は話し言葉なので「熱中症」より「暑さ」に多い、ということがある。日付範囲を広げる。
  • HTTP 400: detailsに理由が書いてある(maximumRecordsの範囲、日付形式など)。そのまま直す。
  • 結果が古い: 収録ラグ(約1か月)。until を指定せず最新日を確認し、「2026-08-26時点の収録では」と時点つきで答える。

English summary

Searches Japan's National Diet proceedings via the official Kokkai (National Diet Library) API — no API key or login. Covers all sessions from the 1st Diet (1947) to the present, with three endpoints: speech-level search (full-text, max 100), meeting-level (returns every speech in the meeting, max 10), and meeting list (lightweight metadata, max 100). Filters: full-text keyword (space-separated AND), speaker (partial match), meeting name (space-separated OR), house, date range, session number. Always pass recordPacking=json — XML is the default. Traps: per-endpoint record caps (over-limit returns HTTP 400 with a Japanese error message), any vs nameOfMeeting use opposite space semantics, and new proceedings appear with roughly a one-month lag (latest record 2026-08-26 as of 2026-10-01). Measured live on 2026-10-01.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

デジタル庁 アドレス・ベース・レジストリ(ABR)の公式マスタ(都道府県・市区町村・町字)で日本の住所文字列を分解・正規化する。全国47都道府県・1,918市区町村・町字レコードを使い、住所から都道府県・市区町村(全国地方公共団体コード)・町字(町字ID)・番地を切り出す。表記ゆれ(漢数字/全角/半角の丁目、郡名省略、都道府県名省略)を吸収。APIキー・ログイン不要。住居表示の番地・号の正規化やジオコーディング(緯度経度)は対象外。

The English summary is being prepared. Showing the original description.

tahodev/kurashi-skill4Updated Oct 21, 2026

環境省の大気汚染物質広域監視システム(AEROS・そらまめくん)から、PM2.5・光化学オキシダントなどの測定値(速報値)を取得する。全国約1,600測定局の最新1時間値・測定局ごとの今日/7日分・都道府県ごとの月次履歴に対応。「今のPM2.5」「空気が悪い?」の質問に答える。APIキー・ログイン不要。確定値(過去の公式統計)は対象外。

The English summary is being prepared. Showing the original description.

tahodev/kurashi-skill4Updated Oct 21, 2026

気象庁の雨雲レーダー(解析雨量・降水ナウキャスト)タイルから、今の雨の強さとこの後30〜60分の見通しを調べる。今雨降ってる、雨雲、あとどれくらいで雨、降水ナウキャストの質問に対応。APIキー・ログイン不要。明日以降の天気はjma-weather、警報・地震・津波はbosai-alertを使う。

The English summary is being prepared. Showing the original description.

tahodev/kurashi-skill4Updated Oct 21, 2026

気象庁のアメダス(地域気象観測システム)最新観測値を取得する。今の気温・湿度・風・降水量・気圧を全国約1,300観測所から調べる。「今の気温」「今の雨量」「今の風」の質問に対応。APIキー・ログイン不要。予報はjma-weather、雨雲の動きはamagumo、警報はbosai-alertを使う。

The English summary is being prepared. Showing the original description.

tahodev/kurashi-skill4Updated Oct 21, 2026

aozora

Free

青空文庫の全作品カタログ(公式公開CSV)で著作権切れの文学作品を検索し、本文をプレーンテキストで取得する。タイトル部分一致・著者名・作品IDでの検索に対応し、作品ID・タイトル(読み)・著者・文字遣い種別・著作権フラグ・初出・図書カードURLを返す。APIキー・ログイン不要。書誌の網羅検索はndl-books、図書館の蔵書はcalil-booksを使う。現行の書籍の購入・在庫は対象外。

The English summary is being prepared. Showing the original description.

tahodev/kurashi-skill4Updated Oct 21, 2026

気象庁の防災情報(地震速報・震度詳細、気象警報・注意報、津波情報)を公開JSONから取得する。地震、震度、警報、注意報、津波の確認に対応。APIキー・ログイン不要。ふだんの天気予報は対象外(jma-weatherを使う)。

The English summary is being prepared. Showing the original description.

tahodev/kurashi-skill4Updated Oct 21, 2026

See all skills by tahodev

Report a problem with this skill