FOFA 文档中心

home 返回首页

统计聚合

根据当前的查询内容,生成全球统计信息,当前可统计每个字段的前5排名。该接口限制请求并发为 5秒/次。

http://fofa.icu/api/v1/search/stats
序号 参数 必填 类型 描述 示例
1 qbase64 string 经过base64编码后的查询语法,即输入的查询内容 aXA9IjEwMy4zNS4xNjguMzgi
2 fields string

附录2:统计聚合接口支持的字段,按照示例配置 fields=protocol,domain,port 即可。

序号 字段名 描述 权限
1 protocol 协议
2 domain 域名
3 port 端口
4 title http 标题
5 os 操作系统
6 server http server信息
7 country 国家、城市统计
8 asn asn编号
9 org asn组织
10 asset_type 资产类型
11 fid fid 统计
12 icp icp备案信息

返回结果字段:

功能名 描述 支持字段说明
distinct 唯一计数 支持字段: server, icp, domain, title, fid
aggs 聚合信息 通用

FOFA API支持cURL、Python、Java、Go语言的请求,以cURL为例:

curl -X GET "http://fofa.icu/api/v1/search/stats?fields=title&qbase64=dGl0bGU9IueZvuW6piI%3D&key=your_key"

​ 响应示例:

{
  "error": false, // 是否出现错误
  "consumed_fpoint": 0, // 实际F点
  "required_fpoints": 0, // 应付F点
  "size": 4277422, // 查询总数量
  "distinct": {
    "ip": 32933,
    "title": 82280
  },
  "aggs": {
    "title": [
        {
            "count": 76234,
            "name": "网站未备案或已被封禁——百度智能云云主机管家服务"
        },
        {
            "count": 50220,
            "name": "百度一下, 你就知道"
        },
        {
            "count": 39532,
            "name": "百度热榜"
        },
        {
            "count": 37177,
            "name": "百度 H5 - 真正免费的 H5 页面制作平台"
        },
        {
            "count": 33986,
            "name": "百度SEO"
        }
    ]
  },
  "lastupdatetime": "2022-05-23 15:00:00"
}
arrow_upward