唐诗宋词元曲查询 - 即刻数据
数据由 即刻数据 提供,帮助 AI 客户端快速接入可靠数据服务。
支持:诗词搜索、诗词详情、诗人查询、诗人详情、随机诗词、词牌、朝代、类别、体裁。
前置配置
export JIKE_POETRY_QUERY_KEY=你的AppKey
# 或使用通用 Key
export JIKE_APPKEY=你的AppKey
使用方法
python3 scripts/poetry_query.py search --name 相思 --page-size 5
python3 scripts/poetry_query.py detail --poetry-id 4
python3 scripts/poetry_query.py author --name 杜甫
python3 scripts/poetry_query.py author-detail --name 杜甫
python3 scripts/poetry_query.py random
python3 scripts/poetry_query.py cipai --name 水调歌头
python3 scripts/poetry_query.py dynasty
python3 scripts/poetry_query.py type
python3 scripts/poetry_query.py format
python3 scripts/poetry_query.py detail --poetry-id 4 --json
AI 使用步骤
- 用户按题名、作者、朝代、类别、体裁找诗词时,使用
search。 - 用户问某首诗完整内容、译文、注释、赏析时,使用
detail。 - 用户问诗人列表或诗人介绍时,使用
author或author-detail。 - 用户要随机诗词、词牌、朝代/类别/体裁列表时,使用对应子命令。
脚本位置
scripts/poetry_query.py