/markdownload

A Node.js library for downloading a URL and converting it into Markdown

Primary LanguageTypeScript

⬇️ Markdownload

markdownload is a Node.js library that allows scraping an arbitrary URL, and turning it into a stripped-down Markdown document. Among other things, this allows retrieving web links for use with LLM-powered applications.

Getting started

To use the markdownload library, follow the instructions below:

  1. Install the library:
npm install markdownload
  1. Import the library and download a URL:
import { download } from "markdownload";

(async () => {
  const { markdown, title } = await download("example.com");

  // Do something with the markdown/title
})();

Using the CLI

You can also use the markdownload CLI to download a URL and get the markdown content directly from the command line:

npx markdownload <url>

If you'd simply like to see the raw Markdown content, then append the --md flag:

npx markdownload <url> --md