API Documentation
REST API for extracting structured data from any website with built-in anti-bot bypass and proxy management.
Overview
The Uneralon API provides programmatic access to web parsing infrastructure. Extract data from any website without managing proxies, browsers, or anti-bot systems.
Quick Start
Authentication
All API requests require an API key. Include it in the Authorization header:
curl -X POST "https://api.uneralon.com/v1/extract" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "selectors": {"title": "h1"}}'
Base URL
https://api.uneralon.com/v1
Core Endpoints
Extract Data
Extract structured data from a URL:
POST /extract
Request Body:
{
"url": "https://example.com/product/123",
"selectors": {
"title": "h1.product-title",
"price": ".price-value",
"description": ".product-desc"
},
"render_js": true,
"proxy_type": "residential",
"country": "US"
}
Response:
{
"success": true,
"data": {
"title": "Product Name",
"price": "$99.99",
"description": "Product description..."
},
"metadata": {
"url": "https://example.com/product/123",
"status_code": 200,
"response_time_ms": 1250,
"proxy_used": "residential",
"country": "US"
}
}
Batch Extract
Extract data from multiple URLs:
POST /batch/extract
Request Body:
{
"urls": [
"https://example.com/product/1",
"https://example.com/product/2",
"https://example.com/product/3"
],
"selectors": {
"title": "h1",
"price": ".price"
},
"concurrency": 10
}
Screenshot
Capture a screenshot of a webpage:
POST /screenshot
Request Body:
{
"url": "https://example.com",
"full_page": true,
"format": "png",
"width": 1920,
"height": 1080
}
Raw HTML
Get the raw HTML of a webpage:
POST /html
Configuration Options
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | required | Target URL to extract |
selectors | object | required | CSS selectors for extraction |
render_js | boolean | false | Enable JavaScript rendering |
proxy_type | string | "auto" | residential, datacenter, mobile |
country | string | "auto" | ISO country code for geo-targeting |
timeout | integer | 30000 | Request timeout in milliseconds |
wait_for | string | null | CSS selector to wait for |
retry_count | integer | 3 | Number of retry attempts |
Selectors
Basic Selectors
{
"selectors": {
"title": "h1",
"paragraphs": "p",
"links": "a::attr(href)"
}
}
List Extraction
{
"selectors": {
"products": {
"selector": ".product-card",
"type": "list",
"fields": {
"name": ".product-name",
"price": ".product-price",
"image": "img::attr(src)"
}
}
}
}
Rate Limits
| Plan | Requests/Hour | Concurrent |
|---|---|---|
| Starter | 1,000 | 10 |
| Growth | 10,000 | 50 |
| Scale | 100,000 | 200 |
| Enterprise | Custom | Custom |
Rate limit headers in responses:
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9999
X-RateLimit-Reset: 1642234567
Error Handling
All errors follow a consistent format:
{
"success": false,
"error": {
"code": "EXTRACTION_FAILED",
"message": "Could not extract data from the target URL",
"details": {
"status_code": 403,
"reason": "Access denied by target site"
}
}
}
Error Codes
| Code | HTTP | Description |
|---|---|---|
INVALID_REQUEST | 400 | Invalid request parameters |
UNAUTHORIZED | 401 | Invalid or missing API key |
RATE_LIMITED | 429 | Rate limit exceeded |
EXTRACTION_FAILED | 502 | Could not extract from target |
TIMEOUT | 504 | Request timed out |
SDKs
Python
pip install uneralon
import uneralon
client = uneralon.Client(api_key="YOUR_API_KEY")
result = client.extract(
url="https://example.com",
selectors={"title": "h1"}
)
print(result.data)
Node.js
npm install @uneralon/sdk
import { Uneralon } from '@uneralon/sdk';
const client = new Uneralon({ apiKey: 'YOUR_API_KEY' });
const result = await client.extract({
url: 'https://example.com',
selectors: { title: 'h1' }
});
console.log(result.data);
Webhooks
For async extraction, configure a webhook:
{
"url": "https://example.com",
"selectors": {"title": "h1"},
"webhook_url": "https://your-server.com/webhook",
"webhook_headers": {
"Authorization": "Bearer your-token"
}
}
Support
- Documentation: docs.uneralon.com
- Status: status.uneralon.com
- Email: info@unrealon.com
- Discord: discord.gg/uneralon
Next Steps
- Getting Started - Quick start guide
- SDKs - Language-specific libraries
- Tutorials - Step-by-step guides