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
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
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

Export Paths

Feedscout uses multiple export paths for tree-shaking:

typescript
// Main exports
import { discoverFeeds, discoverBlogrolls, 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 { urisBalanced } from 'feedscout/blogrolls'

// 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'