AI Service API
The AI Service dispatches scraping work for a project's keyword.
Base path: /api/ai-service
All documented endpoints require:
Authorization: Bearer <access_token>
Scrape project keywords
POST /api/ai-service/scrap-project-keywords
Send a request to scrape a project's keyword across social-media platforms.
Authentication: Bearer token
Request body: application/json
| Field | Type | Required | Description |
|---|---|---|---|
keyword_id | string | Yes | Keyword ID; the current app flow uses project data.id, but Swagger does not formally define that mapping |
{
"keyword_id": "project_or_keyword_id"
}
Success response — 200 OK:
{
"success": true,
"result": {}
}
Declared responses:
| Status | Meaning |
|---|---|
200 | Scraping request succeeded |
400 | Invalid request body or missing parameters |
500 | Processing failed |
curl -X POST \
"$SOCIOVITE_API_URL/api/ai-service/scrap-project-keywords" \
-H 'accept: application/json' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{
"keyword_id": "project_or_keyword_id"
}'
Error shape
AI Service errors use:
{
"success": false,
"error": "Invalid request",
"message": "keyword_id is required"
}
The endpoint is protected, although its response table does not explicitly declare a 401 response.