Standard addresses Recommended
List your APIs in one file
List your public APIs and machine-readable files at /.well-known/api-catalog, as an RFC 9727 linkset (a JSON list of links).
How to do it
Serve it as application/linkset+json with the RFC 9727 profile, anchored at the catalog's own URL. Link each API with item, and its description with service-desc. Answer a HEAD request with a Link header naming the catalog.
Example
HTTP/1.1 200 OK
Content-Type: application/linkset+json; profile="https://www.rfc-editor.org/info/rfc9727"
Link: </.well-known/api-catalog>; rel="api-catalog"
{
"linkset": [
{
"anchor": "https://example.com/.well-known/api-catalog",
"item": [{ "href": "https://example.com/api/v1" }],
"describedby": [{ "href": "https://example.com/llms.txt", "type": "text/markdown" }]
},
{
"anchor": "https://example.com/api/v1",
"service-desc": [{ "href": "https://example.com/api/v1/openapi.json", "type": "application/json" }],
"service-doc": [{ "href": "https://example.com/docs/api", "type": "text/html" }]
}
]
}
How to check
curl -sI on the catalog shows application/linkset+json and the api-catalog link. Every URL listed in it answers 200.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers website playbook: https://agentwranglers.se/playbook/website/standard-addresses/api-catalog.