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

# Examples

> Runnable code examples for every feature of self-hosted Reader.

Every example below lives in the [reader repository](https://github.com/vakra-dev/reader/tree/main/examples) under `/examples`. Clone the repo to follow along:

```bash theme={null}
git clone https://github.com/vakra-dev/reader.git
cd reader
npm install
```

Then run any example with `tsx`:

```bash theme={null}
npx tsx examples/basic/basic-scrape.ts
```

## Basics

> [card] [Basic scrape](https://github.com/vakra-dev/reader/blob/main/examples/basic/basic-scrape.ts)
>
> Scrape a single URL and print the markdown result.

> [card] [All formats](https://github.com/vakra-dev/reader/blob/main/examples/basic/all-formats.ts)
>
> Request markdown and HTML in one call.

> [card] [Batch scrape](https://github.com/vakra-dev/reader/blob/main/examples/basic/batch-scrape.ts)
>
> Scrape multiple URLs in parallel with progress tracking.

> [card] [Large batch scrape](https://github.com/vakra-dev/reader/blob/main/examples/basic/large-batch-scrape.ts)
>
> Scale up concurrency and tune the pool for hundreds of URLs.

> [card] [Crawl a website](https://github.com/vakra-dev/reader/blob/main/examples/basic/crawl-website.ts)
>
> Discover and scrape every page on a domain.

> [card] [Browser pool config](https://github.com/vakra-dev/reader/blob/main/examples/basic/browser-pool-config.ts)
>
> Tune pool size, recycling, and health checks.

## Proxies & bypass

> [card] [Single proxy](https://github.com/vakra-dev/reader/blob/main/examples/basic/with-proxy.ts)
>
> Pass a single proxy per request.

> [card] [Proxy pool rotation](https://github.com/vakra-dev/reader/blob/main/examples/basic/proxy-pool.ts)
>
> Rotate through a pool with round-robin or random strategy.

> [card] [Cloudflare bypass](https://github.com/vakra-dev/reader/blob/main/examples/basic/cloudflare-bypass.ts)
>
> Scrape sites behind Cloudflare challenges.

## AI & LLM integrations

> [card] [Anthropic summary](https://github.com/vakra-dev/reader/blob/main/examples/ai-tools/anthropic-summary.ts)
>
> Pipe scraped markdown to Claude for summarization.

> [card] [OpenAI summary](https://github.com/vakra-dev/reader/blob/main/examples/ai-tools/openai-summary.ts)
>
> Same pattern with GPT-4 or GPT-4o-mini.

> [card] [Vercel AI streaming](https://github.com/vakra-dev/reader/blob/main/examples/ai-tools/vercel-ai-stream.ts)
>
> Stream scrape + LLM output with the Vercel AI SDK.

> [card] [LangChain loader](https://github.com/vakra-dev/reader/blob/main/examples/ai-tools/langchain-loader.ts)
>
> Use Reader as a LangChain document loader.

> [card] [LlamaIndex loader](https://github.com/vakra-dev/reader/blob/main/examples/ai-tools/llamaindex-loader.ts)
>
> Use Reader as a LlamaIndex data connector.

> [card] [Pinecone ingest](https://github.com/vakra-dev/reader/blob/main/examples/ai-tools/pinecone-ingest.ts)
>
> Scrape, chunk, embed, and upsert to Pinecone.

> [card] [Qdrant ingest](https://github.com/vakra-dev/reader/blob/main/examples/ai-tools/qdrant-ingest.ts)
>
> Same pattern with Qdrant as the vector store.

## Production patterns

> [card] [Express server](https://github.com/vakra-dev/reader/tree/main/examples/production/express-server)
>
> Embed Reader in an HTTP API with a persistent client.

> [card] [BullMQ job queue](https://github.com/vakra-dev/reader/tree/main/examples/production/job-queue-bullmq)
>
> Process scrape jobs from a Redis-backed queue with retries.

> [card] [Browser pool scaling](https://github.com/vakra-dev/reader/tree/main/examples/production/browser-pool-scaling)
>
> Patterns for scaling the pool under real load.

## Deployment

> [card] [Docker Compose](https://github.com/vakra-dev/reader/tree/main/examples/deployment/docker)
>
> Production Dockerfile + compose with correct shm\_size and capabilities.

> [card] [AWS Lambda](https://github.com/vakra-dev/reader/tree/main/examples/deployment/aws-lambda)
>
> Deploy Reader as a serverless function handler.

> [card] [Vercel Functions](https://github.com/vakra-dev/reader/tree/main/examples/deployment/vercel-functions)
>
> Run Reader from a Vercel Edge/Node function.

## Where to go next

> [card] [Quickstart](https://reader.mintlify.site/self-hosted/getting-started/quickstart.md)
>
> Walk through your first scrape in more depth.

> [card] [API Reference](https://reader.mintlify.site/self-hosted/api-reference/reader-client.md)
>
> Full type reference for every option.


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