返回顶部
f

form2api表单转API

A web form reverse-engineering tool. Submit any login-required form once manually, and it automatically intercepts the real API requests, analyzes the structure, and generates reusable API documentation and call code — so you never have to fill out that form again. Triggers: reverse a form, find the API behind a form, intercept form requests, capture network requests, form to API, form2api, automate form submission, bulk submit form, generate API docs from form, what API does this form call, scr

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
180
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

form2api

Form2API

你只需要做:把表单URL发给我,然后手动提交一次表单。剩下的交给我。

功能说明:

  • - 在页面中注入网络拦截器,捕获表单提交时的真实API请求
  • 分析请求结构,标注哪些字段是用户输入、固定值还是自动生成
  • 生成包含curl和Python示例的完整API文档
  • 支持批量/自动化操作,无需手动填写表单

典型使用场景:

  • - 内部系统表单操作繁琐——希望通过脚本批量创建数据
  • 需要自动化工作流程但缺乏官方API文档
  • 想要了解表单底层实际调用了哪些API

触发方式:
将表单页面URL发给我,并说类似逆向这个表单/查找这个表单的API/我想自动化这个表单。



工作流程(Agent执行步骤)

第1步:注入拦截器

打开目标页面后,通过browser工具的evaluate操作注入拦截器脚本:

从以下路径读取脚本内容:
dir>/scripts/injectinterceptor.js

然后通过browser(action=act) evaluate执行,注入到页面中。

成功时返回{ status: injected }。如果已注入则返回already_active。

第2步:提示用户提交表单

告诉用户:

拦截器已就绪。请在浏览器中正常填写并提交表单,完成后告诉我。

第3步:读取捕获结果

用户提交后,运行evaluate读取捕获的请求:

javascript
JSON.stringify(window.capturedRequests)

将结果保存到/tmp/formapiraw.json。

第4步:分析请求

bash
python3 dir>/scripts/analyzerequests.py /tmp/formapiraw.json

输出候选API请求的排名列表。结构化结果保存到/tmp/formapianalysis.json。

第5步:提取Cookie

bash
COOKIE=$(python3 dir>/scripts/extractcookies.py )
echo $COOKIE

Cookie自动缓存到/tmp/formapicookies/,有效期1小时。重复调用会复用缓存。

第6步:生成API文档

基于分析结果,以references/output_template.md为参考,生成完整的API文档,包括:

  • - 端点信息(URL、方法、内容类型)
  • 请求参数表(用户输入/固定值/系统生成)
  • Cookie提取命令
  • curl和Python调用示例

脚本

脚本用途
scripts/injectinterceptor.js注入页面以拦截fetch/XHR
scripts/extractcookies.py
标准化的Cookie提取(带缓存) | | scripts/analyze_requests.py | 过滤和标注捕获的请求 |

注意事项

  • - 浏览器要求:目标页面必须在当前浏览器会话中已打开并登录
  • 拦截器生命周期:页面刷新后拦截器会被清除——需要时重新注入
  • 多次提交:window.capturedRequests会累积多次提交的数据;分析时会选择最相关的批次
  • Cookie过期:如果API返回401/403,使用--force标志重新提取
  • 输出格式参考:references/output_template.md

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 form2api-1776194102 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 form2api-1776194102 技能

通过命令行安装

skillhub install form2api-1776194102

下载

⬇ 下载 form2api v1.0.0(免费)

文件大小: 10.12 KB | 发布时间: 2026-4-17 14:52

v1.0.0 最新 2026-4-17 14:52
Initial release of form-to-api – a tool for reverse-engineering web forms into reusable APIs.

- Capture real API requests when a form is submitted, no manual analysis needed.
- Automatically identify which fields are user inputs and which are fixed.
- Generate a structured API document, including curl and Python usage examples.
- Supports cookie extraction and re-use, streamlining automation for authenticated forms.
- Simple workflow: just share the form URL and submit it once; everything else is automated.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部