Appearance
Manage Bundles
FreshBundles are named collections of feeds. A bundle exposes its own rss_feed_url that combines content from all member feeds into a single aggregated stream. This is useful when you want to distribute a unified feed from multiple sources without requiring subscribers to manage each feed individually.
What Bundles Are For
A bundle solves the problem of managing related feeds as a group. For example:
- A "Technology News" bundle containing feeds from multiple tech publications
- A "Client Industry" bundle with feeds about a specific market vertical
- A "Competitor Watch" bundle tracking multiple competitor blogs
- A "Regional News" bundle with feeds from local outlets in a geography
When you add a feed to a bundle and a subscriber follows the bundle's RSS URL, they receive items from all member feeds in a single stream sorted by date.
Prerequisites
- At least one feed already created (see Create Feed from URL)
- RSS.app account with API access enabled
- API Key and Secret (see Authentication)
Step 1: Create a Bundle
js
const axios = require('axios');
const apiClient = axios.create({
baseURL: 'https://api.rss.app/v1',
headers: {
Authorization: `Bearer YOUR_API_KEY:YOUR_API_SECRET`,
'Content-Type': 'application/json',
},
});
async function createBundle(name, feedIds = []) {
const response = await apiClient.post('/bundles', {
name,
feeds: feedIds,
});
return response.data;
}
// Create a bundle with existing feed IDs
createBundle('Technology News', ['feed_abc123', 'feed_def456'])
.then((bundle) => {
console.log('Bundle ID:', bundle.id);
console.log('Bundle RSS URL:', bundle.rss_feed_url);
console.log('Feed count:', bundle.feeds.length);
})
.catch((err) => console.error(err.response?.data || err.message));The feeds array is optional at creation — you can create an empty bundle and add feeds afterward.
Step 2: Retrieve a Bundle
js
async function getBundle(bundleId) {
const response = await apiClient.get(`/bundles/${bundleId}`);
return response.data;
}
getBundle('bundle_xyz789')
.then((bundle) => {
console.log('Name:', bundle.name);
console.log('Description:', bundle.description);
console.log('Member feeds:', bundle.feeds);
console.log('Item count:', bundle.items.length);
});Pass ?sort=last_added or ?sort=date as a query parameter to control item ordering:
js
const response = await apiClient.get(`/bundles/${bundleId}?sort=date`);Step 3: Add a Feed to an Existing Bundle
Once you have a bundle, you can add feeds to it at any time using a PUT request:
js
async function addFeedToBundle(bundleId, feedId) {
const response = await apiClient.put(`/bundles/${bundleId}/feeds/${feedId}`);
return response.data;
}
addFeedToBundle('bundle_xyz789', 'feed_new111')
.then(() => console.log('Feed added to bundle'))
.catch((err) => console.error(err.response?.data || err.message));Step 4: Remove a Feed from a Bundle
js
async function removeFeedFromBundle(bundleId, feedId) {
const response = await apiClient.delete(`/bundles/${bundleId}/feeds/${feedId}`);
return response.data;
}
removeFeedFromBundle('bundle_xyz789', 'feed_old222')
.then(() => console.log('Feed removed from bundle'))
.catch((err) => console.error(err.response?.data || err.message));Removing a feed from a bundle does not delete the feed itself — it remains in your account and can be added to other bundles.
Step 5: Update Bundle Metadata
Update the bundle's name, description, or icon:
js
async function updateBundle(bundleId, updates) {
const response = await apiClient.patch(`/bundles/${bundleId}`, updates);
return response.data;
}
updateBundle('bundle_xyz789', {
name: 'Tech & Science News',
description: 'Aggregated coverage of technology and science topics',
})
.then((bundle) => console.log('Updated bundle:', bundle.name));Step 6: List All Bundles
js
async function listAllBundles() {
const allBundles = [];
let offset = 0;
const limit = 50;
while (true) {
const response = await apiClient.get('/bundles', {
params: { limit, offset },
});
const { data } = response;
allBundles.push(...data);
if (data.length < limit) break;
offset += limit;
}
return allBundles;
}Step 7: Delete a Bundle
js
async function deleteBundle(bundleId) {
await apiClient.delete(`/bundles/${bundleId}`);
console.log(`Bundle ${bundleId} deleted`);
}Deleting a bundle does not delete the member feeds. Only the bundle object itself is removed.
Complete Bundle Workflow Example
js
async function setupClientBundle(clientName, websiteUrls) {
// Create feeds for each client website
const feedPromises = websiteUrls.map((url) =>
apiClient.post('/feeds', { url }).then((r) => r.data.id)
);
const feedIds = await Promise.all(feedPromises);
// Create a bundle with all feeds
const bundle = await createBundle(`${clientName} - News`, feedIds);
console.log(`Created bundle for ${clientName}`);
console.log('RSS URL to share:', bundle.rss_feed_url);
return bundle;
}
setupClientBundle('Acme Corp', [
'https://acmecorp.com/news',
'https://acmecorp.com/blog',
'https://industry-news.com',
]);