scalar /scalar

Scalar is an open-source API platform:                                       🌐 Modern REST API Client                                        📖 Beautiful API References                                        ✨ 1st-Class OpenAPI/Swagger Support

★ 16,410⑂ 973👁 34⑃ 8,558● 1,767▤ 146
TypeScriptMITCreated 2023-08-16scalar.com
下载:Release 2026-11-12release-2026-11-12-7e9d6bd ↓release-2026-11-12-7e9d6bd2026-11-12
+6
日增长
16,410
stars
973
forks
34
watchers
8,558
prs
1,767
issues
146
releases

README

Scalar
	
		
			
				
				
				
			
	 	
		
			
				
				
				
			
		
	



	
	


 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

Install the scalar-api-reference skill to give your coding agent guidance for framework integration, configuration, and troubleshooting:

bash
npx skills add scalar/scalar --skill scalar-api-reference


Copy this prompt into your coding agent from your project:

text
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:

html


  
    Scalar API Reference
    
    
  

  
    

    
      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',
      })
    
  



 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

- HTML/JS API (works everywhere)
- .NET ASP.NET Core
- Aspire
- AdonisJS
- Astro
- Django Ninja
- Django
- Docker
- Docusaurus

Top issues

Discussions

Latest release

Release 2026-11-12 release-2026-11-12-7e9d6bd 2026-11-12
Releases
 @scalar/[email protected]

 Minor Changes

- 10967: fix: parse YAML documents that merge shared anchors into many operations

  Since yaml 2.9.1, merge keys (<<: anchor) count toward the alias limit, so large API Gateway exports failed with "Excessive alias count indicates a resource exhaustion attack". The limit is now 100,000 and shared through YAML_MAX_ALIAS_COUNT from @scalar/helpers.

 Patch Changes

- 10979: Preserve question marks inside query values when merging a URL and path.
 @scalar/[email protected]

 Patch Changes

- 10977: Use the API title for JSON and YAML do

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON