[![webforai logo](https://camo.githubusercontent.com/00f1f380800b4d5973d9cb5022d071ade234656220b7e4e46be0270cc9b97703/68747470733a2f2f776562666f7261692e6465762f696d616765732f6c6f676f2d66756c6c2d6c696768742e737667)](https://camo.githubusercontent.com/00f1f380800b4d5973d9cb5022d071ade234656220b7e4e46be0270cc9b97703/68747470733a2f2f776562666f7261692e6465762f696d616765732f6c6f676f2d66756c6c2d6c696768742e737667) A esm-native library that converts HTML to Markdown & Useful Utilities with simple, lightweight and epic quality. [![Version](https://camo.githubusercontent.com/658adc6f3bf3b22dfcd8667e582e0c026a09813c1133aa763152b0a0ed4a8ec1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f776562666f7261693f7374796c653d666c6174)](https://camo.githubusercontent.com/658adc6f3bf3b22dfcd8667e582e0c026a09813c1133aa763152b0a0ed4a8ec1/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f776562666f7261693f7374796c653d666c6174) [![Apache License](https://camo.githubusercontent.com/62464572ba2087953c5174f9424ec445214de5ecfa4585b04ae73acefe79943d/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f776562666f7261693f7374796c653d666c6174)](https://camo.githubusercontent.com/62464572ba2087953c5174f9424ec445214de5ecfa4585b04ae73acefe79943d/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f6c2f776562666f7261693f7374796c653d666c6174) ## Documentation [Head to the documentation](https://webforai.dev/) to read and learn more about Webforai. ```shell npx webforai@latest ``` ```ts import { htmlToMarkdown, htmlToMdast } from "webforai"; import { loadHtml } from "webforai/loaders/playwright"; // Load html from url const url = "https://www.npmjs.com/package/webforai"; const html = await loadHtml(url); // Convert html to markdown const markdown = htmlToMarkdown(html, { baseUrl: url }); ``` - [GitHub Sponsors](https://github.com/sponsors/inaridiy) - [inaridiy.eth](https://x.com/inaridiy) [Apache 2.0](https://github.com/inaridiy/webforai/blob/HEAD/LICENSE) License