Quick Start
Get started with this integration in just a few steps.
Installation
bash
pip install crawl4ai
Basic Usage
python
from crawl4ai import AsyncWebCrawler
async def main():
async with AsyncWebCrawler() as crawler:
result = await crawler.arun(
url="https://example.com",
# Your configuration here
)
print(result.markdown)
if __name__ == "__main__":
import asyncio
asyncio.run(main())
Advanced Configuration
Customize the crawler with these advanced options:
🚀 Performance
Optimize crawling speed with parallel processing and caching strategies.
🔒 Authentication
Handle login forms, cookies, and session management automatically.
🎯 Extraction
Use CSS selectors, XPath, or AI-powered content extraction.
🔄 Proxy Support
Rotate proxies and bypass rate limiting with built-in proxy management.
Integration Example
python
from crawl4ai import AsyncWebCrawler
from crawl4ai.extraction_strategy import LLMExtractionStrategy
async def extract_with_llm():
async with AsyncWebCrawler() as crawler:
result = await crawler.arun(
url="https://example.com",
extraction_strategy=LLMExtractionStrategy(
provider="openai",
api_key="your-api-key",
instruction="Extract product information"
),
bypass_cache=True
)
return result.extracted_content
# Run the extraction
data = await extract_with_llm()
print(data)
💡 Pro Tip
Use the bypass_cache=True parameter when you need fresh data, or set cache_mode="write" to update the cache with new content.
Documentation
Complete documentation and API reference.
Examples
Real-world examples and use cases.
Support
📧 Contact
contact@example.com
🐛 Report Issues
Found a bug? Report it on GitHub Issues.
💬 Community
Join our Discord for help and discussions.