mcpField
O
openalex-paper-search

openalex-paper-search

github.com/kortix-ai生産性8440 回インストール35 週間前に更新
リポジトリ

openalex-paper-search について

openalex-paper-search は、OpenAlex REST API で学術文献や関連エンティティを検索するリサーチスキルです。URL によるリクエストを使い、API キーや SDK なしで、フィルター、引用グラフ、著者検索、結果処理を行います。

主な機能

  1. 01キーワード・ブール検索
  2. 02結果のフィルター・並べ替え・ページ分割
  3. 03引用関係のたどり
  4. 04著者と外部 ID の検索
  5. 05フィールド選択と抄録の復元

活用シーン

  1. 01研究テーマの文献調査
  2. 02新しい論文や高被引用論文の検索
  3. 03参考文献と引用論文の追跡
  4. 04著者の出版記録の調査

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/kortix-ai/kortix-registry --skill openalex-paper-search

インストール後、Claude Code で/openalex-paper-searchを入力して読み込まれたか確認します。

詳細

学術論文検索(OpenAlex)

OpenAlex API を使って 2 億 4,000 万件以上の学術成果を検索できます。完全無料で、API キーも SDK も不要です。URL を組み立てて curl または bash を使うだけです。

ドキュメント全文: https://docs.openalex.org

クイックスタート

OpenAlex は REST API です。URL を組み立てて curl で取得することでクエリを実行します。すべての応答は JSON です。

# Search for papers about "transformer architecture"
curl -s "https://api.openalex.org/works?search=transformer+architecture&per_page=5&[email protected]" | python3 -m json.tool

重要: すべてのリクエストに [email protected](または有効なメールアドレス)を必ず含めてください。含めない場合は、1 秒あたり 1 件のリクエストに制限されます。含めると、1 秒あたり 10 件のリクエストを実行できます(「ポライトプール」)。

基本概念

エンティティ

OpenAlex には次のエンティティタイプがあります(すべてクエリ可能です)。

エンティティエンドポイント件数説明
Works/works2 億 4,000 万件以上論文、記事、書籍、データセット、学位論文
Authors/authors9,000 万件以上著作物を作成する人々
Sources/sources25 万件以上学術誌、リポジトリ、学会
Institutions/institutions11 万件以上大学、研究機関
Topics/topics4,000 件以上研究トピック(階層型)
Work オブジェクト -- 主なフィールド

Work を取得する際に、特に役立つフィールドは次のとおりです。

id                        OpenAlex ID (e.g., "https://openalex.org/W2741809807")
doi                       DOI URL
title / display_name      Paper title
publication_year          Year published
publication_date          Full date (YYYY-MM-DD)
cited_by_count            Number of incoming citations
fwci                      Field-Weighted Citation Impact (normalized)
type                      article, preprint, review, book, dataset, etc.
language                  ISO 639-1 code (e.g., "en")
is_retracted              Boolean
open_access.is_oa         Boolean -- is it freely accessible?
open_access.oa_url        Direct URL to free version
authorships               List of authors with names, institutions, ORCIDs
abstract_inverted_index   Abstract as inverted index (needs reconstruction)
referenced_works          List of OpenAlex IDs this work cites (outgoing)
related_works             Algorithmically related works
cited_by_api_url          API URL to get works that cite this one (incoming)
topics                    Assigned research topics with scores
keywords                  Extracted keywords with scores
primary_location          Where the work is published (journal, repo)
best_oa_location          Best open access location with PDF link
抄録の再構成

OpenAlex は法的な理由から、抄録を転置インデックスとして保存しています。プレーンテキストを取得するには、次のように再構成します。

import json, sys
# Read the abstract_inverted_index from a work object
inv_idx = work["abstract_inverted_index"]
if inv_idx:
    words = [""] * (max(max(positions) for positions in inv_idx.values()) + 1)
    for word, positions in inv_idx.items():
        for pos in positions:
            words[pos] = word
    abstract = " ".join(words)

または、python3 -c を使った bash では次のようにします。

# Pipe a work JSON into this to extract the abstract
echo "$WORK_JSON" | python3 -c "
import json,sys
w=json.load(sys.stdin)
idx=w.get('abstract_inverted_index',{})
if idx:
    words=['']*( max(max(p) for p in idx.values())+1 )
    for word,positions in idx.items():
        for pos in positions: words[pos]=word
    print(' '.join(words))
"

論文を検索する

基本的なキーワード検索

タイトル、抄録、全文を検索します。ステミングとストップワード除去を使用します。

# Simple search
curl -s "https://api.openalex.org/works?search=large+language+models&[email protected]"

# With per_page limit
curl -s "https://api.openalex.org/works?search=CRISPR+gene+editing&per_page=10&[email protected]"
ブール検索

大文字の AND、OR、NOT を、括弧や引用符で囲んだフレーズと組み合わせて使用します。

# Complex boolean query
curl -s "https://api.openalex.org/works?search=(reinforcement+learning+AND+%22robot+control%22)+NOT+simulation&[email protected]"

# Exact phrase match (use double quotes, URL-encoded as %22)
curl -s "https://api.openalex.org/works?search=%22attention+is+all+you+need%22&[email protected]"
特定のフィールドを検索する
# Title only
curl -s "https://api.openalex.org/works?filter=title.search:transformer&[email protected]"

# Abstract only
curl -s "https://api.openalex.org/works?filter=abstract.search:protein+folding&[email protected]"

# Title and abstract combined
curl -s "https://api.openalex.org/works?filter=title_and_abstract.search:neural+scaling+laws&[email protected]"

# Fulltext search (subset of works)
curl -s "https://api.openalex.org/works?filter=fulltext.search:climate+tipping+points&[email protected]"

フィルター

フィルターは最も強力な機能です。カンマ(AND)またはパイプ(OR)で組み合わせます。

特に便利なフィルター
# By publication year
?filter=publication_year:2024
?filter=publication_year:2020-2024
?filter=publication_year:>2022

# By citation count
?filter=cited_by_count:>100        # highly cited
?filter=cited_by_count:>1000       # landmark papers

# By open access
?filter=is_oa:true                 # only open access
?filter=oa_status:gold             # gold OA only

# By type
?filter=type:article               # journal articles
?filter=type:preprint              # preprints
?filter=type:review                # review articles

# By language
?filter=language:en                # English only

# Not retracted
?filter=is_retracted:false

# Has abstract
?filter=has_abstract:true

# Has downloadable PDF
?filter=has_content.pdf:true

# By author (OpenAlex ID)
?filter=author.id:A5023888391

# By institution (OpenAlex ID)
?filter=institutions.id:I27837315  # e.g., University of Michigan

# By DOI
?filter=doi:https://doi.org/10.1038/s41586-021-03819-2

# By indexed source
?filter=indexed_in:arxiv           # arXiv papers
?filter=indexed_in:pubmed          # PubMed papers
?filter=indexed_in:crossref        # Crossref papers
フィルターを組み合わせる
# AND: comma-separated
?filter=publication_year:>2022,cited_by_count:>50,is_oa:true,type:article

# OR: pipe-separated within a filter
?filter=publication_year:2023|2024

# NOT: prefix with !
?filter=type:!preprint

# Combined example: highly-cited OA articles from 2023-2024, not preprints
curl -s "https://api.openalex.org/works?filter=publication_year:2023-2024,cited_by_count:>50,is_oa:true,type:!preprint&search=machine+learning&per_page=10&[email protected]"

並べ替え

# Most cited first
?sort=cited_by_count:desc

# Most recent first
?sort=publication_date:desc

# Most relevant first (only when using search)
?sort=relevance_score:desc

# Multiple sort keys
?sort=publication_year:desc,cited_by_count:desc

ページネーション

2 つのモードがあります。基本ページング(閲覧用)とカーソルページング(すべての結果の収集用)です。

# Basic paging (limited to 10,000 results)
?page=1&per_page=25
?page=2&per_page=25

# Cursor paging (unlimited, for collecting everything)
?per_page=100&cursor=*                    # first page
?per_page=100&cursor=IlsxNjk0ODc...      # next page (cursor from previous response meta)

次ページのカーソルは response.meta.next_cursor にあります。値が null になると、最後まで到達したことを示します。

フィールドの選択

必要なフィールドだけを選択して、応答サイズを削減します。

# Only get IDs, titles, citation counts, and DOIs
?select=id,display_name,cited_by_count,doi,publication_year

# Minimal metadata for scanning
?select=id,display_name,publication_year,cited_by_count,open_access

引用グラフのたどり方

論文が引用している文献を見つける(被引用文献)
# Get works cited BY a specific paper
curl -s "https://api.openalex.org/works?filter=cited_by:W2741809807&per_page=25&[email protected]"
その論文を引用している文献を見つける(引用文献)
# Get works that CITE a specific paper
curl -s "https://api.openalex.org/works?filter=cites:W2741809807&sort=cited_by_count:desc&per_page=25&[email protected]"
関連する著作物を見つける
# Get related works (algorithmic, based on shared concepts)
curl -s "https://api.openalex.org/works?filter=related_to:W2741809807&per_page=25&[email protected]"
引用チェーン:参考文献をたどる
  1. DOI で代表的な論文を取得します
  2. その referenced_works(その論文が引用している文献)を見つけます
  3. その論文を引用している文献を見つけます(filter=cites:WORK_ID)
  4. 引用数が最も多い論文について、この手順を繰り返します

この方法で、トピックを中心とした文献グラフを構築できます。

著者を検索する

# Search for an author
curl -s "https://api.openalex.org/authors?search=Yann+LeCun&[email protected]"

# Get an author's works (by OpenAlex author ID)
curl -s "https://api.openalex.org/works?filter=author.id:A5064850633&sort=cited_by_count:desc&per_page=10&[email protected]"

# Get an author by ORCID
curl -s "https://api.openalex.org/authors/orcid:[email protected]"

外部 ID で検索する

# By DOI
curl -s "https://api.openalex.org/works/doi:10.1038/[email protected]"

# By PubMed ID
curl -s "https://api.openalex.org/works/pmid:[email protected]"

# By arXiv ID (via DOI)
curl -s "https://api.openalex.org/works/doi:10.48550/[email protected]"

# Batch lookup: up to 50 IDs at once
curl -s "https://api.openalex.org/works?filter=doi:https://doi.org/10.1234/a|https://doi.org/10.1234/b|https://doi.org/10.1234/c&[email protected]"

オープンアクセスと PDF へのアクセス

# Find OA papers with direct PDF links
curl -s "https://api.openalex.org/works?search=quantum+computing&filter=is_oa:true,has_content.pdf:true&select=id,display_name,open_access,best_oa_location&per_page=5&[email protected]"

best_oa_location.pdf_url フィールドには、利用可能な場合、PDF への直接リンクが格納されています。open_access.oa_url には、利用可能な最適な OA ランディングページまたは PDF が格納されています。

実用的なワークフロー

トピックに関する文献調査
# 1. Find the most-cited papers on a topic
curl -s "https://api.openalex.org/works?search=retrieval+augmented+generation&sort=cited_by_count:desc&filter=publication_year:>2020,type:article,has_abstract:true&per_page=20&select=id,display_name,publication_year,cited_by_count,doi,authorships,abstract_inverted_index&[email protected]"

# 2. For the top papers, explore their citation graphs
curl -s "https://api.openalex.org/works?filter=cites:W4285719527&sort=cited_by_count:desc&per_page=10&select=id,display_name,publication_year,cited_by_count,doi&[email protected]"

# 3. Find recent papers building on this work
curl -s "https://api.openalex.org/works?filter=cites:W4285719527,publication_year:>2023&sort=publication_date:desc&per_page=10&[email protected]"
重要な論文・代表的な論文を見つける
# Highly cited + search term
curl -s "https://api.openalex.org/works?search=attention+mechanism+neural+networks&filter=cited_by_count:>500,type:article&sort=cited_by_count:desc&per_page=10&select=id,display_name,publication_year,cited_by_count,doi&[email protected]"
最近のプレプリントを見つける
# Latest preprints on a topic
curl -s "https://api.openalex.org/works?search=multimodal+large+language+models&filter=type:preprint,publication_year:2025&sort=publication_date:desc&per_page=15&[email protected]"
総説論文を見つける
# Review/survey papers on a topic
curl -s "https://api.openalex.org/works?search=federated+learning&filter=type:review,cited_by_count:>20&sort=cited_by_count:desc&per_page=10&[email protected]"
著者の分析
# 1. Find the author
curl -s "https://api.openalex.org/authors?search=Geoffrey+Hinton&select=id,display_name,works_count,cited_by_count,last_known_institutions&[email protected]"

# 2. Get their most influential papers
curl -s "https://api.openalex.org/works?filter=author.id:A5068082743&sort=cited_by_count:desc&per_page=10&select=id,display_name,publication_year,cited_by_count,doi&[email protected]"

# 3. Get their recent work
curl -s "https://api.openalex.org/works?filter=author.id:A5068082743,publication_year:>2023&sort=publication_date:desc&per_page=10&[email protected]"

結果をディスクに保存する

詳細な調査を行う際は、後で処理できるように論文データをディスクに保存します。

# Save search results as JSON
curl -s "https://api.openalex.org/works?search=topic&per_page=50&[email protected]" > research/papers/topic-search.json

# Extract and save a clean summary
curl -s "https://api.openalex.org/works?search=topic&per_page=50&select=id,display_name,publication_year,cited_by_count,doi,authorships&[email protected]" | python3 -c "
import json, sys
data = json.load(sys.stdin)
for w in data.get('results', []):
    authors = ', '.join(a['author']['display_name'] for a in w.get('authorships', [])[:3])
    if len(w.get('authorships', [])) > 3: authors += ' et al.'
    print(f\"[{w.get('cited_by_count',0)} cites] {w['display_name']} ({w.get('publication_year','?')}) - {authors}\")
    if w.get('doi'): print(f\"  DOI: {w['doi']}\")
    print()
" > research/papers/topic-summary.txt

詳細な調査では、個々の論文のメタデータを sources-index.md に、生データを sources/ に保存します。

# Save a paper's full metadata
curl -s "https://api.openalex.org/works/[email protected]" > research/sources/001-paper-title.json

レート制限

プールレート利用方法
通常1 req/secメールアドレスを指定しない
ポライト10 req/secリクエストに [email protected] を追加する
プレミアムさらに高いapi_key パラメーターで有料 API キーを指定する

必ずポライトプールを使用してください。 すべてのリクエストに &[email protected] を追加します。

ヒント

  • select を積極的に使用して、レスポンスのサイズを削減し、リクエストを高速化します
  • 多くの結果を取得する場合は、リクエスト数を最小限に抑えるため、per_page=100(最大値)を使用します
  • 10,000 件を超える結果が必要な場合は、カーソルページング(cursor=*)を使用します
  • OR 構文で DOI の検索をまとめて実行します:filter=doi:DOI1|DOI2|DOI3(最大 50 件)
  • 逆引きインデックスを使ってアブストラクトを再構築します。省略しないでください。アブストラクトは非常に有用です
  • 引用のつながりをたどって、先駆的な研究や最近の動向を見つけます
  • アブストラクトが必要な場合は、has_abstract:true でフィルターします(すべての論文にアブストラクトがあるわけではありません)
  • 特定のリポジトリを対象にするには、indexed_in:arxiv または indexed_in:pubmed でフィルターします
  • 影響力の大きい論文を優先して見つけるには、cited_by_count:desc で並べ替えます
  • 精度の高い結果を得るには、検索とフィルターを組み合わせます。検索で関連性を、フィルターで精度を高めます

コメント