journapi
标准、可扩展的学术制品元数据检索 SDK + CLI —— 首个数据源为期刊(通过公开的 ISSN Portal),提供 Provider 抽象层,为后续更多数据源(文献、DOI 等)预留扩展能力。
项目状态:stable。ISSN Portal 公开网页接口已实现并经独立复审验证;官方订阅 API(api.issn.org, REST + JWT)提供完整 Provider 骨架(需订阅凭据端到端验证)。
功能特性
- 期刊检索 — 按刊名 / ISSN / eISSN / ISSN-L 搜索与精确查询
- ISSN-L / ISSN-H — 同刊多介质(Print/Online)聚合与历史沿革(更名前后继)家族
- 多数据源 — ISSN Portal(国际)+ 中国 ISSN 中心 nlc(中文刊名检索优先使用)+ 官方订阅 API;注册式 Provider 便于扩展
- 多使用方式 — Python SDK / CLI / Web UI / MCP 服务器 / Agent Skill
- 礼貌抓取 — 限速(robots.txt Crawl-delay 1s)、重试退避、可选磁盘缓存(RFC 9111)
安装
包已发布到 PyPI(包名 journapi):
uvx journapi --help # 免安装直接运行(推荐)
pip install "journapi[chinese]" # 或 pip 安装(含中文刊名分词)
uv tool install journapi # 或全局工具安装
开发环境搭建见 CONTRIBUTING.md。
快速开始
# 搜索(刊名 / ISSN 均可;已知 ISSN 优先传 ISSN)
journapi search "Hearing research"
journapi search 0378-5955 --json
# 中文刊名检索优先走中国 ISSN 中心源
journapi search 自动化学报 --provider nlc_issn
# 单条记录 / ISSN-L 集群 / Web UI
journapi get 0964-1998
journapi cluster 0378-5955
journapi web # 浏览器打开 http://127.0.0.1:8787
import asyncio
from journapi import ArtifactSearchClient
async def main():
async with ArtifactSearchClient() as client:
results = await client.search("Hearing research")
print([(r.issn, r.title) for r in results.items])
asyncio.run(main())
检索策略(search 与 get 的取舍、中文刊三步链路)见 docs/API.md;可运行示例见 examples/。
使用方式
| 方式 | 入口 | 文档 |
|---|---|---|
| Python SDK | from journapi import ArtifactSearchClient |
docs/API.md |
| CLI | journapi --help |
docs/API.md |
| Web UI | journapi web → http://127.0.0.1:8787 |
docs/API.md(路由与 JSON API) |
| MCP 服务器 | journapi mcp(需 [mcp] extra) |
docs/MCP.md |
| Agent Skill | npx skills add https://cnb.cool/xqitw/journapi.git |
skills/journapi-skill/SKILL.md |
文档
- API 参考 — 客户端、模型、错误、数据源选择与检索策略、Web 服务路由
- MCP 接入指南 — 智能体接入配置、工具清单、推荐查询链路
- 架构与设计 — 分层架构、项目结构、模块说明、关键设计、环境变量
- 数据源调研 — ISSN Portal / 中国 ISSN 中心接口能力边界与实测结论
- 示例 — 可运行脚本
合规
journapi 遵循公开门户 robots.txt(目录级允许/禁止 + 1s 爬取延迟)。生产 / 批量场景请订阅官方搜索 API,细节见数据源调研。
贡献指南
欢迎参与贡献!详细的贡献规范和开发流程请参考 CONTRIBUTING.md。
许可证
Metadata
Release files for journapi 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| journapi-1.1.0.tar.gz | 93.9 kB | Without provenance | Details for journapi-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| journapi-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for journapi-1.1.0-py3-none-any.whl |
Total release size: 153.5 kB
Release files / journapi-1.1.0.tar.gz
| Download URL | journapi-1.1.0.tar.gz |
|---|---|
| Size | 93.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
740b0c80ce65321abfd7a4c0e00d8aaf92c75188971bfb074ca1279a1219b417
|
|
BLAKE2b-256 checksum How to use checksums |
da396c3227a1a1a9669576b245e29a95b52bf428ecf3fdb1f1451f3829060957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / journapi-1.1.0-py3-none-any.whl
| Download URL | journapi-1.1.0-py3-none-any.whl |
|---|---|
| Size | 59.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc1765dea6fc900ce9f085207ebc6855b3651d5d3e461e8f2218e9efa20829df
|
|
BLAKE2b-256 checksum How to use checksums |
82717b079324518be81fc018927f1b14602fc23a9047b792a758c3bf7e4e4b23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for journapi 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.