-
Notifications
You must be signed in to change notification settings - Fork 7
Document RFC 9727 API catalog discovery endpoint #5291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| --- | ||
| title: API catalog discovery | ||
| description: Fern docs sites expose a standards-based API catalog endpoint so AI agents, MCP clients, and API catalog crawlers can discover your APIs automatically. | ||
| --- | ||
|
|
||
| Fern Docs sites implement [RFC 9727](https://www.rfc-editor.org/rfc/rfc9727) to let AI agents, MCP clients, and API catalog crawlers discover your APIs without scraping HTML. The catalog is generated from your visible [API Reference](/learn/docs/api-references/overview) navigation and advertised on every page via a [`Link`](https://www.rfc-editor.org/rfc/rfc8288) response header — no configuration required. References hidden via `hidden: true` (or with all endpoints hidden) are excluded. | ||
|
|
||
| Your API catalog is available at `your-documentation-site.com/.well-known/api-catalog`. For example, this site's catalog is at [buildwithfern.com/learn/.well-known/api-catalog](https://buildwithfern.com/learn/.well-known/api-catalog): | ||
|
|
||
| ```bash | ||
| curl -s https://buildwithfern.com/learn/.well-known/api-catalog | jq . | ||
| ``` | ||
|
|
||
| For sites with a basepath like `/docs`, the catalog lives under that basepath (e.g. `https://example.com/docs/.well-known/api-catalog`). | ||
|
|
||
| ## Response format | ||
|
|
||
| The endpoint returns a [Linkset document](https://www.rfc-editor.org/rfc/rfc9264) listing each visible API. Each entry contains: | ||
|
|
||
| - **`anchor`** — the URL of the human-readable API Reference page | ||
| - **`service-desc`** — the machine-readable [OpenAPI spec](/learn/docs/developer-tools/openapi-spec) | ||
| - **`service-doc`** — the same reference page as the anchor | ||
|
|
||
| ```json title="Example response" | ||
| { | ||
| "linkset": [ | ||
| { | ||
| "anchor": "https://example.docs.com/api-reference", | ||
| "service-desc": [ | ||
| { | ||
| "href": "https://example.docs.com/openapi.yaml?api=abc123", | ||
| "type": "application/yaml" | ||
| } | ||
| ], | ||
| "service-doc": [ | ||
| { | ||
| "href": "https://example.docs.com/api-reference", | ||
| "type": "text/html" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| tags: ["ai"] | ||
| --- | ||
|
|
||
| ## API catalog discovery | ||
|
|
||
| AI agents, MCP clients, and API catalog crawlers can now discover your APIs automatically. Every Fern Docs site exposes a standards-based ([RFC 9727](https://www.rfc-editor.org/rfc/rfc9727)) `/.well-known/api-catalog` endpoint generated from your visible API Reference navigation. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📝 [vale] reported by reviewdog 🐶 |
||
|
|
||
| <Button intent="none" outlined rightIcon="arrow-right" href="/learn/docs/ai-features/api-catalog">Read the docs</Button> | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 [vale] reported by reviewdog 🐶
[FernStyles.Acronyms] 'RFC' has no definition.