curl --request GET \
--url https://api.buttercms.com/v2/feeds/rss/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.buttercms.com/v2/feeds/rss/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.buttercms.com/v2/feeds/rss/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.buttercms.com/v2/feeds/rss/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.buttercms.com/v2/feeds/rss/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.buttercms.com/v2/feeds/rss/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buttercms.com/v2/feeds/rss/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:media=\"http://search.yahoo.com/mrss/\" version=\"2.0\">\n <channel>\n <title>Latest blog posts</title>\n <link>https://example.buttercms.com/blog/rss/</link>\n <description />\n <atom:link href=\"https://example.buttercms.com/blog/rss/\" rel=\"self\" />\n <language>en-us</language>\n <lastBuildDate>Mon, 15 Jan 2024 10:00:00 +0000</lastBuildDate>\n <item>\n <title>API Development Best Practices for 2024</title>\n <link>https://example.buttercms.com/blog/api-development-best-practices</link>\n <media:content medium=\"image\" url=\"https://cdn.buttercms.com/featured/api-guide.jpg\"/>\n <dc:creator xmlns:dc=\"http://purl.org/dc/elements/1.1/\">John Developer</dc:creator>\n <pubDate>Mon, 15 Jan 2024 10:00:00 +0000</pubDate>\n <guid>https://example.buttercms.com/blog/api-development-best-practices</guid>\n <description>Learn the essential best practices for building scalable and maintainable APIs in 2024.</description>\n <content:encoded>\n <![CDATA[<h2>Introduction</h2><p>Building robust APIs requires following established best practices. In this comprehensive guide, we'll explore the key principles that ensure your APIs are scalable, maintainable, and developer-friendly.</p><h3>Key Principles</h3><p>Modern API development focuses on consistency, documentation, and performance optimization...</p>]]>\n </content:encoded>\n </item>\n <item>\n <title>RESTful API Design Principles</title>\n <link>https://example.buttercms.com/blog/restful-api-design-principles</link>\n <media:content medium=\"image\" url=\"https://cdn.buttercms.com/featured/rest-design.jpg\"/>\n <dc:creator xmlns:dc=\"http://purl.org/dc/elements/1.1/\">Sarah Architect</dc:creator>\n <pubDate>Fri, 12 Jan 2024 09:00:00 +0000</pubDate>\n <guid>https://example.buttercms.com/blog/restful-api-design-principles</guid>\n <description>Master the fundamental principles of RESTful API design for better developer experience.</description>\n <content:encoded>\n <![CDATA[<h2>Core Principles</h2><p>RESTful API design follows key principles that ensure scalability and intuitive usage. Understanding these principles is crucial for creating APIs that developers love to use.</p>]]>\n </content:encoded>\n </item>\n </channel>\n</rss>\n"RSS Feed
Generate a compliant RSS 2.0 XML feed for blog content with filtering options for targeted content syndication.
curl --request GET \
--url https://api.buttercms.com/v2/feeds/rss/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.buttercms.com/v2/feeds/rss/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.buttercms.com/v2/feeds/rss/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.buttercms.com/v2/feeds/rss/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.buttercms.com/v2/feeds/rss/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.buttercms.com/v2/feeds/rss/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buttercms.com/v2/feeds/rss/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<rss xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:media=\"http://search.yahoo.com/mrss/\" version=\"2.0\">\n <channel>\n <title>Latest blog posts</title>\n <link>https://example.buttercms.com/blog/rss/</link>\n <description />\n <atom:link href=\"https://example.buttercms.com/blog/rss/\" rel=\"self\" />\n <language>en-us</language>\n <lastBuildDate>Mon, 15 Jan 2024 10:00:00 +0000</lastBuildDate>\n <item>\n <title>API Development Best Practices for 2024</title>\n <link>https://example.buttercms.com/blog/api-development-best-practices</link>\n <media:content medium=\"image\" url=\"https://cdn.buttercms.com/featured/api-guide.jpg\"/>\n <dc:creator xmlns:dc=\"http://purl.org/dc/elements/1.1/\">John Developer</dc:creator>\n <pubDate>Mon, 15 Jan 2024 10:00:00 +0000</pubDate>\n <guid>https://example.buttercms.com/blog/api-development-best-practices</guid>\n <description>Learn the essential best practices for building scalable and maintainable APIs in 2024.</description>\n <content:encoded>\n <![CDATA[<h2>Introduction</h2><p>Building robust APIs requires following established best practices. In this comprehensive guide, we'll explore the key principles that ensure your APIs are scalable, maintainable, and developer-friendly.</p><h3>Key Principles</h3><p>Modern API development focuses on consistency, documentation, and performance optimization...</p>]]>\n </content:encoded>\n </item>\n <item>\n <title>RESTful API Design Principles</title>\n <link>https://example.buttercms.com/blog/restful-api-design-principles</link>\n <media:content medium=\"image\" url=\"https://cdn.buttercms.com/featured/rest-design.jpg\"/>\n <dc:creator xmlns:dc=\"http://purl.org/dc/elements/1.1/\">Sarah Architect</dc:creator>\n <pubDate>Fri, 12 Jan 2024 09:00:00 +0000</pubDate>\n <guid>https://example.buttercms.com/blog/restful-api-design-principles</guid>\n <description>Master the fundamental principles of RESTful API design for better developer experience.</description>\n <content:encoded>\n <![CDATA[<h2>Core Principles</h2><p>RESTful API design follows key principles that ensure scalability and intuitive usage. Understanding these principles is crucial for creating APIs that developers love to use.</p>]]>\n </content:encoded>\n </item>\n </channel>\n</rss>\n"Authorizations
Set the Authorization header to Token your_read_api_token.
Example: Authorization: Token abc123def456
Note: The header value includes the Token prefix.
You can access your API token from your settings page.
Query Parameters
Your ButterCMS read API token
Filter the RSS feed to include only posts from a specific category.
Provide the URL-friendly slug of the category. When specified, only blog posts assigned to this category will be included in the RSS feed.
Filter the RSS feed to include only posts with a specific tag.
Provide the URL-friendly slug of the tag. When specified, only blog posts tagged with this tag will be included in the RSS feed.
Return only posts in the given locale (e.g. en, es) in the feed. When omitted, defaults to your organization's default locale.
Returns 400 if the value is not a locale configured on your organization.
10Response
RSS feed generated successfully
Complete RSS 2.0 XML feed with blog posts
Was this page helpful?