Jinrishici (今日诗词)
API
- URL:
https://v1.jinrishici.com/all.json - Method:
GET - Tips: Set a reasonable User-Agent; rate-limit politely. If the platform requires a token in production, follow Jinrishici Open Platform current docs.
Response fields
Common JSON root fields (actual response may vary):
| Field | Meaning |
|---|---|
content |
Poem line |
author |
Author |
origin |
Work title |
Omit missing parts per display rules below.
Display format
When content is non-empty:
- Both
authorandorigin:{content}—— {author}《{origin}》 authoronly:{content}—— {author}originonly:{content}《{origin}》- Neither:
contentonly
Do not wrap the line in extra quotes; preserve API punctuation. Output is Chinese by design.
Minimal request
curl -fsS -H "User-Agent: YourApp/1.0" "https://v1.jinrishici.com/all.json"
Local script
# Default: one formatted line
python jinrishici/scripts/fetch_poem.py
# Raw JSON
python jinrishici/scripts/fetch_poem.py --json
Agent behavior
- Live line: GET the URL, parse JSON, format one line (or body-only if asked).
- API failure: Brief error; do not invent author or title; suggest retry or network check.
- Privacy: Do not log full tokens; third-party content — no extra copyright claims beyond attribution.