Skip to main content

OpenAPI Detection

developer
GET/v1/domain/openapi

Discovers OpenAPI (Swagger) specification files on a domain. Checks common paths for API documentation that reveals endpoint structure and functionality.

What It Does

Searches for OpenAPI/Swagger files at common locations (/swagger.json, /openapi.json, /api-docs, /swagger-ui/, etc.). Supports detection of OpenAPI 3.1.0 and earlier versions. Validates discovered files and extracts API metadata including version, endpoints, paths, and server URLs.

Why It's Useful

OpenAPI specifications reveal the complete API structure including endpoints, parameters, and authentication. This is valuable for API integration, security assessment, and competitive analysis.

Use Cases

Penetration Tester

API Security Assessment

Discover API documentation to understand attack surface.

Map all API endpoints for comprehensive security testing.

Developer

Integration Research

Find API documentation for third-party integration.

Quickly locate API specs without searching documentation sites.

Product Manager

Competitive Analysis

Analyze competitor API capabilities through their OpenAPI specs.

Understand competitor API features and structure.

Parameters

NameTypeRequiredDescription
domainstringRequiredThe domain to search for OpenAPI specsExample: api.example.com

Response Fields

FieldTypeDescription
domainstringThe queried domain
detectedbooleanWhether OpenAPI spec was found
specUrlstringURL of discovered specification
versionstringOpenAPI/Swagger version
infoobjectAPI metadata (title, description, version)
endpointCountnumberNumber of endpoints defined
pathsarrayDiscovered API paths
pathsTruncatedbooleanWhether the paths array was truncated (max 20)
serversarrayAPI server URLs
recommendationsarrayAPI documentation improvement suggestions

Code Examples

cURL
curl "https://api.edgedns.dev/v1/domain/openapi" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "domain=api.example.com"
JavaScript
const response = await fetch(
  'https://api.edgedns.dev/v1/domain/openapi?domain=api.example.com',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    'https://api.edgedns.dev/v1/domain/openapi',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
    'domain': 'api.example.com'
    }
)

data = response.json()
print(data)

Read the full OpenAPI Detection guide

Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.

Read the guide →

Related Endpoints

External References

Learn more about the standards and protocols behind this endpoint.

Try This Endpoint

Test the OpenAPI Detection endpoint live in the playground.