Skip to main content

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

ParameterTypeDefaultDescription
urlstringrequiredTarget URL to extract
selectorsobjectrequiredCSS selectors for extraction
render_jsbooleanfalseEnable JavaScript rendering
proxy_typestring"auto"residential, datacenter, mobile
countrystring"auto"ISO country code for geo-targeting
timeoutinteger30000Request timeout in milliseconds
wait_forstringnullCSS selector to wait for
retry_countinteger3Number 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

PlanRequests/HourConcurrent
Starter1,00010
Growth10,00050
Scale100,000200
EnterpriseCustomCustom

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

CodeHTTPDescription
INVALID_REQUEST400Invalid request parameters
UNAUTHORIZED401Invalid or missing API key
RATE_LIMITED429Rate limit exceeded
EXTRACTION_FAILED502Could not extract from target
TIMEOUT504Request 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

Next Steps