# Gitbook loader

### Overview

The GitBook Loader Node allows you to extract content from GitBook documentation pages. It can either load a single page or recursively load all pages from a GitBook documentation site, making it ideal for creating knowledge bases from GitBook documentation.

Usage cost: 1 credit for unique page / 10 credits for whole documentation

### Configuration

#### Settings

1. **GitBook URL**
   * URL to the GitBook documentation
   * Can be a specific page URL or root URL when loading all paths
   * Required field
   * Supports variable interpolation
2. **Load Options**
   * Load All Paths: Toggle to recursively load all pages
     * When enabled: URL must be the GitBook root
     * When disabled: Loads only the specified page

#### Output Ports

1. `documents` (List\[Document]): List of Document objects containing:
   * Page content
   * Metadata (URL, title, etc.)
2. `documents_content` (List\[string]):
   * List of extracted text content
   * Content only, without metadata

### Best Practices

1. **URL Configuration**
   * Use root URL when loading all paths
   * Ensure URLs are accessible (public documentation)
   * Verify URL format before execution
2. **Content Loading**
   * Use single page loading for specific content
   * Consider load time for large documentation sites

### Common Issues

* Rate limiting from GitBook servers
* Memory limitations with large documentation sites
* Slow loading times for recursive fetching
* Malformed URLs causing loading failures


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.waterflai.ai/studio/studio-builders/flow-components-nodes/gitbook-loader.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
