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

# Introduction

> X1-BaaS — a Browser-as-a-Service API that turns any URL into clean, LLM-ready data.

# Welcome to X1-BaaS

X1-BaaS (**Browser-as-a-Service**) is a programmatic web browsing engine built for
autonomous AI agents, MCP tool runners, and developer pipelines. Give it a URL and it
returns clean, LLM-ready data — Markdown, screenshots, PDFs, CSV, clean HTML, or
structured JSON — with stealth anti-bot bypass baked in (Cloudflare Turnstile,
DataDome, and friends).

## What you can do

* **Scrape** any URL to clean Markdown (or screenshot, PDF, CSV, HTML).
* **Extract** structured data using a JSON schema, CSS selectors, or XPath.
* **Crawl** multi-page sites in four modes: sitemap, link, pattern, and batch.
* **Webhooks** receive signed, asynchronous `crawl.completed` callbacks.
* **Pay two ways** — subscription API keys *or* per-request x402 micropayments.

## Core concepts

| Concept              | Description                                                     |
| -------------------- | --------------------------------------------------------------- |
| **Base URL**         | All API calls use `https://api.tazpal.com`                      |
| **API Key**          | `Authorization: Bearer baas_live_...` for subscription users    |
| **x402**             | Per-request USDC micropayments via the `X-PAYMENT` header       |
| **Stealth engine**   | Camoufox browser with humanized fingerprints and proxy failover |
| **LLM-first output** | Clean Markdown, not raw HTML dumps                              |

## Your first request

You don't need an account to try the public endpoints. Start with a health check:

<CodeGroup>
  ```bash theme={null}
  curl https://api.tazpal.com/health
  ```
</CodeGroup>

```json Response theme={null}
{
  "status": "ok",
  "browser_active": true,
  "browser_contexts": 42,
  "uptime_seconds": 86399.4,
  "x402_enabled": true
}
```

Then scrape your first page. This request uses an API key:

<CodeGroup>
  ```bash theme={null}
  curl -X POST https://api.tazpal.com/v1/scrape \
    -H "Authorization: Bearer baas_live_YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"url": "https://example.com"}'
  ```

  ```python theme={null}
  import httpx

  resp = httpx.post(
      "https://api.tazpal.com/v1/scrape",
      headers={"Authorization": "Bearer baas_live_YOUR_KEY"},
      json={"url": "https://example.com"},
  )
  print(resp.json()["data"]["markdown"])
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.tazpal.com/v1/scrape", {
    method: "POST",
    headers: {
      Authorization: "Bearer baas_live_YOUR_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ url: "https://example.com" }),
  });
  const json = await response.json();
  console.log(json.data.markdown);
  ```
</CodeGroup>

```json Response theme={null}
{
  "status": 200,
  "url": "https://example.com",
  "output": "markdown",
  "data": {
    "title": "Example Domain",
    "markdown": "Example Domain\n\nThis domain is for use in illustrative examples...",
    "character_count": 239
  },
  "execution_time_ms": 1842,
  "payment": null
}
```

<Note>
  Don't have an API key yet? You can also pay per request with x402. See the
  [Authentication](/authentication) page to learn both paths.
</Note>

## Next steps

<CardGroup cols={3}>
  <Card title="Authenticate" icon="key" href="/authentication">
    Set up an API key or wire up x402 payments.
  </Card>

  <Card title="x402 Wallet Setup" icon="wallet" href="/x402-wallet-setup">
    Set up an x402 wallet to pay per request — no account needed.
  </Card>

  <Card title="Scrape a page" icon="globe" href="/endpoints/scrape">
    The core endpoint — Markdown, screenshots, PDFs, and more.
  </Card>

  <Card title="Extract data" icon="table" href="/endpoints/extract">
    Structured extraction with schemas, CSS, or XPath.
  </Card>

  <Card title="Crawl a site" icon="sitemap" href="/endpoints/crawl">
    Multi-page crawl jobs with four modes.
  </Card>

  <Card title="Handle errors" icon="circle-exclamation" href="/reference/errors">
    Error codes and response shapes.
  </Card>

  <Card title="Use an SDK" icon="code" href="/sdks/python">
    Python and Node.js quick-start wrappers.
  </Card>
</CardGroup>
