Skip to content

API Reference ​

This section documents all public functions and types exported by Feedscout.

Main Functions ​

FunctionDescriptionImport
discoverFeedsDiscover and validate feeds from a URLfeedscout
discoverBlogrollsDiscover and validate OPML blogrollsfeedscout
discoverFaviconsDiscover and validate faviconsfeedscout
discoverHubsDiscover WebSub hubs from feedsfeedscout

Discovery Method Functions ​

These functions extract URIs without validation. Import from feedscout/methods:

FunctionDescription
discoverUrisFromPlatformGenerate feed URIs for known platforms
discoverUrisFromFeedExtract URIs from feed content
discoverUrisFromHtmlExtract feed URIs from HTML content
discoverUrisFromHeadersExtract feed URIs from HTTP headers
discoverUrisFromGuessGenerate feed URIs from common paths

Utility Functions ​

Import from feedscout/methods:

FunctionDescription
getWwwCounterpartGet www/non-www variant of a URL
getSubdomainVariantsGenerate subdomain variants of a URL
generateUrlCombinationsCombine base URLs with URI paths

Import from feedscout/utils:

FunctionDescription
isSubdomainOfCheck if URL is subdomain of domain
isHostOfCheck if URL host matches any in list
includesAnyOfCheck if string includes any pattern
isAnyOfCheck if string equals any pattern
anyWordMatchesAnyOfCheck if any word matches patterns
endsWithAnyOfCheck if string ends with any pattern
omitEmptyDrop empty values from an array

Import from feedscout:

FunctionDescription
getFeedSiteUrlGet the site URL from a feed parsed with Feedsmith
defaultResolveSiteUrlFnDefault site URL resolution used by discoverBlogrolls and discoverFavicons

Export Paths ​

Feedscout uses multiple export paths for tree-shaking:

typescript
// Main exports
import { discoverFeeds, discoverBlogrolls, discoverFavicons, discoverHubs } from 'feedscout'
import type { DiscoverUriEntry, DiscoverUriHint, UriEntry } from 'feedscout'

// Feed-specific defaults and types
import { mimeTypes, urisBalanced } from 'feedscout/feeds'

// Blogroll-specific defaults and types
import { urisComprehensive } from 'feedscout/blogrolls'

// Favicon-specific defaults and types
import { defaultGuessPaths, defaultIconRels } from 'feedscout/favicons'

// Hub-specific types
import type { HubResult, DiscoverHubsOptions } from 'feedscout/hubs'

// Platform-specific handlers and types
import { youtubeHandler, defaultPlatformOptions } from 'feedscout/platform'
import type { PlatformHandler } from 'feedscout/platform'

// Discovery method functions
import { discoverUrisFromPlatform, discoverUrisFromHtml } from 'feedscout/methods'

// Utility functions
import { isSubdomainOf, isHostOf } from 'feedscout/utils'