Skip to main content

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

FieldTypeRequiredDescription
keyword_idstringYesKeyword 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:

StatusMeaning
200Scraping request succeeded
400Invalid request body or missing parameters
500Processing 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.