Integrate Anyparser's powerful content extraction capabilities with LangChain for enhanced AI workflows. This integration package enables seamless use of Anyparser's document processing and data extraction features within your LangChain applications, making it easier than ever to build sophisticated AI pipelines.
pip install anyparser-langchain
Before running the examples, make sure to set your Anyparser API credentials as environment variables:
export ANYPARSER_API_KEY="your-api-key"
export ANYPARSER_API_URL="https://anyparserapi.com"
This examples
directory contains examples demonstrating different ways to use the Anyparser LangChain integration.
python examples/01_single_file_json.py
python examples/02_single_file_markdown.py
python examples/03_multiple_files_json.py
python examples/04_multiple_files_markdown.py
python examples/05_load_folder.py
python examples/06_ocr_markdown.py
python examples/07_ocr_json.py
python examples/08_crawler.py
01_single_file_json.py
: Process a single file with JSON output02_single_file_markdown.py
: Process a single file with markdown output
03_multiple_files_json.py
: Process multiple files with JSON output04_multiple_files_markdown.py
: Process multiple files with markdown output05_load_folder.py
: Load and process all files from a folder (max 5 files)
06_ocr_markdown.py
: Process images/scans with OCR (markdown output)07_ocr_json.py
: Process images/scans with OCR (JSON output)
08_crawler_basic.py
: Basic web crawling with essential settings
- Different output formats (markdown, JSON)
- Multiple file handling
- Folder processing
- Metadata handling
- Basic crawling with depth and scope control
- Advanced URL and content filtering
- Crawling strategies (BFS, LIFO)
- Rate limiting and robots.txt respect
- All examples use async/await for better performance
- Error handling is included in all examples
- Each example includes detailed comments explaining the options used
- OCR examples support multiple languages
- Crawler examples demonstrate various filtering and control options
- Different output formats (markdown, JSON)
- OCR capabilities with language support
- OCR performance presets
- Image extraction
- Table extraction
- Metadata handling
- Error handling
- Async/await usage
Apache-2.0