MarkUDown
RSS Feed API — MarkUDown RSS 订阅源生成 API 文档
POST
/api/rssRSS 订阅源
以 JSON 获取任意页面的订阅条目。如果网站发布了 RSS 或 Atom 订阅源,MarkUDown 会找到它(在页面中或 /feed 等常见路径)并解析;如果没有,则根据页面上的文章链接生成条目。
| 参数 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| url | string | 必填 | — | 页面或订阅源的 URL。 |
| max_items | integer | 可选 | 20 | 从页面生成订阅源时的最大条目数。网站自己的订阅源会返回全部条目。 |
| title | string | 可选 | null | 订阅源标题。网站自己的订阅源保留其原有标题;只有在没有标题时才使用此值。 |
| timeout | integer | 可选 | 60 | 每次请求的超时时间(秒)。 |
| callback_url | string | 可选 | null | 任务完成时接收结果(POST)的 webhook URL。 |
请求
curl -X POST https://api.scrapetechnology.com/api/rss \
-H "X-API-KEY: your-api-key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/blog", "max_items": 20}'响应
// POST returns { "success": true, "id": "abc123", "url": "/api/rss/abc123" }
// Poll GET /api/rss/{id}
{
"success": true,
"id": "abc123",
"status": "completed",
"data": {
"success": true,
"data": {
"url": "https://example.com/blog",
"feed_url": "https://example.com/feed.xml",
"feed_title": "Example Blog",
"items": [
{
"title": "First post",
"link": "https://example.com/blog/first-post",
"description": "Post summary...",
"pubDate": "Mon, 16 Nov 2026 10:00:00 GMT"
}
],
"items_count": 1,
"source": "native_feed"
},
"processing_time_ms": 1840
}
}Python — pip install markudown
from markudown import MarkUDown
md = MarkUDown(api_key="your-api-key")
job = md.rss("https://example.com/blog", max_items=20) # waits for the job
feed = job["data"]["data"]
for item in feed["items"]:
print(item["title"], item["link"])Node.js — npm install markudown-sdk
import { MarkUDown } from "markudown-sdk";
const md = new MarkUDown({ apiKey: "your-api-key" });
const job = await md.rss("https://example.com/blog", { maxItems: 20 }); // waits for the job
const feed = job.data.data;
for (const item of feed.items) console.log(item.title, item.link);找到真实订阅源时 source 为 "native_feed";条目由页面生成时为 "generated"(此时没有 feed_url)。条目以 JSON 返回,而不是 RSS XML。
费用: 每次请求 1 个积分。