Selector Agent API
Microservice to repair CSS selectors using Claude AI
Admin Panel
Core Endpoints
| Method |
Endpoint |
Description |
| POST |
/repair |
Start selector repair with Claude AI |
| GET |
/job/:jobId |
Get job status (polling) |
| GET |
/stream/:jobId |
Live updates via Server-Sent Events |
| POST |
/test-parsing |
Test selectors without Claude |
Profile Endpoints
| Method |
Endpoint |
Description |
| GET |
/profiles |
Get all test profiles |
| GET |
/profiles/:id |
Get single profile by ID |
| POST |
/profiles |
Create new profile |
| PUT |
/profiles/:id |
Update profile |
| DELETE |
/profiles/:id |
Delete profile |
Utility Endpoints
| Method |
Endpoint |
Description |
| GET |
/load-example |
Load test data from files |
| GET |
/health |
Health check |
POST /repair Body
{
"parserObject": [...],
"htmlString": "<html>...",
"url": "https://...",
"containerSelector": "main", // optional
"maxIterations": 3, // optional, 1-10
"model": "opus", // optional
"customInstructions": "", // optional
"expectedValues": { // optional - helps Claude find selectors
"name": "Max Mustermann",
"title": "Developer",
"location": "Berlin",
"avatar": "https://..."
}
}
Profile Structure
{
"id": "linkedin-max",
"platform": "linkedin",
"url": "https://www.linkedin.com/in/...",
"expectedValues": {
"name": "Max Mustermann",
"title": "Developer",
"location": "Berlin",
"avatar": ""
}
}