← 返回
开发者工具 中文

cf markdown agents

Fetch web content using Cloudflare's Markdown for Agents protocol. Automatically converts HTML to Markdown with 80% token reduction. Use when fetching web pa...
使用 Cloudflare 的 Markdown for Agents 协议获取网页内容。自动将 HTML 转换为 Markdown,Token 减少 80%。适用于获取网页...
xinian5216
开发者工具 clawhub v1.0.0 1 版本 99786.8 Key: 无需
★ 0
Stars
📥 468
下载
💾 3
安装
1
版本
#latest

概述

Cloudflare Markdown for Agents

This skill enables fetching web content using Cloudflare's Markdown for Agents protocol, which automatically converts HTML pages to clean, structured Markdown format.

What is Markdown for Agents?

Cloudflare's Markdown for Agents is a content negotiation feature that:

  • Automatically converts HTML to Markdown at the edge
  • Reduces token usage by ~80% compared to raw HTML
  • Returns clean, structured content perfect for AI processing
  • Adds x-markdown-tokens header showing estimated token count
  • Includes Content-Signal headers for AI usage permissions

Usage

Basic Fetch

Use the provided script to fetch any URL with Markdown for Agents support:

scripts/fetch-markdown.sh <URL>

Example:

scripts/fetch-markdown.sh "https://developers.cloudflare.com/agents/"

In Code

TypeScript/JavaScript example:

const response = await fetch("https://example.com/page", {
  headers: {
    Accept: "text/markdown, text/html",
  },
});

const tokenCount = response.headers.get("x-markdown-tokens");
const markdown = await response.text();

cURL example:

curl https://example.com/page -H "Accept: text/markdown"

Response Headers

  • content-type: text/markdown; charset=utf-8 - Content is Markdown
  • x-markdown-tokens: - Estimated token count
  • content-signal: ai-train=yes, search=yes, ai-input=yes - Usage permissions

Supported Sites

Any site using Cloudflare with Markdown for Agents enabled:

  • Cloudflare Developer Documentation (developers.cloudflare.com)
  • Cloudflare Blog (blog.cloudflare.com)
  • Any site with the feature enabled in Cloudflare dashboard

Benefits

AspectHTMLMarkdown
------------------------
Tokens16,1803,150
Reduction-~80%
StructureComplexClean
AI ParsingHardEasy

References

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 04:22 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,799
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,181
communication-collaboration

wechat mp draft

xinian5216
代写微信公众号文章并保存到公众号草稿箱。使用场景:用户需要撰写公众号文章并直接发布到微信公众号后台草稿箱。触发词:"写公众号文章"、"保存到公众号草稿"、"微信文章"、"公众号发文"。
★ 0 📥 761