- API key authentication
- Geotargeting (country/ZIP codes)
- Device type targeting (desktop/mobile)
- Custom headers support
- JavaScript rendering
- Screenshot capture
- Session management
- Proxy rotation (residential/datacenter)
- Async request processing
- Structured data extraction for platforms
- Cost control parameters
- Cached results
- Basic
POST /api/scrapeendpoint - URL + CSS selectors input
- Pool-based browser management
- Error handling with retry logic
- Status/metrics endpoints
- Authentication: No API key system
- Request Parameters: Only supports url and selectors
- Geotargeting: No country/location targeting
- Custom Headers: Not configurable via API
- Device Targeting: No mobile/desktop options
- Screenshots: No image capture capability
- Async Processing: All requests are synchronous
- Caching: No result caching system
- Session Management: No persistent sessions
- Cost Controls: No timeout/credit limits
Enhanced request body structure needed:
{
"url": "https://example.com",
"selectors": {...},
"options": {
"country_code": "US",
"device_type": "desktop",
"render": true,
"session_number": 123,
"custom_headers": {...},
"timeout": 30000,
"screenshot": false,
"format": "json"
}
}- Custom headers support
- Device type targeting
- JavaScript rendering control
- Screenshot capability
- Session management
- Geotargeting with proxies
- Async processing queue
- Result caching system
- CSS Selectors Only:
{"title": "h1", "price": ".price"} - Simple key-value mapping
- Limited to basic DOM element selection
- Why Important: Can navigate both forward/backward in DOM, select by text content
- Use Cases: Finding elements by text, complex DOM navigation, attribute-based selection
- Example:
//span[contains(text(), 'Price:')]/following-sibling::span
- Why Important: Many sites serve data via JSON APIs embedded in pages
- Use Cases: Extracting data from
<script>tags, API responses, structured data - Example:
$.products[*].price(for JSON arrays)
- Why Important: Pattern-based extraction for unstructured text
- Use Cases: Phone numbers, emails, specific text patterns
- Example:
/\$\d+\.\d{2}/g(for prices)
Most APIs support fallback strategies:
{
"price": {
"css": ".price",
"xpath": "//span[@class='price-value']",
"regex": "\\$\\d+\\.\\d{2}"
}
}Beyond text content:
hrefattributes from linkssrcfrom imagesdata-*attributes- All element attributes
- Template-based extraction (Octoparse): Pre-built selectors for popular sites
- Auto-detection (Octoparse): AI-suggested selectors
- JMESPath queries: Advanced JSON transformation
- Full page data extraction: No selectors needed, returns everything
Enhanced selector format:
{
"url": "https://example.com",
"selectors": {
"title": "h1", // Current: CSS only
"price": { // New: Multiple methods
"css": ".price",
"xpath": "//span[@class='price']",
"regex": "\\$\\d+\\.\\d{2}",
"attribute": "data-price"
},
"description": {
"jsonpath": "$.product.description", // For JSON data
"fallback": "meta[name='description']"
}
}
}- XPath support - Critical for complex selections
- Attribute extraction - Common use case
- Regex patterns - Text pattern matching
- JSONPath - For modern web apps with JSON data
- Multiple method fallbacks - Reliability improvement
Current CSS-only approach covers ~60% of use cases. Adding XPath alone would bring you to ~85% market coverage.