Spinney is a TypeScript-first web scraping library that turns a single URL into a live stream of crawled pages. Built on top of RxJS, it models each scrape as an Observable — you subscribe, receive discovered URLs and parsed content as events, then unsubscribe when done. Spinney automatically reads and respectsDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/cobyeastwood/spinney/llms.txt
Use this file to discover all available pages before exploring further.
robots.txt rules, follows XML sitemaps, deduplicates visited links, and retries failed requests with exponential backoff.
Installation
Add Spinney to your project with npm, yarn, or pnpm in seconds.
Quickstart
Build your first scraper and start streaming crawled URLs in under 5 minutes.
API Reference
Full reference for the Spinney class, constructor options, and all public methods.
Guides
Learn how Spinney handles robots.txt, sitemaps, error handling, and configuration.
Why Spinney?
Spinney removes boilerplate from web crawling by giving you a reactive, event-driven interface instead of a callback soup. Feed it a URL and subscribe to its output — every crawled page emits anext event, parse events fire per element, and complete fires when the entire site graph is exhausted.
Observable API
Powered by RxJS. Compose, filter, and transform crawl streams with standard operators.
robots.txt Aware
Automatically fetches and enforces Disallow rules before crawling begins.
Sitemap Support
Detects XML sitemaps and uses them as the crawl seed list when available.
Auto Retry
Failed requests retry up to 5 times with incrementally increasing timeouts.
Deduplication
Tracks every visited URL in a Set — no page is fetched or emitted twice.
TypeScript First
Full type definitions ship with the package. No
@types package needed.Quick Look
quickstart.ts
Create a Spinney instance
Pass your target URL to
new Spinney(). Optionally provide Options and Axios config.