POST /api/v1/process
Creates an analysis task and returns a task_id. Retrieve the result via the SSE stream.
Request
http
POST /api/v1/process
Authorization: Bearer YOUR_KEY
Content-Type: application/jsonjson
{
"own_page": "https://example.com/product",
"competitor_urls": [
"https://comp1.com/product",
"https://comp2.com/product"
],
"queries": ["buy product online", "best product 2026"],
"lang": "en",
"triplet_analysis": false,
"url_cookies": {}
}Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
own_page | string | ✅ | Your page URL |
competitor_urls | string[] | ✅ | Competitor URLs (1–20). 3–10 recommended |
queries | string[] | — | Target search queries (up to 5, up to 1,000 chars each). Used as semantic anchors for Umbrella Analysis |
lang | "ru" | "en" | — | Page language. Default "ru" |
triplet_analysis | boolean | — | Enable Knowledge Graph extraction. Default false |
url_cookies | object | — | Per-URL auth cookies: {"https://url": "session=abc"} |
Response
json
{
"task_id": "550e8400-e29b-41d4-a716-446655440000"
}| Field | Type | Description |
|---|---|---|
task_id | string (UUID) | Pass this to /process/status/{task_id} to stream the result |
Status Codes
| Code | Meaning |
|---|---|
200 | Task created |
400 | Validation error (too many URLs, empty fields) |
401 | Invalid API key |
429 | Too many concurrent tasks or rate limit exceeded |
422 | Invalid request body format |
Example — cURL
bash
curl -X POST https://unihra.ru/api/v1/process \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"own_page": "https://example.com/mattress",
"competitor_urls": [
"https://comp1.com/mattress",
"https://comp2.com/mattress",
"https://comp3.com/mattress"
],
"queries": ["buy mattress online", "best orthopedic mattress"],
"lang": "en"
}'json
{"task_id": "550e8400-e29b-41d4-a716-446655440000"}Extended Mode (Knowledge Graph)
bash
curl -X POST https://unihra.ru/api/v1/process \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"own_page": "https://example.com/product",
"competitor_urls": ["https://comp1.com", "https://comp2.com"],
"queries": ["target keyword"],
"lang": "en",
"triplet_analysis": true
}'Cost
Extended mode (triplet_analysis: true) costs 5 credits instead of 1. Check your balance first via GET /api/v1/key/limits.