Skip to main content
Guides/Tech Stack

OpenAPI Detection: Understand and Use the Results

Find OpenAPI/Swagger specifications

EdgeDNS Team·Updated ·5 min read

OpenAPI specs: the machine-readable instruction manual for an API

OpenAPI is a standard format for describing REST APIs in machine-readable form. An OpenAPI document is a YAML or JSON file that lists every endpoint of an API, the parameters each one takes, the data types of the request and response bodies, the authentication scheme, and (often) human-readable descriptions of what each operation does. The standard was originally created by Swagger, Inc. in 2010, and was renamed to OpenAPI when the project was donated to the Linux Foundation in 2015. Today, OpenAPI is the universal way that REST APIs document themselves, and almost every major API published in the last five years has an OpenAPI spec available somewhere — sometimes at a well-known path like `/openapi.json`, sometimes linked from the docs, sometimes (unfortunately) hidden in private repositories.

You should care because finding a public OpenAPI spec for an API is the fastest possible way to integrate with it. With a spec in hand, you can auto-generate client libraries in any language, import the API into Postman or Insomnia for interactive exploration, validate request and response payloads automatically, and (with some tools) generate a working backend stub for testing. Without a spec, you are stuck reading documentation by hand, copying examples, and guessing about edge cases. For an integrator, a partner, a security researcher, or a competitor doing teardowns, an OpenAPI spec is a treasure.

The five things every OpenAPI discovery check looks at:

  • Well-known paths. `/openapi.json`, `/openapi.yaml`, `/swagger.json`, `/api-docs`, `/v3/api-docs` (Spring Boot), `/docs/openapi.json`.

  • HTML pages that link to specs. Swagger UI, Redoc, and Stoplight all generate documentation pages that link to the underlying spec.

  • Response headers. Some APIs include `Link: </openapi.json>; rel="service-desc"`.

  • Robots.txt and sitemap entries. Some APIs list their docs in their public discovery files.

  • Subdomains. `docs.example.com`, `api-docs.example.com`, `developer.example.com` are common locations.

Three questions an OpenAPI check answers:

  • Does this API have a public OpenAPI spec, and where is it?

  • For an integration project, can I auto-generate a client library instead of writing one by hand?

  • For competitive research, what is the full surface area of this API at a glance?

The cost of not finding the spec is hours of hand-coding what could be auto-generated. The fix is one round of well-known-path checks plus a quick scan of the API's documentation site. The OpenAPI specification itself lives at openapis.org and is free to use.

What EdgeDNS specifically returns. The detection probes 22 well-known OpenAPI paths AND, in parallel, 5 common GraphQL endpoints (`/graphql`, `/api/graphql`, `/v1/graphql`, `/v2/graphql`, `/query`) with an introspection query. Both JSON and YAML specs are parsed — including paths-with-methods (`GET /users`, `POST /users`, etc.) so attack-surface mapping has HTTP methods inline. For GraphQL, the response includes the query-type name, mutation presence, and total type count; an endpoint that returns 400/403 on introspection is treated as having introspection disabled — a positive security signal, not a failure.

The OpenAPI Detection endpoint, in plain language

Find OpenAPI/Swagger specifications

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

What is actually happening when you call it

Searches 22 common OpenAPI/Swagger locations, including /.well-known/openapi.json. Extracts paths and methods from JSON (JavaScript Object Notation) 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 (Application Programming Interface) exists. Returned paths are capped at 20; inspect pathsTruncated.

Why this specific tool matters

Choose a task: API Security Assessment. Discover API (Application Programming Interface) documentation to understand attack surface.

Run the OpenAPI Detection request below and retain the input and observed result. Before changing configuration, compare the relevant fields with the value or policy you expected. Use the OpenAPI Detection reference to check the field definitions and supported options.

Info:

Available on the developer plan. The technical details: `GET /v1/domain/openapi`.

When would I actually use this?

API Security Assessment

Discover API (Application Programming Interface) documentation to understand attack surface.

Use the finding: Review the discovered specification paths as one input to authorized API (Application Programming Interface) testing.

Integration Research

Find API (Application Programming Interface) documentation for third-party integration.

Use the finding: Quickly locate API (Application Programming Interface) specs without searching documentation sites.

Competitive Analysis

Analyze competitor API (Application Programming Interface) capabilities through their OpenAPI specs.

Use the finding: Understand competitor API (Application Programming Interface) features and structure.

The easiest way: just ask your AI assistant

Connect the MCP server. Just ask in plain English:

Use domain_openapi with domain=api.example.com. Show the returned findings, identify unavailable evidence, and explain a useful next check.

Confirm the tool and inputs in the client before accepting its summary. For OpenAPI Detection, use the response fields below to separate observations from recommendations.

Tip:

The dedicated MCP server is available on every plan. Individual tool access and request limits depend on your plan. Management categories and endpoints disabled for the tool catalog are not exposed through MCP.

The technical way: call it from code

This OpenAPI Detection request uses the example inputs from its API contract. Replace YOUR_API_KEY with a key on the developer plan or higher; adapt the target to your task.

bash
curl --request GET 'https://api.edgedns.dev/v1/domain/openapi?domain=api.example.com' \
  --header "Authorization: Bearer YOUR_API_KEY"

Prepare inputs for OpenAPI Detection

Start with the inputs below. Keep the same hostname, path, and options when comparing OpenAPI Detection observations. The API reference contains the complete parameter contract, optional settings, and access requirements.

FieldTypeRequired?What it meansExample

domain

string

Yes

The domain to search for OpenAPI specs

api.example.com

Interpret OpenAPI Detection findings

Read these fields alongside the full response from your OpenAPI Detection check. A missing value or failed lookup is different from a passing result. Keep returned errors and confidence or cache metadata when available; do not replace missing evidence with a successful default. See the complete response reference for additional fields.

FieldTypeWhat you'll see in it

domain

string

The queried domain

detected

boolean

Whether an OpenAPI/Swagger spec was found

specUrl

string|null

Discovered specification URL (web address), or null when none is found

Words you might be wondering about

API (Application Programming Interface) — A way for one program to ask another program for something — like a waiter taking your order to the kitchen.

HTTP (HyperText Transfer Protocol) — The language web browsers and websites use to talk to each other.

JSON (JavaScript Object Notation) — A lightweight format for sending data between programs. Looks like { "name": "example", "age": 5 }. Used by basically every modern web API.

Need Programmatic Access?

Automate domain intelligence with 100+ API endpoints and a free MCP server for AI integration.

OpenAPI Detection: Results Guide | EdgeDNS