Task Terms Query
Retrieve the new terms discovered during the Term Scan (TB_SCAN) stage of a given task. Response schema mirrors the console's "Term Scan Report" page.
When term scan runs
Term scan is the first step in the Create Translation Task pipeline: the server extracts all candidate terms from the task's content fields, filters out those already in the project termbase, and sends the remainder to the TB_SCAN workflow for classification + scoring.
The 5 scan_status values
| Status | Meaning |
|---|---|
pending | Task just accepted; background hasn't yet decided whether to scan (CSV still uploading / input still parsing) |
running | TB_SCAN workflow is in progress; partial results may already be retrievable |
completed | TB_SCAN finished successfully; the full result set is returned |
skipped | Background proceeded straight to translate without scanning. Possible reasons: all content already in termbase / no unique content / created with scan_terms=false / prep-stage degradation |
failed | Task overall failed at a prerequisite step (e.g. xlsx_url download failure, CSV upload failure) |
Endpoint
GET {BASE_URL}/api/open/v1/tasks/termsPOST is also accepted (parameters may be sent in the JSON body).
Authentication Headers
Identical to Create Translation Task:
| Header | Value |
|---|---|
X-Loxily-AppKey | Project App Key |
X-Loxily-Timestamp | Unix seconds (valid 5 minutes) |
X-Loxily-Sign | MD5(timestamp + "" + appSecret) — GET has no body, so body is signed as empty string |
Query Parameters
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
task_id | string | Yes | — | The task_id returned by the create endpoint |
page | number | No | 1 | Page number, starting from 1 |
page_size | number | No | 100 | Page size, max 500 |
Response
Success (HTTP 200):
json
{
"success": true,
"code": 0,
"msg": "ok",
"trace_id": "...",
"data": {
"task_id": "68a12cb7e1f9a88b4ea23c77",
"scan_status": "completed",
"page": 1,
"page_size": 100,
"total": 42,
"items": [
{
"id": "6626f0a32e8e5d24b6c9f1a2",
"term": "战斗力",
"content": "总战斗力的构成由其它战斗力按权重加和得出",
"source_language": "zh-cn",
"category": "Attributes",
"glossary_score": 4.0,
"judgment": "Extracted '战斗力' from content. Refers to a game stat, 'Combat Power', which likely requires consistent translation.",
"translation_source": "ai",
"translations": {
"en": "Combat Power",
"zh-cn": "Combat Power"
},
"updated_at": "2026-04-22T10:25:17.455Z"
}
]
}
}Field reference
| Field | Type | Description |
|---|---|---|
task_id | string | Echoed back |
scan_status | string | "pending" / "running" / "completed" / "skipped" / "failed" — see detailed description above |
page / page_size / total | number | Pagination info; total is the count of terms discovered in this scan |
items[].id | string | Stable ID of this term entry (used as id in /tasks/terms/update / /tasks/terms/delete) |
items[].term | string | Term extracted by AI from the content |
items[].content | string | Source context containing the term |
items[].source_language | string | Source language code |
items[].category | string | AI-assigned category (Character / Location / Item / Attributes / Skill / ...) |
items[].glossary_score | number | Term importance score 0–10 (higher = more worth adding to termbase) |
items[].judgment | string | AI reasoning for the recommendation |
items[].translation_source | string | Source of the translation: ai / tm / manual |
items[].translations | object | Translations per target language; keys are hyphen-form language codes (en, zh-cn, ja, ...); empty values omitted |
items[].updated_at | string | ISO 8601 timestamp |
Error codes
| code | Description |
|---|---|
| 400 | Missing task_id / invalid signature headers |
| 401 | Signature check failed or timestamp expired |
| 403 | Task does not belong to this App Key |
| 404 | task_id not found |
| 500 | Internal server error |
Examples
cURL
bash
APP_KEY="5685414646a54423c891d87194d87f3f"
APP_SECRET="<your App Secret>"
TASK_ID="68a12cb7e1f9a88b4ea23c77"
BASE_URL="https://api.loxily.com"
TIMESTAMP=$(date +%s)
# GET has no body; body is the empty string in signing
SIGN=$(printf '%s' "${TIMESTAMP}${APP_SECRET}" | md5)
curl -s "${BASE_URL}/api/open/v1/tasks/terms?task_id=${TASK_ID}&page=1&page_size=100" \
-H "X-Loxily-AppKey: ${APP_KEY}" \
-H "X-Loxily-Timestamp: ${TIMESTAMP}" \
-H "X-Loxily-Sign: ${SIGN}"Node.js
javascript
import crypto from 'crypto';
const timestamp = Math.floor(Date.now() / 1000).toString();
const body = ''; // GET has no body
const sign = crypto.createHash('md5')
.update(`${timestamp}${body}${process.env.LOXILY_APP_SECRET}`, 'utf8')
.digest('hex');
const qs = new URLSearchParams({ task_id: taskId, page: '1', page_size: '100' });
const resp = await fetch(
`${process.env.LOXILY_BASE_URL}/api/open/v1/tasks/terms?${qs}`,
{
headers: {
'X-Loxily-AppKey': process.env.LOXILY_APP_KEY,
'X-Loxily-Timestamp': timestamp,
'X-Loxily-Sign': sign,
},
},
);
const { data } = await resp.json();
console.log(`Found ${data.total} terms, status=${data.scan_status}`);
for (const item of data.items) {
console.log(`${item.term} (${item.category}, score ${item.glossary_score})`);
}Suggested Integration Flow
Recommended integration pattern:
- Call
POST /api/open/v1/tasks/create - On receiving
term_scan.completedcallback (or polling works too), call this endpoint once to retrieve all discovered terms - Handle the terms according to your business needs — e.g. pending-review queue, auto-append to local termbase, surface them to human translators, etc.