文档中心 API文档 查询Bot情报

查询Bot情报

更新时间:2023-02-03 10:55:09

适用产品

BotGuard爬虫管理

接口描述

查询Bot情报

推荐使用 Open API在线调试

Open API在线调试功能提供可视化界面在线调试API、支持生成代码示例、快速检索查看API文档等能力。前往调试

请求参数

Body 参数

参数名称描述
*domainString
域名

返回参数

Body 参数

参数名称描述
codeString
状态码,成功为“200”。
messageString
返回信息,成功为“Success”。
dataResult
返回数据。
edgebot_crawler_goodPgRows
公开类型Bot。
pg_rowsList
单条Bot记录。
nameString
Bot标识。
enableInteger
处理动作。 0:关闭 1:拦截 2:告警 3:放行
edgebot_user_agentPgRowsAgent
User-Agent情报。
nameString
Bot标识。
enableInteger
处理动作。 0:关闭 1:拦截 2:告警 3:放行
checkList
HTTP库。 Python;Python-requests;Python-urllib;PHP;Ruby;GO HttpClient;Guzzle Http Client;Libcurl;Apache ;HttpClient;Jakarta Commons HttpClient;Axios;Other
edgebot_bot_intelligencePgRows
IP情报。
pg_rowsList
单条Bot记录。
nameString
Bot标识。
enableInteger
处理动作。 0:关闭 1:拦截 2:告警 3:放行

错误码

错误代码(code)描述(message)HTTP状态码语义
22994001CUSTOMER_NOT_EXIST200客户不存在
22994000PARAM_ERROR_CODE200查询参数错误
22995000INTERNAL_ERROR_CODE200系统错误

示例

JSON
JSON
请求示例
复制代码 复制成功
#!/bin/bash
username="example_username"
apiKey="example_apiKey" 
date=`env LANG="en_US.UTF-8" date -u "+%a, %d %b %Y %H:%M:%S GMT"`
password=`echo -en "$date" | openssl dgst -sha1 -hmac $apiKey -binary | openssl enc -base64`
curl -i --url https://open.chinanetcenter.com/api/bot/domainConfig/get-crawler-good \
-X "POST"  \
-u "$username:$password"  \
-H "Date: $date"   \
-H "Accept: application/json"  \
-H "Content-Type: application/json" \
-d '{
        "domain": "test.com"
}'
返回示例
复制代码 复制成功
{
    "message": "Success", 
    "code": "200", 
    "data": {
        "edgebot_crawler_good": {
            "pg_rows": [
                {
                    "enable": "1", 
                    "name": "adsbot-google"
                }, 
                {
                    "enable": "0", 
                    "name": "google_pagespeedinsights"
                }, 
                {
                    "enable": "0", 
                    "name": "yahoo_mm"
                }, 
                {
                    "enable": "0", 
                    "name": "yandex_bot"
                }, 
                {
                    "enable": "0", 
                    "name": "yeti_bot"
                }, 
                {
                    "enable": "0", 
                    "name": "yisou_spider"
                }, 
                {
                    "enable": "0", 
                    "name": "youdao_bot"
                }, 
                {
                    "enable": "1", 
                    "name": "360Spider"
                }
            ]
        }, 
        "edgebot_bot_intelligence": {
            "pg_rows": [
                {
                    "enable": "2", 
                    "name": "bambenek_consulting_switch"
                }, 
                {
                    "enable": "2", 
                    "name": "bloomberg_switch"
                }, 
                {
                    "enable": "2", 
                    "name": "webzilla_switch"
                }, 
                {
                    "enable": "0", 
                    "name": "proxyip_switch"
                }
            ]
        }, 
        "edgebot_user_agent": {
            "pg_rows": [
                {
                    "enable": "2", 
                    "name": "http_version", 
                    "check": [
                        "Python", 
                        "Ruby", 
                        "GO HttpClient", 
                        "Libcurl", 
                        "Apache HttpClient", 
                        "Jakarta Commons HttpClient", 
                        "Axios", 
                        "Other", 
                        "Guzzle Http Client", 
                        "PHP", 
                        "Python-urllib"
                    ]
                }, 
                {
                    "enable": "2", 
                    "name": "low_version", 
                    "check": [
                        ""
                    ]
                }, 
                {
                    "enable": "0", 
                    "name": "scanner_version"
                }, 
                {
                    "enable": "2", 
                    "name": "wz_version", 
                    "check": [
                        ""
                    ]
                }
            ]
        }
    }
}
本篇文档内容对您是否有帮助?
有帮助
我要反馈
提交成功!非常感谢您的反馈,我们会继续努力做到更好!