Offline Text Result Acquisition API

API Address

https://as.dun.163yun.com/v3/text/callback/results

API Description

Online detection of suspected data in the API results will be performed offline and manually. The offline results of these data require the client to obtain periodically through the API. After getting the result of data processed, the next call will not return the offline data obtained before. The API limits the frequency of requests. If the request frequency is too fast, the server will refuse to process. It is recommended to obtain it once every 30 seconds.

Request parameter

The API parameters are consistent with the public request parameters. For details, see Public Request Parameters

Response Results

The response field is as follows, the common response field has been omitted, see Response General Fields:

Result array data structure

Parameter NameTypeDescription
actionNumberTest results, 0: Pass, 2: Not pass
taskIdStringThe data request identifier returned by the online API detection, which can query the latest result of the data according to the identifier
callbackStringThe callback field data passed by the product call online text detection.
labelsjjson arrayclassification information

Labels data structure

Parameter NameTypeDescription
labelNumberClassified information, 100: porn, 200: advertising, 400: prohibited, 500: political, 600: abuses, 700: irrigation
levelNumberClassification level, 1: Uncertain, 2: OK
detailsjson objectOther information

Details data structure

Parameter NameTypeDescription
hintjjson arrayclue information for locating the problematic part of the text, assisting with manual review

Request example

Java code

Python code

PHP code

C# code

js code

Response example

When the offline result is obtained, the output example is as follows:

{
    "code": 200,
    "msg": "ok",
    "result": [
        {
            "action": 2,
            "taskId": "a9840b389d2e483d9349cd62e9cda250",
            "callback": "ebfcad1c-dba1-490c-b4de-e784c2691768",
            "labels": [
                {
            "label": 600,
                    "level": 2
                    "details": {
                        "hint": [
                            "xxx"
                        ]
                    }
                }
            ]
        },
        {
            "action": 0,
            "taskId": "11140b389d2e483d9349cd62e9cdas11",
            "callback": "asdffcad1c-dba1-490c-b4de-e784c269112",
            "labels": []
        },
    ]
}

When there is no latest offline result to be obtained, the output example is as follows:

{
    "code": 200,
    "msg": "ok",
    "result":[]
}
Online Chat Tel:95163223