Feed
Generate an RSS 2.0 feed for published, indexable posts in one locale.
The feed endpoint generates Really Simple Syndication (RSS) 2.0 XML for published, indexable posts. Proxy the response to /feed.xml on your public blog domain so readers and feed clients receive first-party post URLs.
Choose a surface
Public and private keys can generate a feed when they have post read permission. Compare all Cli Blog tools.
| Action | HTTP API | Node SDK | CLI | Description |
|---|---|---|---|---|
| Generate | GET /v1/feed | blog.feed.get() | cli-blog feed get | Return recent published posts as RSS XML |
Use the REST API
Call the resource from any technology that can send HTTP requests. Use a public key for allowed delivery reads and a private key for content changes.
GET https://api.cli-blog.com/v1/feed?locale=en-USChoose an API keyUse the CLI
Use the CLI for local work, continuous integration, and JSON automation. Configure a narrowly scoped key before running content-changing commands.
cli-blog feed get --locale en-USRead the CLI guideUse the Node SDK
Use the Node SDK in Node.js 20+ servers, scripts, continuous integration, and trusted agent environments. Its methods map to the same resource actions.
await blog.feed.get({ locale: "en-US" })Read the Node SDK guideUse the agent skill
Give the agent the Cli Blog skill and a result-focused instruction. The skill helps it choose the API, CLI, or SDK and keeps publishing behind an approval gate.
Retrieve the en-US RSS feed and confirm that the latest published post appears in it.Install the agent skillGenerate RSS XML
Request one locale at a time. Omit locale to use the organization's primary locale. The default limit is 50, and the maximum is 100.
curl --get "https://api.cli-blog.com/v1/feed" \
--header "x-api-key: $CLI_BLOG_PUBLIC_API_KEY" \
--data-urlencode "locale=en-US" \
--data-urlencode "limit=50"Feed items use the post excerpt as their description. They do not expose the full Markdown body.
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
<title>Acme Engineering</title>
<link>https://demo.cli-blog.example/blog</link>
<description>Engineering systems, practices, and releases.</description>
<language>en-US</language>
<lastBuildDate>Sat, 11 Jul 2026 17:30:00 GMT</lastBuildDate>
<item>
<title>How we ship release notes</title>
<link>https://demo.cli-blog.example/blog/how-we-ship-release-notes</link>
<guid isPermaLink="true">https://demo.cli-blog.example/blog/how-we-ship-release-notes</guid>
<description>A repeatable draft, review, and publish workflow.</description>
<pubDate>Sat, 11 Jul 2026 17:30:00 GMT</pubDate>
</item>
</channel>
</rss>The Node SDK returns the XML string:
import { CliBlog } from "@cli-blog/node";
const blog = new CliBlog({
apiKey: process.env.CLI_BLOG_PUBLIC_API_KEY!,
apiUrl: "https://api.cli-blog.com",
});
const feedXml = await blog.feed.get({ locale: "en-US", limit: 50 });The CLI writes the same XML to standard output:
cli-blog feed get --locale en-US --limit 50 > public/feed.xmlConfigure feed metadata
Cli Blog reads the channel title, description, and link from publication settings. It uses each post's canonical URL when present, then resolves the slug against the publication URL.
Refresh the feed after publishing, unpublishing, deleting, or changing a post excerpt. Use Posts with cursor pagination when an integration needs full post bodies or more than 100 entries.
Feed fields
| XML field | Description |
|---|---|
<title> | Publication title for the channel or post title for an item |
<link> | Absolute publication or post URL |
<description> | Publication description or excerpt-only item summary |
<language> | Requested BCP 47 locale tag |
<lastBuildDate> | RFC 822 channel build timestamp |
<guid> | Absolute post URL used as the item identifier |
<pubDate> | RFC 822 post publication timestamp |
The feed excludes drafts, scheduled posts that are not due, deleted posts, and posts with robots_index: false.
Common errors
| Status or symptom | Cause | Resolution |
|---|---|---|
400 | Requested locale is not enabled or limit is invalid | Select a supported locale and a limit from 1 to 100 |
401 | Missing or invalid API key | Send the organization key in x-api-key |
403 | Key lacks post read permission | Use a public or private key with post read access |
| Empty channel | No eligible post exists in the selected locale | Publish indexable posts in that locale |
| Missing item | Post is unpublished, not due, deleted, non-indexable, or outside the limit | Check its workflow, robots setting, and publication order |
| Wrong link | Publication URL or post canonical override is incorrect | Update publication settings or canonical_url |
Complete API operation
The operation reference lists locale and limit parameters, the RSS response schema, authentication rules, and errors. Use Try it to open the request runner.
Generate an RSS 2.0 feed for published, indexable posts in one locale. Customer sites should proxy this endpoint onto /feed.xml on their own domain so readers receive first-party post URLs.
Authorization
ApiKeyAuth Organization API key. Each key selects exactly one organization; do not send an organization ID separately. Public keys use the cli_blog_pk_ prefix and are intended for published-content delivery reads. Private keys use the cli_blog_sk_ prefix, belong only in trusted environments, and are required for write, publish, delete, and editorial-state workflows when their scopes allow it.
In: header
Query Parameters
Optional BCP 47 locale filter. Omit it to use the organization's primary locale for the feed.
Maximum feed items to include.
Response Body
text/plain
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/feed""string"{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}{ "error": { "code": "invalid_request", "message": "string", "param": "string" }}