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

# Output Formats

> Learn about Crawleo's output format options: raw HTML, enhanced HTML, plain text, and Markdown. Choose the best format for your use case with RAG pipelines, LLMs, and AI applications.

## Overview

Crawleo provides multiple output formats optimized for different use cases. Choose the format that best fits your application's needs.

## Available Formats

<CardGroup cols={2}>
  <Card title="Raw HTML" icon="code">
    Original page source with all elements intact.
  </Card>

  <Card title="Enhanced HTML" icon="sparkles">
    Clean HTML with ads, scripts, and tracking removed (default).
  </Card>

  <Card title="Plain Text" icon="file-lines">
    Extracted text content without HTML markup.
  </Card>

  <Card title="Markdown" icon="markdown">
    Structured Markdown optimized for LLMs (default).
  </Card>
</CardGroup>

## Format Details

### Raw HTML

Returns the complete, unmodified HTML source of the page.

**Parameter:** `raw_html=true`

**Best for:**

* Full page preservation
* Custom parsing and extraction
* When you need exact page structure

**Example output:**

```html theme={null}
<!DOCTYPE html>
<html>
<head>
  <title>Example Page</title>
  <script src="analytics.js"></script>
</head>
<body>
  <nav>...</nav>
  <main>
    <h1>Welcome</h1>
    <p>Content here...</p>
  </main>
  <footer>...</footer>
</body>
</html>
```

***

### Enhanced HTML

Returns cleaned HTML with ads, tracking scripts, and unnecessary elements removed. **Enabled by default.**

**Parameter:** `enhanced_html=true` (default)

**Best for:**

* Cleaner content processing
* Reduced noise in extraction
* When you want HTML structure without clutter

**Example output:**

```html theme={null}
<main>
  <h1>Welcome</h1>
  <p>Content here...</p>
</main>
```

***

### Plain Text

Returns extracted text content without any HTML markup.

**Parameter:** `page_text=true`

**Best for:**

* Simple text processing
* Search and analysis tasks
* When HTML structure isn't needed

**Example output:**

```
Welcome

Content here...
```

***

### Markdown

Returns content converted to structured Markdown format. **Enabled by default.**

**Parameter:** `markdown=true` (default)

**Best for:**

* RAG pipelines
* LLM consumption
* Vector database ingestion
* Minimal token usage

**Example output:**

```markdown theme={null}
# Welcome

Content here...

## Section Title

More content with [links](https://example.com) and **formatting**.
```

## Format Comparison

| Format        | Token Usage | Structure | Noise Level | Best For          |
| ------------- | ----------- | --------- | ----------- | ----------------- |
| Raw HTML      | High        | Full      | High        | Custom parsing    |
| Enhanced HTML | Medium      | Partial   | Low         | Clean extraction  |
| Plain Text    | Low         | None      | Low         | Simple processing |
| Markdown      | Low         | Preserved | Minimal     | LLM/RAG           |

## Recommendations by Use Case

<AccordionGroup>
  <Accordion title="RAG Pipeline" icon="brain">
    Use **Markdown** format for optimal results:

    * Preserves document structure (headers, lists, links)
    * Minimal token usage
    * Clean content ready for embedding

    ```python theme={null}
    response = requests.get(
        "https://api.crawleo.dev/crawl",
        params={"urls": url, "markdown": True},
        headers={"Authorization": f"Bearer {api_key}"}
    )
    ```
  </Accordion>

  <Accordion title="LLM Context" icon="message">
    Use **Markdown** or **Plain Text**:

    * Markdown if structure matters (enabled by default)
    * Plain text for maximum token efficiency

    ```python theme={null}
    # For structured content (default)
    params = {"urls": url, "markdown": True}

    # For simple text
    params = {"urls": url, "page_text": True, "markdown": False}
    ```
  </Accordion>

  <Accordion title="Web Scraping" icon="spider">
    Use **Raw HTML** or **Enhanced HTML**:

    * Raw HTML for full control
    * Enhanced HTML for cleaner starting point (default)

    ```python theme={null}
    # Get both formats
    params = {"urls": url, "raw_html": True, "enhanced_html": True}
    ```
  </Accordion>

  <Accordion title="Content Analysis" icon="chart-bar">
    Use **Plain Text** or **Markdown**:

    * Easy to process with NLP tools
    * No HTML parsing required
  </Accordion>
</AccordionGroup>

## Multiple Formats

You can request multiple formats in a single request:

```bash theme={null}
curl -X GET "https://api.crawleo.dev/crawl?urls=https://example.com&raw_html=true&enhanced_html=true&markdown=true&page_text=true" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

The response will include all requested formats.

<Tip>
  **Pro tip:** Markdown and Enhanced HTML are enabled by default. You only need to explicitly set parameters if you want to disable them or add additional formats.
</Tip>
