Overview
Crawleo provides a dedicated LangChain integration package that makes it easy to use Crawleo’s web search and crawling capabilities in your LangChain applications.Installation
Install thelangchain-crawleo package:
Available Tools
The package provides two LangChain tools:CrawleoSearch
Web search tool powered by Crawleo’s Search API.
CrawleoCrawler
URL crawling tool powered by Crawleo’s Crawler API.
Quick Start
Basic Setup
Using Environment Variables
CrawleoSearch Tool
Perform web searches using the Search API:Parameters
| Parameter | Type | Description |
|---|---|---|
query | str | Search query (required) |
count | int | Number of results |
get_page_text_markdown | bool | Return Markdown content |
auto_crawling | bool | Crawl result pages |
CrawleoCrawler Tool
Crawl specific URLs:Parameters
| Parameter | Type | Description |
|---|---|---|
urls | str | Comma-separated URLs (required) |
markdown | bool | Return Markdown content |
raw_html | bool | Return raw HTML |
Using with LangChain Agents
Create an Agent with Crawleo Tools
RAG Pipeline Example
Build a RAG pipeline with Crawleo:Best Practices
Use Markdown Output
Use Markdown Output
Always use
markdown=True or get_page_text_markdown=True for LLM applications to minimize token usage.Handle Rate Limits
Handle Rate Limits
Implement retry logic for rate limit errors:
Cache Results
Cache Results
Cache crawled content to avoid redundant API calls:
