@fillout/api

中文文档
1.5.0发布于 2025/05/05MITTypeScriptESM + CJS零依赖近 30 天下载 1.4万

Client for the Fillout API

原始使用文档
文档目录3 节
  1. Connecting to the API
  2. Get started with these examples
  3. Documentation

Fillout logo

Fillout API Client

TypeScript SDK for accessing forms and submissions 🚀



Connecting to the API

import { Fillout } from "@fillout/api"

const fillout = new Fillout(FILLOUT_API_KEY)

You can generate an API key for your organization at https://build.fillout.com/home/settings/developer. It should start with sk_prod_. Don't save secret keys in your code - use an environmental variable instead.

If you're on an Enterprise plan and you have Fillout submissions hosted in a different region, you'll need to use the region option, like so:

const fillout = new Fillout(FILLOUT_API_KEY, { region: "eu" })

The values currently available are us (default), eu and ca. Check the base URL in your developer settings.

Get started with these examples

Print a list of questions in a form:

const forms = await fillout.getForms()

const formName = "Fillout SDK"
const formId = forms.find((f) => f.name === formName)?.formId
if (!formId) throw new Error("Missing form")

const form = await fillout.getForm(formId)

console.log(`Questions available in ${formName}:

${form.questions.map((question) => `${question.name} (${question.type})`).join("\n")}`)

Get the ten most recent submissions of a form:

const submissions = await fillout.getSubmissions("foAdHjd1Duus", {
  includePreview: true,
  limit: 10,
  sort: "desc",
})

Documentation

To find out what you can do, take a look at our API documentation. This package also has TypeScript and JSDoc comments, so you should get some helpful hints in your editor :)

If you're looking to embed Fillout in a React project, try @fillout/react!

版本与发布记录

@fillout/api 共发布 9 个版本,首次发布于 2025/02/26;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.5.0latest2025/05/051.5 年前
1.4.02025/04/251.6 年前
1.3.02025/04/221.6 年前
1.2.32025/04/181.6 年前
1.2.22025/04/181.6 年前
1.2.12025/03/021.7 年前

关于 @fillout/api 的常见问题

@fillout/api 是什么?

Client for the Fillout API

如何安装 @fillout/api?

在项目目录运行 npm install @fillout/api,或使用 pnpm add / yarn add / bun add。

@fillout/api 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fillout/api 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@fillout/api 可以商用吗?

@fillout/api 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fillout/api 的下载量有多少?

根据 npm 官方下载统计,@fillout/api 在 2026/10/15 – 2026/11/13 这 30 天内被下载 14,327 次,日均约 478 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fillout/api 还在维护吗?

最新版本 1.5.0 发布于 2025/05/05(1.5 年前);至今共发布 9 个版本,其中过去 12 个月发布了 0 个;首次发布于 2025/02/26。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。