开发者平台

通过我们的REST API、Markdown端点和Feed访问DinoFYI的古生物学数据。探索恐龙物种、地质时期、演化支和发现地点。

REST API端点

所有端点均返回JSON。 分页方式: ?limit=?offset=. 使用 ?lang=ko 用于翻译字段。

端点 描述
GET /api/dinosaurs/ 恐龙列表(可按时期、演化支、食性筛选)
GET /api/dinosaurs/{slug}/ 恐龙详情
GET /api/periods/ 地质时代
GET /api/classifications/ 恐龙支系
GET /api/countries/ 有化石发现的国家
GET /api/glossary/ 术语表条目
GET /api/guides/ 指南
GET /api/search/?q= Full-text search across dinosaurs, glossary, and guides
GET /api/stats/ 数据库统计
GET /api/random/ Random dinosaur
GET /api/compare/?a=&b= Compare two dinosaurs side by side

Markdown端点

追加 .md 添加到任何页面URL即可获取Markdown版本。适用于LLM上下文、文档和编程访问。

# Dinosaur profile
curl https://dinofyi.com/dinosaur/tyrannosaurus-rex.md
# Guide article
curl https://dinofyi.com/guide/mass-extinction-events.md
# With language prefix
curl https://dinofyi.com/ko/dinosaur/tyrannosaurus-rex.md

快速开始

curl

# List dinosaurs
curl https://dinofyi.com/api/dinosaurs/
# Search
curl "https://dinofyi.com/api/search/?q=tyrannosaurus"
# Dinosaur detail (Korean)
curl "https://dinofyi.com/api/dinosaurs/tyrannosaurus-rex/?lang=ko"
# Database stats
curl https://dinofyi.com/api/stats/
# Random dinosaur
curl https://dinofyi.com/api/random/
# Compare two dinosaurs
curl "https://dinofyi.com/api/compare/?a=tyrannosaurus-rex&b=triceratops"

Python

import httpx
resp = httpx.get("https://dinofyi.com/api/dinosaurs/",
    params={"diet": "carnivore", "limit": 10})
dinosaurs = resp.json()["results"]

其他资源