Loading...
Loading...
Compare original and translation side by side
x-rate-limit-remainingx-rate-limit-remaininghttps://markdown.new/curl -s 'https://markdown.new/https://example.com'curl -s 'https://markdown.new/' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com", "method": "auto", "retain_images": false}'| Parameter | Values | Default | When to use |
|---|---|---|---|
| | | Use |
| | | Set |
https://markdown.new/https://example.com?method=browser&retain_images=truetext/markdownx-markdown-tokenshttps://markdown.new/curl -s 'https://markdown.new/https://example.com'curl -s 'https://markdown.new/' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com", "method": "auto", "retain_images": false}'| 参数名 | 可选值 | 默认值 | 使用场景 |
|---|---|---|---|
| | | 针对JavaScript密集型SPA使用 |
| | | 当任务需要图片内容时设置为 |
https://markdown.new/https://example.com?method=browser&retain_images=truetext/markdownx-markdown-tokenscurl -s 'https://markdown.new/https://example.com/report.pdf'curl -s 'https://markdown.new/' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com/report.pdf"}'curl -s 'https://markdown.new/convert' \
-F 'file=@document.pdf'{
"success": true,
"url": "https://example.com/report.pdf",
"title": "Report Title",
"content": "# Report Title\n\n...",
"tokens": 850
}datafilenamefile_typecurl -s 'https://markdown.new/https://example.com/report.pdf'curl -s 'https://markdown.new/' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com/report.pdf"}'curl -s 'https://markdown.new/convert' \
-F 'file=@document.pdf'{
"success": true,
"url": "https://example.com/report.pdf",
"title": "Report Title",
"content": "# Report Title\n\n...",
"tokens": 850
}datafilenamefile_typecurl -X POST 'https://markdown.new/crawl' \
-H 'Content-Type: application/json' \
-d '{"url": "https://docs.example.com", "limit": 50}'undefinedcurl -X POST 'https://markdown.new/crawl' \
-H 'Content-Type: application/json' \
-d '{"url": "https://docs.example.com", "limit": 50}'undefined
**Crawl options:**
| Parameter | Description | Default |
| ----------------- | ----------------------------------------- | ------- |
| `url` | Starting URL (required) | — |
| `limit` | Maximum pages to crawl, 1–500 | 500 |
| `depth` | Maximum link depth, 1–10 | 5 |
| `render` | Enable JavaScript rendering for SPAs | false |
| `source` | URL discovery: `all`, `sitemaps`, `links` | `all` |
| `maxAge` | Maximum cache age in seconds, 0–604800 | 86400 |
| `includePatterns` | Only visit URLs matching these wildcards | auto |
| `excludePatterns` | Skip URLs matching these wildcards | — |
Results are stored for 14 days. Each crawl consumes 50 request units (approximately 10 crawls per day).
To cancel a crawl: `DELETE /crawl/status/{jobId}`
**抓取选项**:
| 参数名 | 描述 | 默认值 |
| ----------------- | ----------------------------------------- | ------- |
| `url` | 起始URL(必填) | — |
| `limit` | 最大抓取页面数,1–500 | 500 |
| `depth` | 最大链接深度,1–10 | 5 |
| `render` | 为SPA启用JavaScript渲染 | false |
| `source` | URL发现方式:`all`, `sitemaps`, `links` | `all` |
| `maxAge` | 最大缓存时长(秒),0–604800 | 86400 |
| `includePatterns` | 仅访问匹配这些通配符的URL | auto |
| `excludePatterns` | 跳过匹配这些通配符的URL | — |
结果将存储14天。每次抓取消耗50个请求单位(每天约可进行10次抓取)。
取消抓取任务:`DELETE /crawl/status/{jobId}`| Task | Method |
|---|---|
| Read a single web page | URL → Markdown (GET) |
| Fetch a remote PDF, DOCX, or spreadsheet | File → Markdown (GET or POST with URL) |
| Convert a local file on disk | File → Markdown (POST /convert with upload) |
| Retrieve content from multiple pages on a site | Crawl → Markdown |
| Handle a JS-heavy SPA that returns blank content | URL → Markdown with |
| 任务 | 方法 |
|---|---|
| 读取单个网页 | URL → Markdown(GET请求) |
| 获取远程PDF、DOCX或电子表格 | 文件 → Markdown(GET请求或带URL的POST请求) |
| 转换本地磁盘上的文件 | 文件 → Markdown(上传文件至POST /convert接口) |
| 获取网站多个页面的内容 | 抓取 → Markdown |
| 处理返回空白内容的JavaScript密集型SPA | URL → Markdown并设置 |
https://markdown.new/<url>method=browser/reference//extensions/retain_images=truehttps://markdown.new/<url>method=browser/reference//extensions/retain_images=true