WeChat Safety Check#
Checks a domain's status in WeChat-related risk data sources, including normal, blocked, and access warnings.| Request URL#
Request URL: https://tools.gname.com/v1/query| Request Method#
Request body format: multipart/form-data.| Request Parameters#
| Field | Parameter | Type | Required | Description |
|---|
| APPID | appid | String | Yes | API application ID. See Common Parameters. |
| Timestamp | timestamp | Integer | Yes | Current Unix timestamp in seconds. The difference from server time must not exceed 300 seconds. |
| Signature | sign | String | Yes | Request signature. See Signature Method. |
| Query Type | code | String | Yes | Always pass weixin. |
| Domain | ym | String | Yes | Domain to query, such as baidu.com, without a protocol, port, or path. |
appid, timestamp, code, ym, and any additional fields actually sent must be included in the signature calculation. Exclude sign itself.| Response Envelope#
| Field | Parameter | Type | Description |
|---|
| Status Code | code | Integer | Request processing status. 1 indicates success; other values indicate failure. |
| Message | msg | String | Message describing the request processing result. |
| Response Data | data | Object / Array | An object containing the query result on success. On failure, this may be an error details object or an empty array; not all fields are guaranteed to be present. |
| Response Data#
On a successful query, the following fields are in data.| Field | Parameter | Type | Description |
|---|
| APPID | appid | String | API application ID used for this request. |
| Query Type | code | String | Query type for this request. The value is weixin. |
| Domain | ym | String | Domain queried in this request. |
| Points Charged | cost_points | Integer | Query package points actually charged for this query, based on the current price of the query type. |
| Query Record ID | rw_id | String | Unique ID for this query record, used for tracing and reconciliation. |
| Query Result | result | Object | WeChat Safety Check result. |
The following fields are in data.result.| Field | Parameter | Type | Description |
|---|
| Request Status | err_code | String / Integer | Request status. 200 indicates a successful HTTP request. You must also check the inner query status, data.code. |
| Request Message | err_msg | String | Request message, such as ok. This alone does not establish business success. |
| Query Response | data | Object | Query status and the specific business result. |
| Result Updated At | gxsj | String | Time when the query result was updated, in YYYY-MM-DD HH:mm:ss format. |
The following fields are in data.result.data.| Field | Parameter | Type | Description |
|---|
| Query Status | code | String / Integer | 1 indicates query success; other values indicate failure. Read the business result for indexing, SEO weight, or risk status. |
| Query Message | msg | String | Result message. It may be empty or omitted. Determine success from the status code. |
| WeChat Safety Status | data | String | 1 means normal; 2 means blocked; 3 means a redirect warning; 4 means access by long-pressing to copy. Returned as a string and separate from the query success status, code. |
Risk status may change as the data source is updated. Interpret query success and business risk status separately.| Example Response#
{
"code": 1,
"msg": "查询成功",
"data": {
"appid": "2026102222460250146194",
"code": "weixin",
"ym": "baidu.com",
"cost_points": 1,
"rw_id": "20261028160407_d1f9c4c98f0c616d5ac6a22b769dbc02",
"result": {
"err_code": "200",
"err_msg": "ok",
"data": {
"code": "1",
"msg": "正常",
"data": "1"
}
}
}
}
Modified at 2026-10-29 13:15:01