将任意 HTML 页面转换为干净、LLM 就绪的 Markdown。剥离非主体(导航、广告、侧边栏),保留标题、表格、围栏代码块、带 alt 的图片和链接。返回页面标题、主内容(Markdown 格式)、字数、提取的图片和链接数组,以及推断的主 URL。为批量而生:输入 10,000 文章 URL,每页一行返回。适用于 LLM 训练语料、RAG 数据摄入、文档镜像和内容监控。
# 通过 Apify API 启动运行 curl -X POST "https://api.apify.com/v2/acts/santamaria-automations~html-to-markdown/runs?token=YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "urls": [ "https://blog.example.com/post-1", "https://docs.example.com/getting-started", "https://news.example.com/article-2026" ], "extractImages": true, "extractLinks": true, "mainContentOnly": true }' # 或通过 MCP 与 AI 代理配合使用: # https://mcp.apify.com?tools=santamaria-automations/html-to-markdown
| 字段 | 类型 | 示例 |
|---|---|---|
| source_url | string | https://blog.example.com/post-1 |
| title | string | 构建 RAG 管道 |
| main_content | string | # 构建 RAG 管道\n\n实用指南... |
| word_count | integer | 1,842 |
| reading_time_minutes | integer | 8 |
| language | string | zh |
| canonical_url | string | https://blog.example.com/post-1 |
| images | array | [{"src":"...","alt":"示意图"}] |
| links | array | [{"href":"...","text":"文档"}] |
| scraped_at | string | 2026-06-13T10:15:42Z |