Discover Blogrolls
Feedscout can discover OPML blogrolls alongside regular feeds. Blogrolls are collections of feed subscriptions that websites share with visitors.
What Are Blogrolls?
Blogrolls are OPML files containing lists of feeds. They're used to share reading lists, recommendations, or subscriptions. Common locations include:
/.well-known/recommendations.opml
/blogroll.opml
/opml.xml
/subscriptions.opmlDiscovering Blogrolls
Use discoverBlogrolls() to find OPML files:
import { discoverBlogrolls } from 'feedscout'
const blogrolls = await discoverBlogrolls('https://example.com')By default, all discovery methods are used (html, headers, guess). You can customize which methods to use:
const blogrolls = await discoverBlogrolls('https://example.com', {
methods: ['html', 'headers'],
})Results include the blogroll URL and title:
{
url: 'https://example.com/blogroll.opml',
isValid: true,
title: 'My Reading List',
}Discovery Methods
Blogrolls use the same three discovery methods as feeds — see the Feeds section for details on how each method works.
| Method | What It Looks For |
|---|---|
| HTML | <link rel="blogroll"> and anchor tags matching OPML patterns |
| Headers | Link: </blogroll.opml>; rel="blogroll" headers |
| Guess | Common paths like /.well-known/recommendations.opml, /blogroll.opml |
Configuration
Customize discovery the same way as feeds:
import { urisComprehensive } from 'feedscout/blogrolls'
const blogrolls = await discoverBlogrolls(url, {
methods: {
html: {
anchorLabels: ['blogroll', 'opml', 'subscriptions'],
},
guess: {
uris: urisComprehensive,
},
},
})URI Sets
There are three predefined URI sets:
Minimal
Basic paths following common conventions:
import { urisMinimal } from 'feedscout/blogrolls'
// [
// '/.well-known/recommendations.opml',
// '/blogroll.opml',
// '/opml.xml',
// ]Balanced (Default)
Includes additional common variations:
import { urisBalanced } from 'feedscout/blogrolls'
// urisMinimal + [
// '/blogroll.xml',
// '/subscriptions.opml',
// '/recommendations.opml',
// ]Comprehensive
Includes less common patterns:
import { urisComprehensive } from 'feedscout/blogrolls'
// urisBalanced + [
// '/links.opml',
// '/feeds.opml',
// '/subscriptions.xml',
// ]Default Link Selectors
Blogroll discovery uses these link selectors:
import { linkSelectors, mimeTypes } from 'feedscout/blogrolls'
// [
// { rel: 'blogroll' },
// { rel: 'outline', types: mimeTypes },
// ]