Skip to content

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

StatusMeaning
pendingTask just accepted; background hasn't yet decided whether to scan (CSV still uploading / input still parsing)
runningTB_SCAN workflow is in progress; partial results may already be retrievable
completedTB_SCAN finished successfully; the full result set is returned
skippedBackground proceeded straight to translate without scanning. Possible reasons: all content already in termbase / no unique content / created with scan_terms=false / prep-stage degradation
failedTask overall failed at a prerequisite step (e.g. xlsx_url download failure, CSV upload failure)

Endpoint

GET {BASE_URL}/api/open/v1/tasks/terms

POST is also accepted (parameters may be sent in the JSON body).

Authentication Headers

Identical to Create Translation Task:

HeaderValue
X-Loxily-AppKeyProject App Key
X-Loxily-TimestampUnix seconds (valid 5 minutes)
X-Loxily-SignMD5(timestamp + "" + appSecret) — GET has no body, so body is signed as empty string

Query Parameters

ParamTypeRequiredDefaultDescription
task_idstringYesThe task_id returned by the create endpoint
pagenumberNo1Page number, starting from 1
page_sizenumberNo100Page 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

FieldTypeDescription
task_idstringEchoed back
scan_statusstring"pending" / "running" / "completed" / "skipped" / "failed" — see detailed description above
page / page_size / totalnumberPagination info; total is the count of terms discovered in this scan
items[].idstringStable ID of this term entry (used as id in /tasks/terms/update / /tasks/terms/delete)
items[].termstringTerm extracted by AI from the content
items[].contentstringSource context containing the term
items[].source_languagestringSource language code
items[].categorystringAI-assigned category (Character / Location / Item / Attributes / Skill / ...)
items[].glossary_scorenumberTerm importance score 0–10 (higher = more worth adding to termbase)
items[].judgmentstringAI reasoning for the recommendation
items[].translation_sourcestringSource of the translation: ai / tm / manual
items[].translationsobjectTranslations per target language; keys are hyphen-form language codes (en, zh-cn, ja, ...); empty values omitted
items[].updated_atstringISO 8601 timestamp

Error codes

codeDescription
400Missing task_id / invalid signature headers
401Signature check failed or timestamp expired
403Task does not belong to this App Key
404task_id not found
500Internal 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:

  1. Call POST /api/open/v1/tasks/create
  2. On receiving term_scan.completed callback (or polling works too), call this endpoint once to retrieve all discovered terms
  3. Handle the terms according to your business needs — e.g. pending-review queue, auto-append to local termbase, surface them to human translators, etc.