
Installation
Install the package using pip:Features
- AI-Powered Extraction: Advanced web scraping using artificial intelligence
- Flexible Clients: Both synchronous and asynchronous support
- Type Safety: Structured output with Pydantic schemas
- Production Ready: Detailed logging and automatic retries
- Developer Friendly: Comprehensive error handling
Quick Start
Initialize the client with your API key:You can also set the
SGAI_API_KEY
environment variable and initialize the client without parameters: client = Client()
Services
SmartScraper
Extract specific information from any webpage using AI:Basic Schema Example
Basic Schema Example
Define a simple schema for basic data extraction:
Advanced Schema Example
Advanced Schema Example
Define a complex schema for nested data structures:
SearchScraper
Search and extract information from multiple web sources using AI:Basic Schema Example
Basic Schema Example
Define a simple schema for structured search results:
Advanced Schema Example
Advanced Schema Example
Define a complex schema for comprehensive market research:
Markdownify
Convert any webpage into clean, formatted markdown:Async Support
All endpoints support asynchronous operations:Feedback
Help us improve by submitting feedback programmatically:Support
License
License
This project is licensed under the MIT License. See the LICENSE file for details.