> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/agent-builder/crawler.md).

# Crawler

## What Is This? <a href="#what-is-this" id="what-is-this"></a>

The crawler automatically scrapes content from web pages and imports it into the Knowledge Base. Simply provide a URL, and it will crawl the text content of that page (or the entire website) and convert it into knowledge that the Agent can reference.

## When Do You Need It? <a href="#when-do-you-need-it" id="when-do-you-need-it"></a>

* **Website content**: Automatically import product descriptions and service information from your company website
* **Public information**: Scrape publicly available web pages such as regulations, announcements, and technical documents
* **Continuous updates**: When website content changes, periodically re-crawl to keep the Knowledge Base up to date

## Relationship Between Crawler and Knowledge Base <a href="#crawler-and-knowledge-base-relationship" id="crawler-and-knowledge-base-relationship"></a>

The crawler is **one of the data sources** for the Knowledge Base. Its role is:

```
Data Source          Knowledge Base      Agent
─────────           ──────              ──────
Manual file upload ──→
Create FAQ         ──→  Enterprise       ──→  Look up and respond
Crawler scraping   ──→  Knowledge Base
```

The content scraped by the crawler ultimately enters the Knowledge Base. The Agent does not interact with the crawler directly.

## What Do I Need to Do? <a href="#what-do-i-need-to-do" id="what-do-i-need-to-do"></a>

1. **Enter a URL** — Tell the crawler which web page or website to scrape
2. **Set the scope** — Scrape a single page only, or recursively crawl subpages
3. **Run the crawl** — Start the crawler and wait for it to complete
4. **Import into Knowledge Base** — Import the crawl results into a specified Knowledge Base
5. **Verify the content** — Check whether the imported content is correct and complete

## Further Reading <a href="#further-reading" id="further-reading"></a>

* [How to Use the Crawler (Scrape Data) Feature](https://github.com/Playma-Co-Ltd/maiagent-user-guide-gitbook/tree/main/en/km/scrape-website.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/agent-builder/crawler.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
