Searches Japan's CiNii Research for scholarly articles, books, dissertations, research data, KAKEN projects, and researchers, and finds library holdings via CiNii Books. Useful for Japanese academic research and citation chaining.
Ships in cinii-research. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
CiNii (サイニィ) is the scholarly search service of Japan's National Institute of Informatics (NII, 国立情報学研究所). This skill uses two parts of it:
cir.nii.ac.jp) — one index of Japanese articles, books, dissertations, research data, KAKEN grant projects and researchers.ci.nii.ac.jp) — the union catalogue of Japanese university libraries (NACSIS-CAT). It tells you which libraries hold a book or journal. NII completed the integration of CiNii Books into CiNii Research on 30 March 2026. CiNii Books still runs in parallel until about March 2027; after that its addresses will redirect to CiNii Research.Three IDs appear everywhere:
1520572357593323264). Permalink: https://cir.nii.ac.jp/crid/<CRID>.BN03966690).FA001007 = 北海道大学 附属図書館).You can use it in two ways:
cinii-research/scripts/cinii_research.py (standard library only), as a command or a library.Facts below were checked live on 2026-11-20 (JST), without an appid, unless marked otherwise. references/api_reference.md labels each fact as checked live, failed live, or NII documentation only.
An appid is a free ID that NII gives to a program (an "application") after you register it. NII uses it to know who is calling the API.
https://cir.nii.ac.jp/crid/…, https://ci.nii.ac.jp/ncid/…) work without it.How to set it for the script (one time per terminal):
export CINII_APPID=YOUR_APPID # macOS / Linux
set CINII_APPID=YOUR_APPID # Windows cmd
$env:CINII_APPID = "YOUR_APPID" # Windows PowerShell
If CINII_APPID is set, the script adds appid= to every API request and shows it as appid=*** in all output. If it is not set, the script prints one short note and sends the request without it.
儒学, 朱子学, 漢文訓読 …).Run these from the repository root. Each one was run live on 2026-11-20.
python3 cinii-research/scripts/cinii_research.py search 儒学 --count 3
python3 cinii-research/scripts/cinii_research.py search --type articles --title 経済倫理と儒学
python3 cinii-research/scripts/cinii_research.py search --type articles --doi 10.11517/jjsai.36.3_331
python3 cinii-research/scripts/cinii_research.py search --type researchers 儒学 --count 2
python3 cinii-research/scripts/cinii_research.py record 1520572357593323264 --title 経済倫理と儒学
python3 cinii-research/scripts/cinii_research.py books 日本儒學年表 --count 2
python3 cinii-research/scripts/cinii_research.py books --issn 13457977
python3 cinii-research/scripts/cinii_research.py book BN03966690
python3 cinii-research/scripts/cinii_research.py holders BN03966690
python3 cinii-research/scripts/cinii_research.py holders AA1258552X --year 2005
python3 cinii-research/scripts/cinii_research.py library FA001007
What they do:
| Command | Calls | Answer (2026-11-20) |
|---|---|---|
search 儒学 | Research v1 all (products + projects) | 4551 hits |
search --type articles --title … | Research articles | 1 article, CRID 1520572357593323264, NAID 40007363600, ISSN 13457977, no. 6 |
search --type articles --doi … | Research articles with doi= | 1 article, 共通性と固有性のあいだ, CRID 1390006432294648704 |
search --type researchers … | Research v2 researchers | 374 results; both displayed hits had KAKEN researcher numbers |
record <CRID> | /crid/<CRID>.json | [unavailable] firewall challenge; the summary is kept from a title search (see Gotchas) |
books 日本儒學年表 | CiNii Books search | 3 hits; 日本儒學年表 BN03966690, "CiNii owner count: 50" (CiNii's number of holding entries, not of distinct libraries) |
books --issn 13457977 | CiNii Books search | journal NCID AA1258552X |
book BN03966690 | CiNii Books /ncid/BN03966690.json | 50 holder entries, 48 unique libraries, with OPAC links |
holders BN03966690 | Research /opensearch/holder | the same 50 / 48 |
holders AA1258552X --year 2005 | Research holder, journal | 国文学研究資料館 (FA009188) |
library FA001007 | Research /opensearch/library | 北海道大学 附属図書館 |
Options by command:
search (CiNii Research):
--type (all, articles, books, dissertations, data, projects, researchers, projectsAndProducts), --v2 (v2 all adds researchers)search, --title, --creator, --name (researchers only), --doi, --ncid (books), --fano (books), --project-id (projects), --issn, --isbn--from / --until (YYYY or YYYYMM), --language-type ja (language of the material), --full-title (exact title, books only), --has-fulltext, --data-source IRDB--lang en (language of the answer labels only; it does not filter), --sort (0 newest, 1 oldest, 4 relevance, 10 most cited articles), --start (1-10000), --count (1-200)books (CiNii Books): words, --title, --author, --publisher, --isbn, --issn, --ncid, --year-from, --year-to, --p (page, 1-based), --count. CiNii Books has its own lang parameter that filters by the material's language code; the script does not offer it.record: a CRID, plus --title or --doi to recover the summary when the full record is blocked.book: an NCID. holders: an NCID, plus --year, --vol, --issue (journals), --fano. library: an FA-ID or name words, --p, --count.Every command takes --json (the normalised result as JSON) and --raw (adds the original response text, appid masked). The exit code is 0 for ok and zero, 1 otherwise.
Goal: from a Japanese article to the library that holds the journal. Each step was run live on 2026-11-20. -i shows the status line and headers; -G --data-urlencode encodes the Japanese text for you.
Step 1 — find the article.
curl -sS -i -G --max-time 30 -A 'humanities-skills/cinii-research/1.0.0 (+https://github.com/kltng/humanities-skills)' \
'https://cir.nii.ac.jp/opensearch/articles' \
--data-urlencode 'title=経済倫理と儒学' --data-urlencode 'count=1' --data-urlencode 'format=json'
With your appid (set CINII_APPID first, see above), put one more --data-urlencode line before the URL. Keep the \ at the end of each line:
curl -sS -i -G --max-time 30 -A 'humanities-skills/cinii-research/1.0.0 (+https://github.com/kltng/humanities-skills)' \
--data-urlencode "appid=$CINII_APPID" \
--data-urlencode 'title=経済倫理と儒学' --data-urlencode 'count=1' --data-urlencode 'format=json' \
'https://cir.nii.ac.jp/opensearch/articles'
The appid is optional (the service answered without it when we checked). The same extra line works for every call below; they all use -G, so the appid goes into the URL, not into a POST body. Do not paste curl output that shows your appid into notes or issue reports.
Read: HTTP/2 200; "opensearch:totalResults":1; in items[0]: "@id":"https://cir.nii.ac.jp/crid/1520572357593323264", "title":"経済倫理と儒学", "dc:creator":["谷口 典子"], "prism:issn":"13457977", "prism:number":"6", "prism:publicationDate":"2005-02", and dc:identifier with cir:NAID 40007363600.
For a fetch tool that cannot encode text, use this ready-encoded URL:
https://cir.nii.ac.jp/opensearch/articles?title=%E7%B5%8C%E6%B8%88%E5%80%AB%E7%90%86%E3%81%A8%E5%84%92%E5%AD%A6&count=1&format=json
Step 2 (optional) — the full record is blocked.
curl -sS -i -G --max-time 30 -A 'humanities-skills/cinii-research/1.0.0 (+https://github.com/kltng/humanities-skills)' \
'https://cir.nii.ac.jp/crid/1520572357593323264.json'
Read: HTTP/2 202, content-length: 0, x-amzn-waf-action: challenge. This is a firewall asking for a browser, not "no record". Do not retry. The search hit from step 1 already has what you need.
Step 3 — journal ISSN → journal NCID (CiNii Books).
curl -sS -i -G --max-time 30 -A 'humanities-skills/cinii-research/1.0.0 (+https://github.com/kltng/humanities-skills)' \
'https://ci.nii.ac.jp/books/opensearch/search' \
--data-urlencode 'issn=13457977' --data-urlencode 'count=1' --data-urlencode 'format=json'
Read: @graph[0].items[0]."@id" = https://ci.nii.ac.jp/ncid/AA1258552X. The NCID is the last part: AA1258552X (研究論集儒学文化). The total is @graph[0]."opensearch:totalResults" (a string, "1").
Ready URL for a fetch tool:
https://ci.nii.ac.jp/books/opensearch/search?issn=13457977&count=1&format=json
Step 4 — who holds the journal for 2005.
curl -sS -i -G --max-time 30 -A 'humanities-skills/cinii-research/1.0.0 (+https://github.com/kltng/humanities-skills)' \
'https://cir.nii.ac.jp/opensearch/holder' \
--data-urlencode 'ncid=AA1258552X' --data-urlencode 'year=2005' --data-urlencode 'format=json'
Read (everything is inside @graph[0]): @graph[0]."opensearch:totalResults" = 1; @graph[0].items[0].title = 人間文化研究機構 国文学研究資料館; @graph[0].items[0]."cir:catalogUrl"."@id" = that library's OPAC link (https://opac.nijl.ac.jp/opac/opac_openurl?ncid=AA1258552X).
Ready URL for a fetch tool:
https://cir.nii.ac.jp/opensearch/holder?ncid=AA1258552X&year=2005&format=json
With year=1800 instead, the answer is totalResults 0 — so the year filter really works. This shows the library's holding covers 2005. It does not prove that issue no. 6 is on the shelf (see Gotchas).
How to read any answer:
| You see | It means |
|---|---|
200 + "opensearch:totalResults": 0 + "items": [] | zero results (a real answer) |
202 + empty body + x-amzn-waf-action: challenge | firewall challenge; use the search summary instead |
| empty body, and your tool hides status/headers | "empty response, cause unknown" — not zero results |
429 | rate-limited; wait (honour Retry-After) |
403 HTML page | refused; check your appid |
404, empty | wrong path (e.g. researchers without /v2/) |
CiNii Books is different in one way: a genuine zero-hit Books answer may have no items key at all and gives the total as the string "0" (@graph[0]."opensearch:totalResults": "0"); that is still "zero results", not an error.
If your fetch tool cannot set a User-Agent: step 1 sent with curl's default User-Agent (curl/8.7.1) also answered 200 with the same hit (2026-11-20). We tested only that one request; say in your notes that you could not send the skill's User-Agent.
import sys
sys.path.insert(0, "cinii-research/scripts") # from the repository root
from cinii_research import CiNiiClient, identifier, follow_links
# Works in the same notebook as ndl-search: sys.path.insert(0, "ndl-search/scripts"); import ndl_search
api = CiNiiClient() # reads CINII_APPID if set
res = api.search(type="articles", title="経済倫理と儒学")
res["status"], res["total"] # 'ok', 1
art = res["items"][0]
identifier(art, "ISSN") # '13457977'
follow_links(art) # NAID link, ISSN next step
rec = api.record(art["source_id"], summary=art) # full record; 'unavailable' when challenged, summary kept
journal = api.books_search(issn="13457977")["items"][0]
journal["source_id"] # 'AA1258552X'
h = api.holders("AA1258552X", year="2005")
h["holdings_summary"] # {'provider_count': 1, 'entries': 1, 'unique_libraries': 1, ...}
book = api.book("BN03966690") # CiNii Books record + all holders in one call
book["holdings_summary"] # provider_count 50, entries 50, unique_libraries 48
api.search("儒学", type="researchers") # goes to /opensearch/v2/researchers
api.library("FA001007")
Every result is a plain dict, and the appid never appears in it: it is masked as appid=*** in text and removed from every link, including data you pass in (for example every field of a summary, also its source). Dict keys and the fixed values of status, source and role are never changed by this masking.
search, books_search, holders and library always return {status, total, start, count, items, request_url, source}. status is one of ok, zero, unavailable, rate_limited, error. On failure total and start are null, count is 0 and items is empty.
error (every failure), http_status (failures that got an HTTP answer), retry_after and retry_at (only after 429/503), raw (only with raw=True). holders also has ncid, and on success filters and holdings_summary; its start is 1 on success (it is not paged).count=500, or ncid= for a type other than books) give status: "error", and no request is sent. extra={...} adds other NII parameters, but it is checked together with the normal ones: appid is refused (even blank), format may only be json, count/start must be whole numbers (full-width digits such as 2 are fine and are sent as 2; a blank value is an error, and the defaults 20 and 1 apply only when you leave them out), and books-only fields (isFullTitle, ncid, fano, category) are refused for other types.book always returns {status, item, source, request_url}; item is null on failure, and holdings_summary is present on success. record always returns {status, item, source, request_url}, with error on failure and note, fallback_search, fallback only when they apply. A malformed CRID or NCID raises ValueError before any request.source_id, title, creators, date (or null), identifiers (typed, all strings), links, provider and status. Library rows (from holders, library and the holdings of book) also have library_id and name, and their identifier is typed FANO. Books records add title_reading and title_reading_language (ja-hrkt kana, ko hangul, …); Research hits add subjects when the record has them.permalink (the page for people), record_json (the record's JSON-LD), source_record (the record in the source database, e.g. NDL Search, KAKEN, NDL Digital Collections), opac (a library's own catalogue), library_json (CiNii's JSON about a library).search --type articles --title … (or --doi …). For a book: books <title> or search --type books --title ….identifiers: CRID, NAID, DOI, NCID, ISSN, NDL_BIB_ID. Cite with the CRID permalink https://cir.nii.ac.jp/crid/<CRID>.books --issn <ISSN> gives the journal's NCID.holders <NCID> (add --year YYYY for a journal). Or book <NCID> for the CiNii Books record with its owner list.NDL_BIB_ID or an NDL Search link (source_record). Use the ndl-search skill for NDL holdings and digitised copies.https://cir.nii.ac.jp/crid/<CRID>.json answered 202, empty body, x-amzn-waf-action: challenge (2026-11-20, curl and Python, no appid). The script reports unavailable and does not retry. It keeps a summary only when the CRID matches (from summary= or a --title/--doi search), and for books with an NCID it adds the CiNii Books record as a named fallback. Whether a registered appid changes this is unknown.researchers needs v2. /opensearch/researchers → 404 with an empty body; /opensearch/v2/researchers works. The script switches automatically.all = research products and projects, including research data (4551 for 儒学). v2 all also includes researchers (4925). The script uses v1 unless you add --v2.lang is not languageType. lang=en changes the answer labels only. languageType=ja filters by the language of the material.hasLinkToFullText=false does nothing. It returned all 1521 articles. Only true filters (545). The script never sends false.isFullTitle is for books only, and it can surprise you. books?title=儒学&isFullTitle=true returned one hit titled "Li Zehou and Confucian philosophy". The hit does not show why it matched; our guess (not checked) is a title form that the search answer does not include.p/count are ignored there. Never loop pages on them.holders AA1258552X --year 2005 --issue 6 gave the same library as --issue 5 and --issue 99. Only the year filter changed the answer (year=1800 → 0). The library's OPAC refused our script (403). So say "holds this journal, including 2005", and check the issue in the OPAC by hand.start is 1-based (max 10000), count max 200. CiNii Books search: p is a 1-based page number, but the answer's startIndex is 0-based (the script converts it to a 1-based start). Library search: paged with p.儒學 and 儒学 gave the same total (4551) and first hit in Research; 日本儒學年表 and 日本儒学年表 gave the same 3 hits in Books. We compared totals and first hits only.ci.nii.ac.jp addresses will redirect, and hosts and JSON shapes may change. The script uses the Research holder route first, and reports unexpected response shape (status error) instead of a false result if an answer changes shape.https://ci.nii.ac.jp/naid/40007363600 → 301 → the CRID page.Retry-After, or 5, 15, 45 s; at most 90 s in total, including the 1 s spacing) and then gives up with rate_limited or unavailable and a time to try again.CINII_APPID, not in files.--json when another program reads the output; check status first.source_record) in your notes for citation.references/api_reference.md — endpoints, parameters, response fields, paging, errors, each with its evidence label.references/samples/ — real responses recorded on 2026-11-20 (and NII's documented record example) for offline practice.scripts/cinii_research.py — the client and command line. Tests: cd cinii-research && python3 -m unittest discover -s tests.Report a problem. This skill is part of the public repository kltng/humanities-skills. If it fails (an API changed, a script errors, or these instructions are wrong), report it as a GitHub issue:
gh issue list --repo kltng/humanities-skills --state all --search "cinii-research"gh issue create --repo kltng/humanities-skills --label bug --title "[cinii-research] <short summary>" --body "<details>". Without gh, give the user this link: https://github.com/kltng/humanities-skills/issues/new?template=skill-problem.ymlCredit the source. CiNii Research and CiNii Books are services of the National Institute of Informatics (NII, 国立情報学研究所), Japan. NII's copyright page asks that when you link to CiNii, "it is necessary to clearly state the service is provided by the National Institute of Informatics (NII)" (CiNii copyright and linking). Use of the API falls under NII's Web API regulations, whose purpose clause reads: "The User shall use the Web API for the purpose of usage for its own academic research or for the purpose of non-profitable activity of information utilization"; other uses need NII's written approval in advance (Web API regulations, Art. 3). For CiNii Books, NII states: "NACSIS-CAT records on CiNii Books are available as Open Data licensed by Attribution 4.0 International of Creative Commons" (API overview). NII lists which outputs this covers: the CiNii Books RDF and JSON-LD records for books and journals, for authors, and for libraries (for example https://ci.nii.ac.jp/ncid/BN03966690.json). It excludes abstracts and contents: "Abstracts & Contents are unavailable due to base on the contracts with providers." Search answers (OpenSearch) are not in that list. For the covered data, credit the NII Union Catalogue Database (NACSIS-CAT) and give the licence, CC BY 4.0. CiNii Research gathers records from many databases (NDL, Japan Link Center, institutional repositories, KAKEN and others) and has no single blanket licence; rights stay with each source database, so keep the source_record link. We found no prescribed sentence for citing CiNii in scholarship (checked 2026-11-20); cite the work itself and add the CRID or NCID permalink, for example https://cir.nii.ac.jp/crid/1520572357593323264.
Cite. If this skill helped work that is published, please cite it, together with the source credited above:
Tang, Kwok-leong. humanities-skills: cinii-research (version ). GitHub, . https://github.com/kltng/humanities-skills
When you help a user write up results that relied on this skill, remind them once about this citation and the credit above.
references/api_reference.md (opens in a new tab)references/samples/books_ncid_AA12583160_trimmed.json (opens in a new tab)references/samples/books_ncid_BN03966690_trimmed.json (opens in a new tab)references/samples/books_search_issn.json (opens in a new tab)references/samples/books_search_p1.json (opens in a new tab)references/samples/books_search_p2.json (opens in a new tab)references/samples/books_search_past_end.json (opens in a new tab)references/samples/books_search_zero.json (opens in a new tab)references/samples/nii_doc_example_crid_1390006432294648704.json (opens in a new tab)references/samples/research_articles_title.json (opens in a new tab)references/samples/research_articles_zero.json (opens in a new tab)references/samples/research_dissertations.json (opens in a new tab)references/samples/research_holder_AA1258552X_year2005_issue6.json (opens in a new tab)references/samples/research_holder_BN03966690_FA02289X.json (opens in a new tab)references/samples/research_holder_BN03966690_trimmed.json (opens in a new tab)references/samples/research_library_FA001007.json (opens in a new tab)references/samples/research_researchers_v2.json (opens in a new tab)scripts/__init__.py (opens in a new tab)scripts/cinii_research.py (opens in a new tab)tests/test_cinii_research.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/cinii-research:cinii-researchfrom cinii-research
npx claudepluginhub kltng/humanities-skills --plugin cinii-researchOther plugins' skills for the same job