Official package
LangChain
The official LangChain integration for Crawleo. Use real-time web search and crawling as tools in your LangChain agents and pipelines.
What you get
CrawleoSearch
Real-time web search with multiple output formats.
CrawleoCrawler
Extract content from 1-20 URLs per request.
Async support
Async-compatible for concurrent, high-throughput runs.
Tool calling
Works as a standard tool with any LangChain agent.
Clean output
Markdown, HTML, enhanced HTML, or plain text.
Private by default
We don't train AI on your data, and we don't sell it.
Quick start
Installation
pip install -U langchain-crawleo
Set your API key
import osos.environ["CRAWLEO_API_KEY"] = "your-api-key"
CrawleoSearch - basic usage
from langchain_crawleo import CrawleoSearchsearch_tool = CrawleoSearch(max_pages=1, cc="US", markdown=True)result = search_tool.invoke({"query": "What is the future of AI?"})print(result)
Use it inside a LangChain agent
from langchain_crawleo import CrawleoSearch, CrawleoCrawlerfrom langchain.agents import initialize_agent, AgentTypefrom langchain_openai import ChatOpenAIsearch_tool = CrawleoSearch(max_pages=1, cc="US", markdown=True)crawler_tool = CrawleoCrawler(markdown=True)llm = ChatOpenAI(model="gpt-4o", temperature=0)agent = initialize_agent(tools=[search_tool, crawler_tool],llm=llm,agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,verbose=True,)response = agent.run("Search for SpaceX news and summarize the top result")print(response)
Parameters
CrawleoSearch
| Parameter | Type | Required | Description |
|---|---|---|---|
query | str | Yes | A natural-language search query. |
max_pages | int | No | Result pages to fetch. Default: 1. |
setLang | str | No | Interface language, e.g. "en". Default: "en". |
cc | str | No | Country code, e.g. "US", "GB", "DE". |
device | str | No | "desktop", "mobile", or "tablet". Default: "desktop". |
markdown | bool | No | Return content as Markdown. Default: True. |
CrawleoCrawler
| Parameter | Type | Required | Description |
|---|---|---|---|
urls | list[str] | Yes | URLs to crawl (1-20). |
raw_html | bool | No | Return raw HTML. Default: False. |
markdown | bool | No | Return Markdown. Default: False. |
Build with real-time web data
Get 500 free credits a month and add Crawleo tools to your LangChain app.
Start free