IP恶意网址查询
接口说明
该接口通过输入网站IP,来获取该IP所关联的所有恶意网址(关联:同一个ip的所有URL算是相关联),作为对此IP是否可以判别为恶意的一种佐证。接口返回该IP关联的URL地址列表,检测时间(检测url是否有风险的时间)等字段。可以通过URL、检测时间等字段,后续进一步获取该URL的网页内容等详细信息。用户可以通过添加sort字段指定输出顺序,从而确保多次请求的数据一致性。
推荐应用场景
一般用来针对某个IP要做风险评估的时候,通过获取它关联的恶意网址来佐证。
请求地址
https://api.f.360.cn/ips/std/internal/v2/malice_url
请求方法
POST
请求参数
| 参数名 | 类型 | 位置 | 是否必填 | 示例值 | 说明 |
|---|---|---|---|---|---|
| query | object | body | 是 | | 查询条件,所有请求参数的父级结构 |
| query.keywords | Array(object) | body | 是 | | 查询条件,所有请求参数的子级结构 |
| query.keywords.[0].field | string | body | 是 | ip | 查询条件的字段名,支持的字段有:ip |
| query.keywords.[0].value | string | body | 是 | 114.67.227.97 | 查询条件的字段值,为单个ip |
| query.keywords.[1].field | string | body | 否 | all | 可选条件,仅支持字段all。通过将all置为 true,可以获取更完整的信息(包含 URL、IP 和检查时间)。默认为false |
| query.keywords.[1].value | string | body | 否 | true | 可选条件的值,支持true或false。通过将all置为 true,可以获取更完整的信息(包含 URL、IP 和检查时间)。 |
| query.keywords.[2].field | string | body | 否 | sort | 可选条件,仅支持字段sort。用于指定有序输出。无sort时默认无序输出 |
| query.keywords.[2].value | string | body | 否 | asc | 可选条件的值,支持asc和desc。前者表示正序输出,后者表示倒序输出 |
响应参数
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| check_time | string | 2025-09-12 21:42:56 | 网址的检测时间 |
| code | string | 0 | 响应状态码 |
| data | Array | | 恶意网址记录 |
| ip | string | 104.21.30.198 | 网址IP |
| msg | string | ok | 响应状态信息 |
| status | number | 0 | 目前没有意义,只输出0 |
| url | string | https://www.cn-kuailian.org.cn/ | IP关联的网址 |
请求示例
支持cUrl、Python、Java、PHP、Go语言的请求,示例如下
#!/usr/bin/env bash
set -euo pipefail
APPID="" # apikey
SECRET="" # salt
URL="https://api.f.360.cn/ips/std/internal/v2/malice_url"
BODY='{"query":{"keywords":[{"field":"ip","value":"114.67.227.97"}]}}'
NONCE=$(printf '%08d' $((RANDOM % 100000000)))
TIMESTAMP=$(date +%s)
BODY_MD5=$(printf '%s' "$BODY" | openssl dgst -md5 -hex | awk '{print $NF}')
SIGNATURE=$(printf '%s' "${BODY_MD5}${APPID}${NONCE}${TIMESTAMP}${SECRET}" | openssl dgst -md5 -hex | awk '{print $NF}')
SIGNATURE=${SIGNATURE:16}
curl --location --request POST "$URL" \
--header "Content-Type: application/json" \
--header "X-360-Key: ${APPID}" \
--header "X-360-Nonce: ${NONCE}" \
--header "X-360-Timestamp: ${TIMESTAMP}" \
--header "X-360-Signature: ${SIGNATURE}" \
--data "${BODY}"# python3.6.8
# -*- coding:utf-8 -*—
import hashlib
import json
import random
import time
import requests
APPID = "" # apikey
SECRET = "" # salt
def make_headers(appid, secret, body):
headers = {}
headers["X-360-Key"] = appid
headers["X-360-Nonce"] = str(random.randint(0, 99999999)).zfill(8)
headers["X-360-Timestamp"] = str(int(time.time()))
s = (
hashlib.md5(body.encode("utf8")).hexdigest()
+ headers["X-360-Key"]
+ headers["X-360-Nonce"]
+ headers["X-360-Timestamp"]
+ secret
)
md5 = hashlib.md5(s.encode("utf8")).hexdigest()
headers["X-360-Signature"] = md5[16:]
headers["Content-Type"] = "application/json"
return headers
def do_post(url, body):
res = requests.post(
url,
data=json.dumps(params),
headers=make_headers(APPID, SECRET, json.dumps(body)),
)
print(res.text)
if __name__ == "__main__":
# 请求地址
url = "https://api.f.360.cn/ips/std/internal/v2/malice_url"
params = {"query": {"keywords": [{"field": "ip", "value": "114.67.227.97"}]}}
do_post(url, params)import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.concurrent.ThreadLocalRandom;
public class Demo {
static String md5(String input) throws Exception {
byte[] digest = MessageDigest.getInstance("MD5")
.digest(input.getBytes(StandardCharsets.UTF_8));
StringBuilder sb = new StringBuilder();
for (byte b : digest) {
sb.append(String.format("%02x", b & 0xff));
}
return sb.toString();
}
public static void main(String[] args) throws Exception {
String appid = ""; // apikey
String secret = ""; // salt
String url = "https://api.f.360.cn/ips/std/internal/v2/malice_url";
String body = "{\"query\":{\"keywords\":[{\"field\":\"ip\",\"value\":\"114.67.227.97\"}]}}";
String nonce = String.format("%08d", ThreadLocalRandom.current().nextInt(100000000));
String timestamp = String.valueOf(System.currentTimeMillis() / 1000);
String signature = md5(md5(body) + appid + nonce + timestamp + secret).substring(16);
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Content-Type", "application/json")
.header("X-360-Key", appid)
.header("X-360-Nonce", nonce)
.header("X-360-Timestamp", timestamp)
.header("X-360-Signature", signature)
.POST(HttpRequest.BodyPublishers.ofString(body, StandardCharsets.UTF_8))
.build();
HttpClient client = HttpClient.newHttpClient();
HttpResponse<String> response = client.send(
request, HttpResponse.BodyHandlers.ofString(StandardCharsets.UTF_8));
System.out.println(response.body());
}
}<?php
// apikey
$appid = "";
// salt
$secret = "";
$url = 'https://api.f.360.cn/ips/std/internal/v2/malice_url';
$body = json_encode(['query' => ['keywords' => [['field' => 'ip', 'value' => '114.67.227.97']]]], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
$nonce = str_pad((string) random_int(0, 99999999), 8, "0", STR_PAD_LEFT);
$timestamp = (string) time();
$signature = substr(md5(md5($body) . $appid . $nonce . $timestamp . $secret), 16);
$ch = curl_init($url);
$options = [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-360-Key: {$appid}",
"X-360-Nonce: {$nonce}",
"X-360-Timestamp: {$timestamp}",
"X-360-Signature: {$signature}",
],
];
$options[CURLOPT_POST] = true;
$options[CURLOPT_POSTFIELDS] = $body;
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if ($response === false) {
echo curl_error($ch), PHP_EOL;
} else {
echo $response, PHP_EOL;
}
curl_close($ch);package main
import (
"bytes"
"crypto/md5"
"encoding/hex"
"fmt"
"io"
"math/rand"
"net/http"
"time"
)
func md5Hex(s string) string {
sum := md5.Sum([]byte(s))
return hex.EncodeToString(sum[:])
}
func main() {
appid := "" // apikey
secret := "" // salt
url := "https://api.f.360.cn/ips/std/internal/v2/malice_url"
body := []byte(`{"query":{"keywords":[{"field":"ip","value":"114.67.227.97"}]}}`)
nonce := fmt.Sprintf("%08d", rand.Intn(100000000))
timestamp := fmt.Sprintf("%d", time.Now().Unix())
signature := md5Hex(md5Hex(string(body)) + appid + nonce + timestamp + secret)[16:]
req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-360-Key", appid)
req.Header.Set("X-360-Nonce", nonce)
req.Header.Set("X-360-Timestamp", timestamp)
req.Header.Set("X-360-Signature", signature)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(respBody))
}响应示例
业务正常响应
响应示例1:
{
"field": "ip",
"value": "104.21.30.198"
}响应示例1(对于请求示例1):
{
"_oid": 1,
"code": "0",
"data": [
"http://ntxldy718.tvijyf.cn",
"https://m.paimou.com",
"https://www.soshu66.com",
"http://m.soshu66.com"
],
"msg": "ok",
"status": 0
}响应示例2:
[
{
"field": "ip",
"value": "104.21.30.198"
},
{
"field": "all",
"value": "true"
}
]{
"_oid": 1,
"code": "0",
"data": [
{
"check_time": "2026-03-06 19:42:28",
"ip": "104.21.30.198",
"url": "https://www.halstock-village.co.uk/"
},
{
"check_time": "2026-03-06 20:15:50",
"ip": "104.21.30.198",
"url": "https://zhihang520.com/D17AV/D1795-168C.html"
},
{
"check_time": "2026-03-06 23:21:53",
"ip": "104.21.30.198",
"url": "https://m.soshu66.com/46_46323/7_5.html"
},
{
"check_time": "2026-03-06 21:28:17",
"ip": "104.21.30.198",
"url": "https://4df2a5.csmen128.cc/传送/"
}
],
"msg": "ok",
"status": 0
}业务异常响应
{
"code": "GC00101",
"msg": "param missing"
}