1.5 Details about a paper GET /graph/v1/paper/{paper_id}
返回单篇论文的详情。
| 参数 | 必填 | 说明 |
|---|---|---|
paper_id | 是 | 路径参数,支持的写法见下 |
fields | 否 | 逗号分隔的字段投影,见 §3 |
同一篇论文用下面任一形态都能查到(外部 ID 反查索引覆盖 99.05% 的论文)。行末是实测解到的 sha 前 8 位:
204e3073870fae3d05bcbc2f6a8e263d9b72e776 # 40 位 sha,也就是响应里的 paperId
13756489 # 裸 corpusid -> 204e3073…
CorpusId:13756489 / CORPUS_13756489 # -> 204e3073…
ARXIV:1706.03762 # Attention is All you Need -> 204e3073…
MAG:2950858113 # -> 204e3073…
URL:https://www.semanticscholar.org/paper/204e3073… -> 204e3073…
DOI:10.1145/3437963.3441673 # Graph Mining with GNNs -> d4d7bbf3…
10.1145/3437963.3441673 # 裸 DOI 也接受(大小写不敏感)
ACL:N19-1423 # 另一篇 -> df2b0e26…
PMID:… / PMCID:… # 生物医学类才有;PubMed: / PubMedCentral: 同样认(§1.5)
两个易踩点:裸 arXiv 号会被当成 corpusid(1706.03762 查不到,要写 ARXIV:1706.03762);一篇论文 externalIds 里没有的编号,用对应前缀就回 404。含 / 的 DOI 直接写在路径里。查不到一律 404 {"error":"Paper not found"}。
不要把 url 里的 sha 当 paperId 用。 有主 sha 的论文(99.99%)url 尾部那串 sha能解回同一篇,但未必逐字等于 paperId(有时是别名 sha)。而 311 篇(0.0016%)没有主 sha:paperId 回退成 corpusid 字符串,url 却是数据集原值——这 311 条 url 里那串 sha没有一篇指回自己(142 篇指向另一篇,如 CorpusId:3709142 的 url 尾部 sha 属于 corpusId 4726868;另 169 篇的 sha 在本库查不到)。url 只能当原文链接,要 ID 就用响应里的 paperId。
响应给出的 id,哪些能反查回同一个对象
「照抄响应里的 id 再查一次」是最常见用法,所以当成契约:
| 响应里的位置 | 当 paper_id 用 | 实测 |
|---|---|---|
paperId、externalIds.CorpusId | ✓ | 自己的两个名字 |
externalIds.DOI / ArXiv / MAG / ACL / PubMed / PubMedCentral | ✓ | 键名本身就能当前缀,见第 1 条 |
url | ✓ 加 URL: 前缀 | 解回 url 尾部那串 sha |
externalIds.DBLP | ✗ 404 | 官方没有 DBLP: 形态,本地不建索引 |
publicationVenue.id | ✗ 404 | 那是刊物的 id,不是论文的 |
authors[].authorId | ✓ 走作者端点 | 见第 4 条 |
1. PubMedCentral: 与 PMCID: / PMC: 认同一个。例:CorpusId:222825366 带PubMed: 34062119 与 PubMedCentral: 8238499,PMCID:8238499、PubMedCentral:8238499、PMC:8238499 三种写法都回它。2. 有值不等于有句柄:DBLP(多数论文都登记)和 publicationVenue.id 一律 404,它们的主人仍能用 CorpusId: / DOI: 查回。3. 一个外部 id 可以属于两篇论文。全库 43,782 个 id 被不止一篇登记(去重后剩两条最常见)。落点固定是 corpusId 更小的那篇,且落点自己也登记同一个值。例:10.1140/epjd/e2004-00196-9同时挂在 CorpusId:54203609(引用 73)与 CorpusId:119550119(引用 1)上,标题相同;DOI:… 一律解到 54,203,609。要另一条就用它的 CorpusId:——共用只影响外部 id,不影响 corpusId。4. 作者侧 authorId 都能反查回来,但两处留意:authorId 本身可以是 null(姓名与两份 id 来源对不上时,见 §1.8);作者索引里的 name 是规范名,与论文上印的样子可以差一个连字符(论文印 Xuan-Jing Huang,作者记录是 Xuanjing Huang)。
curl "https://fetchpaper.com/graph/v1/paper/ARXIV:1706.03762?fields=paperId,corpusId,title,abstract,year,venue,publicationDate,referenceCount,citationCount,influentialCitationCount,isOpenAccess,fieldsOfStudy,s2FieldsOfStudy,publicationTypes,authors,externalIds,url,journal,publicationVenue,tldr,citations,references"
{"paperId": "204e3073870fae3d05bcbc2f6a8e263d9b72e776", "corpusId": 13756489,
"title": "Attention is All you Need",
"abstract": "The dominant sequence transduction models are based on complex recurrent or convolutional neural networks in an encoder-…",
"year": 2017, "venue": "Neural Information Processing Systems", "publicationDate": "2017-06-12",
"referenceCount": 41, "citationCount": 201069, "influentialCitationCount": 21398, "isOpenAccess": true,
"fieldsOfStudy": ["Computer Science"],
"s2FieldsOfStudy": [{"category": "Computer Science", "source": "s2-fos-model"}, …],
"publicationTypes": ["JournalArticle", "Conference"],
"authors": [{"authorId": "40348417", "name": "Ashish Vaswani"},
{"authorId": "1846258", "name": "Noam Shazeer"}, …],
"externalIds": {"CorpusId": 13756489, "ArXiv": "1706.03762",
"DOI": "10.48550/arXiv.1706.03762",
"DBLP": "conf/nips/VaswaniSPUJGKP17", "MAG": "2950858113"},
"url": "https://www.semanticscholar.org/paper/204e3073870fae3d05bcbc2f6a8e263d9b72e776",
"journal": {"pages": "5998-6008"},
"publicationVenue": {"id": "d9720b90-d60b-48bc-9df8-87a30b9a60dd",
"name": "Neural Information Processing Systems"},
"tldr": {"text": "A new simple network architecture, the Transformer, based solely on attention mechanisms…"},
"citations": [{"paperId": "8ed718f10c1a7f6f9d195450c9df52ffaa985551",
"title": "City Matters! A Dual-Target Cross-City Sequential POI Recommendation Model"}, …],
"references": [{"paperId": "98445f4172659ec5e891e031d8202c102135c644",
"title": "Neural Machine Translation in Linear Time"}, …]}
fieldsOfStudy/publicationTypes是集合语义,重复值已在出口去掉(库里同一学科常被external和s2-fos-model各标一次,抽样 2,845 篇里 1,929 篇、67.8% 带重复)。想知道重复从哪个 source 来读s2FieldsOfStudy——它每条带source,两条(category, source)本就不同,所以不去重。- 这篇
externalIds登记了DOI: 10.48550/arXiv.1706.03762(arXiv DOI),DOI:形态可以查到它——外部 ID 只能按每篇实际登记的编号用。 citations实际返回 1000 条(官方单字段上限),references返回 39 条(原始 78 条边去重后 39 篇,§1.6)。只要标题以外的字段就写fields=citations.year;引用数组只展开一层,元素里不再嵌套citations。
三个「发表处」字段各说各话,谁也不能替谁(全量 19,984,885 篇实测,括号是 500 行的 query=graph rag&year=2026 切片):
| 字段 | 类型 | 实测形状 |
|---|---|---|
venue | 字符串,缺失是 "" | 有值 10,973,807/19,984,885(448/500);venue= 过滤只认它 |
journal | 对象或 null | 非空 15,695,899,其中没有 name 键 3,678,324(44/500);null 4,288,986(89/500)。键集合只会是 {name, pages, volume} 的子集,六种非空组合都真实存在 |
publicationVenue | 对象或 null | 有值 8,540,841,全是 {id, name},且 name 与 venue 逐字相同(363/500,0 例外) |
上面那篇 Attention 最易误读:venue 是 "Neural Information Processing Systems",而 journal 里只有 pages({"pages": "5998-6008"},没有 name)——按 journal.name 取发表处会拿到 undefined,按 venue 才对。venue 与 journal.name 都有值的 9,031,560 篇里 5,334,749 篇(59.1%)两个字符串不相等,谁长谁短没规律:
venue='Information Sciences' journal.name='Inf. Sci.' (全称 vs ISO4 缩写)
venue='arXiv.org' journal.name='ArXiv' (两个都不规范)
venue='Proc. ACM Softw. Eng.' journal.name='Proceedings of the ACM on Software Engineering'
(反过来:venue 才是缩写)
所以 venue= 认不认一个串,只看它在不在 venue 那一条列里(下表 query=network):
| 写法 | total |
|---|---|
venue=Information Sciences | 3,009 |
venue=Inf. Sci.(同一刊物的 journal.name) | 0 |
venue= INFORMATION sciences (换大小写、加空白) | 3,009,与第一行一致 |
venue=arXiv.org | 90,797 |
venue=ArXiv(journal.name 里那个写法) | 0 |
反过来也不行:venue 为空、只有 journal.name 的有 2,986,016 篇,拿那些名字去筛同样 0 条。要按刊物名筛又只有journal 可看时,先 fields=venue 抽样看这批论文到底有没有 venue。
publicationVenue.name不是从journal.name取的,也不是官网刊物的规范名:它是拿venue填的。官方对象还有type/issn/url/alternate_names,本数据集没有这些值,所以不造假键,publicationVenue最多只有{id, name}。venue为空而publicationVenueId有值时,publicationVenue只剩{"id": …}一个键(name无处可借)。两份抽样都没遇到这种组合,但它是响应可能给出的形状,读publicationVenue.name前先判存在。