MarkUDown
Change Detection API — MarkUDown 网页变更检测文档
POST
/api/change-detection变更检测
检测 URL 内容自上次检查以来是否发生了变化。非常适合监控竞争对手定价页面、新闻网站或产品库存。
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| url | string | 必填 | — | 要检查的 URL。 |
| main_content | boolean | 可选 | true | 只比较主要内容(忽略导航和页脚的变化)。 |
| include_diff | boolean | 可选 | true | 在响应中包含当前的 Markdown(有变化时也包含之前的)。 |
| timeout | integer | 可选 | 60 | 页面加载超时时间(秒)。 |
| callback_url | string | 可选 | null | 任务完成时接收结果(POST)的 webhook URL。 |
请求
{
"url": "https://store.example.com/pricing",
"main_content": true,
"include_diff": true
}响应
// POST returns { "success": true, "id": "abc123", "url": "/api/change-detection/abc123" }
// Poll GET /api/change-detection/{id} — "data" when completed:
{
"success": true,
"data": {
"url": "https://store.example.com/pricing",
"changed": true,
"previous_hash": "abc123",
"current_hash": "def456",
"previous_markdown": "Price: $299",
"current_markdown": "Price: $249",
"first_check": false,
"checked_at": "2026-04-22T14:30:00Z"
}
}