SwaggerHub Registry API
swaggerhub · Developer Tools
# Overview Use SwaggerHub Registry API to access, manage, and update the following resources in SwaggerHub, bypassing the web interface: * APIs * Domains * Integrations * Projects * Templates SwaggerHub also provides the [User Management API](https://app.swaggerhub.com/apis-docs/swagger-hub/user-management-api/) to get information about organizations and manage organization members. # Base URL Use the following base URL for SwaggerHub SaaS: http(s)://api.swaggerhub.com **N
Authentication
Sample Requests
Retrieve a list of currently defined APIs, domains, and templates in APIs.json format
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/specs?page=0&sort=NAME&limit=10&order=ASC&owner=example&query=test&state=ALL&specType=ANY&visibility=ANY"
import requests
params = {
"page": "0",
"sort": "NAME",
"limit": "10",
"order": "ASC",
"owner": "example",
"query": "test",
"state": "ALL",
"specType": "ANY",
"visibility": "ANY"
}
response = requests.get(
"https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/specs",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/specs');
url.searchParams.set('page', '0');
url.searchParams.set('sort', 'NAME');
url.searchParams.set('limit', '10');
url.searchParams.set('order', 'ASC');
url.searchParams.set('owner', 'example');
url.searchParams.set('query', 'test');
url.searchParams.set('state', 'ALL');
url.searchParams.set('specType', 'ANY');
url.searchParams.set('visibility', 'ANY');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/specs")
q := baseURL.Query()
q.Set("page", "0")
q.Set("sort", "NAME")
q.Set("limit", "10")
q.Set("order", "ASC")
q.Set("owner", "example")
q.Set("query", "test")
q.Set("state", "ALL")
q.Set("specType", "ANY")
q.Set("visibility", "ANY")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/specs")
uri.query = URI.encode_www_form({
"page" => "0",
"sort" => "NAME",
"limit" => "10",
"order" => "ASC",
"owner" => "example",
"query" => "test",
"state" => "ALL",
"specType" => "ANY",
"visibility" => "ANY"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/specs?" . http_build_query([
"page" => "0",
"sort" => "NAME",
"limit" => "10",
"order" => "ASC",
"owner" => "example",
"query" => "test",
"state" => "ALL",
"specType" => "ANY",
"visibility" => "ANY"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Retrieve a list of templates for an owner
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/templates?owner=example"
import requests
params = {
"owner": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/templates",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/templates');
url.searchParams.set('owner', 'example');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/templates")
q := baseURL.Query()
q.Set("owner", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/templates")
uri.query = URI.encode_www_form({
"owner" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/templates?" . http_build_query([
"owner" => "example"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));This is a convenience alias for `GET /specs?specType=API`.
Hover any highlighted part to learn what it does
curl -X GET "https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/apis?page=0&sort=NAME&limit=10&order=ASC&query=test&state=ALL"
import requests
params = {
"page": "0",
"sort": "NAME",
"limit": "10",
"order": "ASC",
"query": "test",
"state": "ALL"
}
response = requests.get(
"https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/apis",
params=params,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/apis');
url.searchParams.set('page', '0');
url.searchParams.set('sort', 'NAME');
url.searchParams.set('limit', '10');
url.searchParams.set('order', 'ASC');
url.searchParams.set('query', 'test');
url.searchParams.set('state', 'ALL');
const response = await fetch(url);
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/apis")
q := baseURL.Query()
q.Set("page", "0")
q.Set("sort", "NAME")
q.Set("limit", "10")
q.Set("order", "ASC")
q.Set("query", "test")
q.Set("state", "ALL")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/apis")
uri.query = URI.encode_www_form({
"page" => "0",
"sort" => "NAME",
"limit" => "10",
"order" => "ASC",
"query" => "test",
"state" => "ALL"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/swaggerhub.com/1.0.66/apis?" . http_build_query([
"page" => "0",
"sort" => "NAME",
"limit" => "10",
"order" => "ASC",
"query" => "test",
"state" => "ALL"
]);
$opts = ["http" => [
"method" => "GET",
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with SwaggerHub Registry API?
SwaggerHub Registry API is a Developer Tools API. Developers commonly use developer tools APIs for:
- automating code review and quality checks
- integrating CI/CD pipelines and build systems
- managing feature flags and A/B tests
- monitoring errors and application performance
- generating and validating test data
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. SwaggerHub Registry API is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?