Online Text Detection API

API Address

https://as.dun.163yun.com/v3/text/check

API Description

The API synchronizes return the results of the real-time anti-spam detection of the Neteasetm content security service, according to the published content, publisher, ip, device id and other information, and the product can perform preliminary filtering on the data according to the result. The API returns the result status in the following three categories:

  • UnPass: Indicates that the content is illegal, and the product can delete and hide the data.
  • Suspect: The content is suspected to be illegal,and the offline detection module of content Content Moderation service needs to be further confirmed. The confirmation result needs to be periodically called by the product offline text detection result acquisition. The product can be suspected. Do special strategy processing, such as invisibly.
  • Pass: Indicates that the real-time anti-spam engine of Content Moderation service is not recognized text as illegal content, and the product can be directly released for this type of data and published successfully. The offline detection module of Content Moderation service will further analyze and process the data, and the analysis result needs to be obtained by the product itself periodically offline text detection result acquisition.

Text Restrictions

A single request less than 5000 characters, the field length exceeds 5000 characters will intercept the first 5000 characters for detection and storage;

Request Parameters

The public parameters have been omitted. See Public Request Parametersfor details. Other parameters are as follow

Parameter NameTypeRequiredMaximum LengthDescription
dataIdStringY128The unique identifier of the data, which can be located according to the value. If there is any objection to the data result, you can send the value to the account manager.
contentStringY2^24-1User publishing content, it is recommended to filter JSON, emoticons, HTML tags, UBB tags, etc. in the content, only pass plain text, to reduce the probability of misjudgment. Please note that in order to check the effect and performance, if the field is longer than 5000 characters, the first 5000 characters will be intercepted for detection and storage.
dataTypeNumberN4Subdata type, with EasyShield content security service agreement
ipStringN32User IP Address
accountStringN128User unique identifier, null if no login required
deviceTypeNumberN4User Device Type, 1:web, 2:wap, 3:android, 4:iphone, 5:ipad, 6:pc, 7:wp
deviceIdStringN128User Equipment id
CallbackStringN2^16-1Data callback parameters, the caller design according to the business situation, when calling the text offline result acquisition API, the API will return the field as it is, see offline text detection result acquisition ](/help/documents/150426005789659136). As the data processing identifier, the field should be designed to uniquely locate the data structure of the request, such as detecting the user's nickname, the dataId can be set to the user ID (user ID), the user modifies multiple times, because the dataId may be consistent on different requesting data, but the callback parameter can be designed to locate the data structure of the request. For example, the callback field is designed to be json, including the dataId and the timestamp of the request. Of course, if you do not want to distinguish, you can directly set the callback to dataId
publishTimeNumberN13Publish time, UNIX timestamp (millisecond value)
callbackUrlStringN256The manual audit results are notified back to the customer's URL. The timeout time of the data interface of the active callback is set to 2s. In order to ensure the smooth reception of data, the performance of the receiving interface needs to be stable and idempotent

Response Results

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

Result Data Structure

Parameter NameTypeDescription
actionNumberTest results, 0: Pass, 1: Suspect, 2: UnPass
taskIdStringThis request data identifier, you can query the latest results of the data according to the identifier
labelsjson 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
hintjson 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 result is unpass, the output example is as follows:

{
    "code": 200,
    "msg": "ok",
    "result": {
        "taskId": "079560a6c9f34783bdce47e168510038",
        "action": 2,
        "labels": [
            {
                "label": 100,
                "level": 2,
                "details": {
                    "hint": [
                        "xxx","ooo"
                    ]
                }
            }
        ]
    }
}

When the result is pass, the output example is as follows:

{
    "code": 200,
    "msg": "ok",
    "result": {
        "taskId": "079560a6c9f34783bdce47e168510038",
        "action": 0,
        "labels": []
    }
}
Online Chat Tel:95163223