Skip to main content

OpenAPI Detection API

developer
GET/v1/domain/openapi

Discovers OpenAPI (Swagger) specifications AND GraphQL introspection endpoints on a domain. Parses both JSON and YAML specs, extracts endpoint paths with their HTTP methods, and probes common GraphQL paths to surface schema metadata.

What It Does

Searches 22 common OpenAPI/Swagger locations, including /.well-known/openapi.json. Extracts paths and methods from JSON specifications and a limited subset of conventional YAML layouts; this is not a full YAML parser. Probes five common GraphQL paths with an introspection query. A blocked or failed probe does not prove that introspection is disabled or that no API exists. Returned paths are capped at 20; inspect pathsTruncated.

Why It's Useful

Locate publicly discoverable API descriptions for integration research and authorized exposure reviews. Discovery is bounded to common paths and does not inventory every API on a domain.

Use Cases

Penetration Tester

API Security Assessment

Discover API documentation to understand attack surface.

Review the discovered specification paths as one input to authorized API 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

NameLocationTypeRequiredDescription
domainquerystringRequiredThe domain to search for OpenAPI specsExample: api.example.com

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

FieldTypeDescription
domainstringThe queried domain
detectedbooleanWhether an OpenAPI/Swagger spec was found
specUrlstring|nullDiscovered specification URL, or null when none is found
versionstring|nullDetected specification version, or null when unavailable
infoobjectAPI metadata: title, description, version (populated for both JSON and YAML specs)
endpointCountnumberNumber of endpoint paths defined
pathsarrayDiscovered endpoint paths, each with the HTTP methods supported: { path: string, methods: string[] } — replaces the previous string[] shape so attack-surface mapping has methods inline
pathsTruncatedbooleanWhether the paths array was truncated (max 20)
serversarrayAPI server URLs
graphqlobjectGraphQL probe result: { detected, endpoint, queryType, mutationTypeCount, typeCount, introspectionDisabled }. `introspectionDisabled` is a probe interpretation; a blocked response alone does not establish the full endpoint configuration.
recommendationsarrayAPI documentation improvement suggestions

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the developer plan or higher; see plans and usage limits.

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

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/domain/openapi?domain=api.example.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full OpenAPI Detection guide

Learn the concepts, choose a practical workflow, and interpret the observations from OpenAPI Detection before acting on them. Run supported checks via MCP or through REST.

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.

    OpenAPI Detection API Reference | EdgeDNS