The URL of the API definiton is displayed in the top bar of Swagger UI – in your example it's

/v2/api-docs?group=full-petstore-api

So the full URL appears to be

http://localhost:8080/v2/api-docs?group=full-petstore-api

In newer versions of Swagger UI, the link to the API definition is often displayed below the API title, so you can right-click the link and Save As.


If your Swagger UI does not have a visible link to the API definition, view the page source and look for the url parameter, such as:

const ui = SwaggerUIBundle({
  url: "https://petstore.swagger.io/v2/swagger.json",     // <-------
  dom_id: '#swagger-ui',

If you don't see the url or if url is a code expression, open the browser dev tools, switch to the Network tab and disable caching. Then refresh the page and search for the API definition file (swagger.json, swagger.yaml, api-docs or similar) among HTTP requests. You can filter by XHR to narrow down the list.


Another way to find the actual url is to use the browser console and evaluate one of the following values, depending on your UI version:

  • Swagger UI 3.x and later:

    ui.getConfigs().url
    
  • Swagger UI 2.x:

    swaggerUi.api.url
    


Sometimes the OpenAPI definition may be embedded within a .js file – in this case take this file and strip out the extra parts.

Answer from Helen on Stack Overflow
🌐
Swagger
swagger.io › tools › swagger-ui › download
Download SwaggerUI | Swagger Open Source
Swagger UI is available for download in the GitHub repository, or can be generated for any new or existing OpenAPI-defined API in the integrated SwaggerHub platform. Learn more.
UI Visualize OpenAPI Specification definitions in an interactive UI.
Swagger UI allows development team to visualize and interact with the API’s resources without having any of the implementation logic in place. Learn more.
Swagger Open Source Ideal for individuals and small teams to design, build, and document APIs.
API developer tools for the OpenAPI Specification(OAS), enabling development across the entire API lifecycle, from design and documentation, to test and deployment. Join millions of other Swagger users today.
Editor API editor for designing APIs with the OpenAPI and AsyncAPI specifications.
Design, describe, & document your API on the first open source editor fully dedicated to OpenAPI-based APIs. Download it, try it in the cloud, or request a demo.
Codegen Generate server stubs and client SDKs from OpenAPI Specification definitions.
Codegen simplifies your build process by generating server stubs and client SDKs for any API defined with the OpenAPI specification. Download Codegen today.
🌐
Swagger
swagger.io › tools › swagger-editor › download
Download OpenAPI Editor | Swagger Open Source
Download and run Swagger's open source Editor. Use SwaggerHub to push Editor, UI, and Codegen tools to the cloud for an integrated approach to API design & documentation.
🌐
SourceForge
sourceforge.net › projects › swagger-ui.mirror
Swagger UI download | SourceForge.net
2 weeks ago - Download Swagger UI for free. HTML, JavaScript, and CSS assets that generate Swagger documentation. Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.
🌐
Swagger
swagger.io › tools › swagger-codegen › download
Download Swagger Codegen | Swagger
Swagger Codegen is an open source project that generates API client libraries, server stubs, and documentation automatically from an OpenAPI Specification. Get started.
🌐
Swagger
swagger.io › tools › swagger-editor
API Editor - Download or Try it in the Cloud
Design, describe, & document your API on the first open source editor fully dedicated to OpenAPI-based APIs. Download it, try it in the cloud, or request a demo.
🌐
Oracle
docs.oracle.com › en › cloud › paas › content-cloud › solutions › download-swagger-file-rest-api.html
Download the Swagger File for a REST API
September 26, 2023 - The Swagger file for each REST API is part of the published REST API document. You can download it from the left navigation tree.
🌐
SourceForge
sourceforge.net › projects › swagger-editor.mirror
Swagger Editor download | SourceForge.net
Download Swagger Editor for free. An editor designed for Swagger. Swagger Editor lets you edit Swagger API specifications in YAML inside your browser and to preview documentations in real time.
🌐
GitHub
github.com › swagger-api › swagger-ui
GitHub - swagger-api/swagger-ui: Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API. · GitHub
We strongly suggest that you use swagger-ui instead of swagger-ui-dist if you're building a single-page application, since swagger-ui-dist is significantly larger. If you are looking for plain ol' HTML/JS/CSS, download the latest release and copy the contents of the /dist folder to your server.
Starred by 28.8K users
Forked by 9.3K users
Languages   JavaScript 94.7% | SCSS 4.2%
Find elsewhere
🌐
Swagger
swagger.io › docs › open-source-tools › swagger-ui › usage › installation
Installation | Swagger Docs
The folder /dist includes all the HTML, CSS and JS files needed to run SwaggerUI on a static website or CMS, without requiring NPM. Download the latest release.
Top answer
1 of 12
224

The URL of the API definiton is displayed in the top bar of Swagger UI – in your example it's

/v2/api-docs?group=full-petstore-api

So the full URL appears to be

http://localhost:8080/v2/api-docs?group=full-petstore-api

In newer versions of Swagger UI, the link to the API definition is often displayed below the API title, so you can right-click the link and Save As.


If your Swagger UI does not have a visible link to the API definition, view the page source and look for the url parameter, such as:

const ui = SwaggerUIBundle({
  url: "https://petstore.swagger.io/v2/swagger.json",     // <-------
  dom_id: '#swagger-ui',

If you don't see the url or if url is a code expression, open the browser dev tools, switch to the Network tab and disable caching. Then refresh the page and search for the API definition file (swagger.json, swagger.yaml, api-docs or similar) among HTTP requests. You can filter by XHR to narrow down the list.


Another way to find the actual url is to use the browser console and evaluate one of the following values, depending on your UI version:

  • Swagger UI 3.x and later:

    ui.getConfigs().url
    
  • Swagger UI 2.x:

    swaggerUi.api.url
    


Sometimes the OpenAPI definition may be embedded within a .js file – in this case take this file and strip out the extra parts.

2 of 12
28

Though it's already been answered and it's the correct one, I thought I shall post the much detailed version of it.. Hope this helps,

  1. If you do have the swagger json file which you feed to the swagger UI, then to generate .yaml file just click on the below link copy-paste your json in the editor and download the yaml file. This is a straight forward method

link : https://editor.swagger.io/#

  1. Now the second way where you don't have any swagger json file then the following steps should help,

Open the swagger ui, inspect (Shift+Ctrl+i), refresh the page and you will get the tabs like below

Choose XHR or All tab under Network tab, check for the file api-doc?group=* and click subtab response. *Now copy the content of ap-doc?group.** file and use the same editor link to convert to yaml file

link : https://editor.swagger.io/#

🌐
Swagger
editor.swagger.io
SwaggerEditor
You need to enable JavaScript to run this app · 5.3.6
🌐
SourceForge
sourceforge.net › projects › swagger-2-0.mirror
Swagger 2.0 download | SourceForge.net
March 15, 2026 - Download Swagger 2.0 for free. Swagger 2.0 implementation for go. This package contains a golang implementation of Swagger 2.0 (aka OpenAPI 2.0), it knows how to serialize and deserialize swagger specifications.
🌐
GitHub
github.com › swagger-api › swagger-editor
GitHub - swagger-api/swagger-editor: Swagger Editor · GitHub
This project uses REUSE specification ... Bill Of materials is available in this repository dependency graph. Click on Export SBOM button to download ......
Starred by 9.4K users
Forked by 2.4K users
Languages   JavaScript 82.5% | TypeScript 13.3% | SCSS 3.7%
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
OpenAPI (Swagger) Editor - Visual Studio Marketplace
Extension for Visual Studio Code - OpenAPI creation, editing and preview, as well as static and dynamic API security testing. Identifies OWASP API vulnerabilities in both the design and implementation of the API
🌐
SourceForge
sourceforge.net › projects › swagger-codegen.mirror
Swagger Codegen download | SourceForge.net
February 4, 2026 - Download Swagger Codegen for free. Template-driven engine to generate documentation. Swagger-Codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger ...
🌐
Swagger
swagger.io › tools › swagger-ui
REST API Documentation Tool | Swagger UI
Swagger UI allows development team to visualize and interact with the API’s resources without having any of the implementation logic in place. Learn more.
🌐
Microsoft Learn
learn.microsoft.com › en-us › aspnet › core › tutorials › getting-started-with-swashbuckle
Get started with Swashbuckle and ASP.NET Core | Microsoft Learn
View or download sample code (how to download) There are three main components to Swashbuckle: Swashbuckle.AspNetCore.Swagger: a Swagger object model and middleware to expose SwaggerDocument objects as JSON endpoints. Swashbuckle.AspNetCore.SwaggerGen: a Swagger generator that builds SwaggerDocument objects directly from your routes, controllers, and models.
🌐
Swaggerhub
app.swaggerhub.com
Swagger Hub - Build AI-Ready APIs | Design, Test & Scale ...
Join thousands of developers who use SwaggerHub to build and design great APIs. Signup or login today.
🌐
Rackerlabs
rackerlabs.github.io › wadl2swagger › openstack.html
Sample Swagger files
Below is a list of WADL files and the equivalent Swagger files that were generated with wadl2swagger.
🌐
PyPI
pypi.org › project › swagger-ui-py
swagger-ui-py · PyPI
Details for the file swagger_ui_py-25.7.1-py3-none-any.whl. Download URL: swagger_ui_py-25.7.1-py3-none-any.whl
      » pip install swagger-ui-py
    
Published   Jul 01, 2025
Version   25.7.1