FOFA 文档中心

home 返回首页

连续翻页接口

当针对同一搜索语句进行大规模数据获取时,为了避免使用页码翻页导致数据错位的问题,推出连续翻页接口,可以持续获取所有数据,支持失败重试,无需担心数据错位。

http://fofa.icu/api/v1/search/next
序号 参数 必填 类型 描述 示列
1 qbase64 string 经过base64编码后的查询语法,即输入的查询内容 aXA9IjEwMy4zNS4xNjguMzgi
2 fields string 可选字段,默认host,ip,port,详见附录1 host,ip,port
3 page int 是否翻页,默认为第一页,按照更新时间排序 1
4 size int 每页查询数量,默认为100条,最大支持10,000条/页 100
5 full boolean 默认搜索一年内的数据,指定为true即可搜索全部数据 false
6 r_type string 可以指定返回json格式的数据 json

附录1:查询接口支持的字段,按照示例配置 fields=ip,host,port 即可。

序号 字段名 描述
1 ip IP地址
2 port 端口
3 protocol 协议名
4 country 国家代码
5 country_name 国家名
6 region 区域
7 city 城市
8 longitude 地理位置 经度
9 latitude 地理位置 纬度
10 asn ASN编号
11 org ASN组织
12 host 主机名
13 domain 域名
14 os 操作系统
15 server 网站Server
16 icp ICP备案号
17 title 网站标题
18 jarm JARM指纹
19 header 网站Header
20 banner 协议Banner
21 cert 证书
22 base_protocol 基础协议,比如TCP/UDP
23 link 资产的URL链接
24 cert.issuer.org 证书颁发者组织
25 cert.issuer.cn 证书颁发者通用名称
26 cert.subject.org 证书持有者组织
27 cert.subject.cn 证书持有者通用名称
28 tls.ja3s JA3S指纹信息
29 tls.version TLS协议版本
30 cert.sn 证书的序列号
31 cert.not_before 证书生效时间
32 cert.not_after 证书到期时间
33 cert.domain 证书中的根域名
34 header_hash HTTP/HTTPS响应信息计算的Hash值
35 banner_hash 协议响应信息的完整Hash值
36 banner_fid 协议响应信息架构的指纹值
37 product 产品名
38 product_category 产品分类
39 version 版本号
40 lastupdatetime FOFA最后更新时间
41 cname 域名CNAME

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

curl -X GET "https://fofa.icu/api/v1/search/next?qbase64=dGl0bGU9IueZvuW6piI%3D&size=10&key=your-key&next=id"

响应示例:

{
    "error": false, // 是否出现错误
    "size": 163681, // 查询总数量
    "page": 1, // 当前页码
    "consumed_fpoint": 0, // 实际F点
    "required_fpoints": 0, // 应付F点
    "mode": "extended",
    "next": "yzWlGs8GPJwdxnrDg3h4otdpNZMYF3un4FRjJnGbnkxdsV/rVXrvBw==", // 下一次查询的id,翻页需要带上
    "query": "title=\"百度\"", // 查询语句
    "results": [
      [
          "737.syyycp.net",
          "172.67.148.70",
          "80"
      ],
      [
          "https://8754570.huicigen.com",
          "172.67.208.21",
          "443"
      ],
      [
          "https://41.syyycp.net",
          "104.21.29.12",
          "443"
      ],
      [
          "9677757.syyycp.net",
          "104.21.29.12",
          "80"
      ],
      [
          "https://512lbbbv.qimiduo.com",
          "104.21.50.195",
          "443"
      ],
      [
          "https://583217806.huifengqing.com",
          "104.21.40.29",
          "443"
      ],
      [
          "https://447ziput.qimiduo.com",
          "104.21.50.195",
          "443"
      ],
      [
          "https://971061.yhitzz.com",
          "104.21.72.192",
          "443"
      ],
      [
          "https://58450830.qimiduo.com",
          "104.21.50.195",
          "443"
      ],
      [
          "https://53551.yhitzz.com",
          "104.21.72.192",
          "443"
      ]
    ]
  }
arrow_upward