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

# Fetch web pages

> Read a web page or a whole site as Markdown with arakun fetch and arakun crawl, loaded in a real browser on Cloudflare Browser Run.

Some pages need JavaScript to show anything. `arakun fetch` and `arakun crawl` load them in Cloudflare Browser Run, a real browser on Cloudflare's network, and give back Markdown an agent can read.

They work without a running Arakun.

## Set up a token

**1. Create a Cloudflare API token**

Give it the **Browser Run - Edit** permission. The `cf` sign-in doesn't carry it.

**2. Store it with its account**

```sh theme={"dark"}
arakun fetch --set-token <account-id> < token.txt
```

The token is read from stdin and kept in the system keyring.

Or set `CLOUDFLARE_BROWSER_RUN_TOKEN` and `CLOUDFLARE_ACCOUNT_ID` instead.

## Fetch a page

```sh theme={"dark"}
arakun fetch https://example.com          # the page as Markdown
arakun fetch --html https://example.com   # the rendered HTML
arakun fetch --links https://example.com  # the links on the page
```

## Crawl a site

```sh theme={"dark"}
arakun crawl --limit 50 --depth 2 https://example.com/docs
```

This prints the site's pages as Markdown, one after another, as they are read.

**--limit N**

The most pages to read. The default is 20.

**--depth N**

How many links deep to go from the first page.

**--render**

Run each page's JavaScript before reading it.

**--include \<glob>**

Read only pages whose address matches. Repeat it for more patterns.

**--exclude \<glob>**

Skip pages whose address matches. Repeat it for more patterns.

A crawl gives up after 30 minutes.

## Limits

* What you can fetch depends on your Workers plan. On a rate limit, Arakun waits and tries again a few times.
* It does not get past captchas.
* `arakun crawl` honors `robots.txt` and Content Signals.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.