Resolve DOI / Title Precisely
MetadataRetrievalBeginner
Resolve DOI / Title Precisely
Quickly fetch metadata, full text, and citation evidence as a basic entry point for research agents
Scenario
Users already have a DOI or paper title and only need to fetch metadata, full text, and citation evidence quickly. This is a basic operation for research agents.
Estimated calls
~3-5 API calls per resolution
Tools
meta-searchcontentPipeline
DOI/标题→ meta-search 精确查询→ 元数据→ content 全文
Input example
Input: DOI: 10.xxxx/example or title: "Attention is All You Need"
Output example
Resolved paper: - title: ... - doc_id: ... - year: ... - venue: ... - available content offset: 0
Agent Prompt example
You are a DOI and title resolver. Use structured search to locate the exact paper, then read metadata and a short content preview for verification.Implementation steps
Step 1: Set up the environment
Configure token and HTTP client
!pip install httpx
import os
os.environ["SCIVERSE_API_TOKEN"] = "sv-your-token-here" # 替换为你的真实值
Step 2: Find a paper precisely by DOI
Use meta-search filters or precise title matching to locate the paper
import os
import asyncio
import httpx
BASE = "https://api.sciverse.space"
TOKEN = os.environ["SCIVERSE_API_TOKEN"]
HEADERS = {"Authorization": f"Bearer {TOKEN}"}
async def resolve_doi(doi: str):
"""\u901a\u8fc7 DOI \u7cbe\u786e\u67e5\u627e\u6587\u732e\u5143\u6570\u636e"""
async with httpx.AsyncClient(timeout=30) as client:
resp = await client.post(
f"{BASE}/meta-search", headers=HEADERS,
json={
"query": doi,
"filters": [{"field": "doi", "operator": "FILTER_OP_EQ", "value": doi}],
"page": 1, "page_size": 1
}
)
resp.raise_for_status()
data = resp.json()
if data.get("total_count", 0) > 0:
return (data.get("results") or [None])[0]
return None
async def resolve_title(title: str):
"""\u901a\u8fc7\u6807\u9898\u6a21\u7cca\u67e5\u627e"""
async with httpx.AsyncClient(timeout=30) as client:
resp = await client.post(
f"{BASE}/meta-search", headers=HEADERS,
json={"query": title, "filters": [], "page": 1, "page_size": 5}
)
resp.raise_for_status()
return (resp.json().get("results") or [])
# \u793a\u4f8b\uff1a\u901a\u8fc7 DOI \u89e3\u6790
paper = await resolve_doi("10.1038/s41586-021-03819-2")
if paper:
print(f"Title: {paper['title']}")
print(f"Venue: {paper.get('publication_venue_name_unified', 'N/A')}")
print(f"Year: {paper.get('publication_published_year', 'N/A')}")
print(f"Doc ID: {paper.get('doc_id', 'N/A')}")
Step 3: Read a full-text preview
Call content to read the abstract or opening section
async def read_abstract(doc_id: str):
"""\u8bfb\u53d6\u8bba\u6587\u5f00\u5934 1500 \u5b57\u7b26\u4f5c\u4e3a\u6458\u8981"""
async with httpx.AsyncClient(timeout=30) as client:
resp = await client.get(
f"{BASE}/content", headers=HEADERS,
params={"doc_id": doc_id, "offset": 0, "limit": 1500}
)
resp.raise_for_status()
return resp.json()["text"]
if paper and paper.get("doc_id"):
abstract = await read_abstract(paper["doc_id"])
print(f"\
Full text preview:\
{abstract[:500]}...")
Notes
- Prefer DOI when available because it is more precise than title matching.
- Normalize punctuation and casing in titles.
- Return multiple candidates when exact matching is ambiguous.
- Always include doc_id for downstream calls.
FAQ
DOI 查不到怎么办?
可以回退到标题、作者和年份组合检索。
解析结果要返回什么?
至少返回 title、authors、year、venue、doi、doc_id。
PMID 和 DOI 都有时用哪个?
可同时保留,DOI 适合跨出版商识别,PMID 适合生物医学场景。
解析后下一步做什么?
通常用 doc_id 调 content 读取摘要或全文上下文。
Next steps
Need an API key?
Create one in Console > Tokens.The same API key works for enabled Sciverse, DianShi, and Skills capabilities, with starter quota available according to account permissions.