← Back to directory

API & Docs

Everything registry.directory knows is published at stable, machine-readable URLs. No API key, no account. If you are an agent (or building one), these five surfaces are the whole contract:

Component views as Markdown

Append .md to any item page URL to get the component as a single Markdown document — metadata, dependencies, and full source. The canonical endpoint is /api/markdown/{owner}/{repo}/{slug}.

Submitting a registry

One HTTP POST to /api/submit — no account, no fork, no PR. If you use an AI agent, this prompt is enough:

"submit my registry to registry.directory"

The agent will find the contract in openapi.json and how-to-submit.md. Every submission is audited before listing: your registry.json and several items are fetched and must resolve with real content.

For the shadcn CLI

/r/registry.json serves the whole catalog in the shadcn registry format, with search and pagination. It exists for the shadcn CLI and MCP server, not as a general-purpose API — the surfaces above are the contract for everything else.