For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
预约演示登录免费开始
  • 入门
    • 概览
    • 工作原理
    • 快速开始
    • 项目结构
    • Customer showcase
    • 变更日志
  • 配置
    • 概览
    • 站点级设置
    • 页面级设置
  • 编写内容
    • Markdown 基础
    • Markdown 中的富媒体
    • Fern 编辑器
    • 可复用代码片段
  • AI 功能
    • 概览
    • Fern Writer
    • AI 生成的示例
    • Markdown 访问
      • 概览
      • Agent 指令
      • 智能体指令
      • 分析与集成
    • MCP 服务器
    • API 目录发现
  • Public API
    • GETJWT from Fern API key
    • GETAlgolia search credentials
    • GETCurrent user information
  • Fern Writer API
    • GETGet Fern Writer Install Link
Checking status...
SOC2Soc 2 Type II
© 2026 Fern • Birch Solutions, Inc., a Postman company

Documentation

SDKsDocsAsk FernCLI Reference

API Definitions

OpenAPIAsyncAPIOpenRPCgRPC

Resources

BlogSupportPricing

Company

Brand KitPrivacy PolicyTerms of Service
LogoLogo
预约演示登录免费开始
在本页
  • 响应格式
AI 功能

API 目录发现

||以 Markdown 格式查看|
此页面是否有帮助?
在仪表板中编辑
上一个

MCP 服务器

下一个

概述

Fern 文档站点实现了 RFC 9727,让 AI 代理、MCP 客户端和 API 目录爬虫无需抓取 HTML 即可发现您的 API。该目录会根据可见的 API 参考 导航自动生成,并通过每个页面的 Link 响应头公布——无需任何配置。通过 hidden: true 隐藏的引用(或所有端点都被隐藏的引用)会被排除在外。

您的 API 目录位于 your-documentation-site.com/.well-known/api-catalog。例如,本站的目录位于 buildwithfern.com/learn/.well-known/api-catalog:

$curl -s https://buildwithfern.com/learn/.well-known/api-catalog | jq .

对于带有 /docs 等基础路径的站点,目录会位于该基础路径下(例如 https://example.com/docs/.well-known/api-catalog)。

响应格式

该端点会返回一个列出每个可见 API 的 Linkset 文档。每条记录包含:

  • anchor — 人类可读的 API 参考页面 URL
  • service-desc — 机器可读的 OpenAPI 规范
  • service-doc — 与 anchor 相同的参考页面
响应示例
1{
2 "linkset": [
3 {
4 "anchor": "https://example.docs.com/api-reference",
5 "service-desc": [
6 {
7 "href": "https://example.docs.com/openapi.yaml?api=abc123",
8 "type": "application/yaml"
9 }
10 ],
11 "service-doc": [
12 {
13 "href": "https://example.docs.com/api-reference",
14 "type": "text/html"
15 }
16 ]
17 }
18 ]
19}