MarkUDown

Change Detection API — MarkUDown 网页变更检测文档

POST/api/change-detection

变更检测

检测 URL 内容自上次检查以来是否发生了变化。非常适合监控竞争对手定价页面、新闻网站或产品库存。

参数类型必填默认值描述
urlstring必填—要检查的 URL。
main_contentboolean可选true只比较主要内容(忽略导航和页脚的变化)。
include_diffboolean可选true在响应中包含当前的 Markdown(有变化时也包含之前的)。
timeoutinteger可选60页面加载超时时间(秒)。
callback_urlstring可选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"
  }
}