scalar

Built by scalar

Beautiful, interactive API docs and a modern API client from your OpenAPI file.

Developer tools

What it does

Scalar turns an OpenAPI document into gorgeous, interactive API reference documentation that developers actually enjoy reading. Every endpoint can be tried right on the page with a built-in client.

It also includes a standalone API client for testing and debugging, and drops into the frameworks you already use.

Highlights

  • API reference generated from OpenAPI and Swagger
  • Built-in "try it" request client
  • Standalone offline-first API client
  • Integrations for many server frameworks
  • Themes and custom styling

Who it's for

API teams who want documentation that is as polished as their product.

from the project's repository

Show the full readme from GitHub

CI Contributors GitHub License Twitter Discord

Interactive API Reference from OpenAPI/Swagger

└ Renders OpenAPI/Swagger documents └ Comes with an API testing tool └ Doesn't look like 2011 └ Generates code examples for many languages & frameworks └ Integrates with your favorite framework └ Try Demo

An offline-first API Client built for OpenAPI

└ Free and open-source └ First-class OpenAPI/Swagger support └ Integrates with dozens of API Frameworks (Elysia, Hono, FastAPI, etc) └ Syncs with your favorite server framework (Watch Mode) └ Has environment variables, dynamic parameters and everything └ Try It in the Browser └ Download (Windows, MacOS, Linux)

Trusted by:

Quickstart

Set up with your coding agent

Copy this prompt into your coding agent from your project:

Set up Scalar API Reference in this project.

Inspect the project’s framework, package manager, routing, and existing
OpenAPI setup. Choose the appropriate framework integration from
https://scalar.com/products/api-references and install it using this
project’s conventions.

If no framework integration exists, render a route using the HTML/JS guide:
https://scalar.com/products/api-references/integrations/html-js
Also ask whether I want to request a framework integration here:
https://github.com/scalar/scalar/discussions/new?category=ideas

Serve the API reference at /scalar, or use an existing documentation route,
and connect it to the project’s OpenAPI document or generated endpoint.
If no OpenAPI document exists, ask me which source to use or whether
we need to add OpenAPI generation.

Use these guides for configuration and theming:
https://scalar.com/products/api-references/configuration
https://scalar.com/products/api-references/themes

Implement the setup, verify that the page loads and displays the API
documentation, and tell me how to run it locally and where to find it.
Set up with HTML

All you need is a single HTML file. Load the ESM build from our CDN, with no build step required:

<!doctype html>
<html>
  <head>
    <title>Scalar API Reference</title>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1" />
  </head>

  <body>
    <div id="app"></div>

    <script type="module">
      import { createApiReference } from 'https://cdn.jsdelivr.net/npm/@scalar/api-reference/esm.js'

      createApiReference('#app', {
        // The URL of the OpenAPI document
        url: 'https://registry.scalar.com/@scalar/apis/galaxy?format=json',
        // Avoid CORS issues
        proxyUrl: 'https://proxy.scalar.com',
      })
    </script>
  </body>
</html>

Need a Custom Header? Check out this example: https://codepen.io/scalarorg/pen/VwOXqam

And there's an ever-growing list of plugins and integrations:

Integrations

Built-in Support

The following frameworks have chosen Scalar API Reference as their default OpenAPI documentation UI, recognizing its developer-friendly features and modern design:

Managed Hosting

We're offering a free and paid managed hosting on the edge, too:

  • Write your API documentation and publish API references (free)
  • YOUR_NAME_HERE.apidocumentation.com subdomain and SSL (free)
  • GitHub Sync
  • Write free-form documentation
  • Collaborate with your team
  • Use any domain

Ready? Create your Scalar Account

Documentation

TopicDescription
ConfigurationThe universal configuration object
ThemesPredefined themes, layouts & styling
OpenAPIOpenAPI specification extensions
MarkdownSupported Markdown syntax
PluginsExtend the functionality

Projects

ProjectDescription
Scalar API ReferenceSelf-hosted API Reference
Scalar API ClientPostman alternative
Agent ScalarChat with your API
Scalar RegistryManage OpenAPI documents
Scalar DocsHosted documentation
Scalar Docs StarterStarter template for Scalar Docs
Scalar SDKsSDK generation
Scalar CLICommand-line interface
Scalar Mock ServerMock APIs from OpenAPI documents
Scalar GalaxyOur OpenAPI Example
Scalar EditorOpenAPI Online Editor
Scalar OpenAPI ParserParse OpenAPI documents
Scalar OpenAPI to MarkdownOpenAPI > Markdown/HTML
Scalar OpenAPI UpgraderUpgrade OpenAPI documents
Scalar Void ServerHTTP Request Mirror

Community

We are API nerds. You too? Let's chat on Discord: https://discord.gg/scalar

Contributions

Contributions are welcome! Read the CONTRIBUTING guide.

Top Contributors (Last Month)

Top Contributors (All Time)