> ## Documentation Index
> Fetch the complete documentation index at: https://waterfall.supafetch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Get up and running with Waterfall-Fetch in minutes

# Quick Start

This guide will help you get started with Waterfall-Fetch quickly and easily.

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install waterfall-fetch
  ```

  ```bash yarn theme={null}
  yarn add waterfall-fetch
  ```

  ```bash pnpm theme={null}
  pnpm add waterfall-fetch
  ```
</CodeGroup>

## Basic Usage

Here's a simple example of how to use Waterfall-Fetch:

```typescript theme={null}
import getHtml from "waterfall-fetch";

const url = "https://example.com";

// Basic usage
const result = await getHtml(url);

// Recommended usage with destructuring
const { html, error, success } = await getHtml(url);

if (success) {
	console.log(html);
} else {
	console.error(error);
}
```

<Tip>Waterfall-Fetch supports destructuring, inspired by the Supabase API, allowing for clean and intuitive usage.</Tip>

### Environment Variables

All of these are optional and getHtml will work without them all.
If you wish to use a remote headless browser service then simply include the API Key and all puppeteer requests will connect to this service.
Only *BROWSERLESS* is currently supported.

```text theme={null}
HEADLESS  // Optional
NODE_ENV  // Optional
BROWSERLESS_API_KEY  // Optional
BROWSERBASE_API_KEY  // Optional //unsupported (comming soon)
BROWSER_SERVICE  // Optional
```

For more advanced usage and configuration options, check out our [API Reference](/mdx/api-reference/gethtml).
