81trust / 100

Openapi Extract

by OpenAPI endpoint extractor in Search & web

x402 APIPassing, checked 3 h ago

Flatten an OpenAPI 3.x or Swagger 2.x spec into a structured list of callable endpoints - one row per operation with method, path, operationId, summary, tags, parameters (name / in / required / type), JSON-body flag, and documented response codes. Includes per-method and per-tag counts so an agent can pick what to call next without parsing the full spec. Output is sorted by path then method for stable, agent-friendly grouping. Pure CPU - deterministic, no network, no $ref dereferencing.

POST https://agent402.tools/api/openapi-extract

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
183 ms typical, 183 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/openapi-extract" \
  -H "content-type: application/json" \
  -d '{"spec":{"openapi":"3.0.0","paths":{"/users":{"get":{"operationId":"listUsers","parameters":[{"in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"ok"},"400":{"description":"bad"}},"summary":"List users","tags":["users"]}},"/users/{id}":{"delete":{"operationId":"deleteUser","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"gone"}},"summary":"Delete user","tags":["users"]}}}}}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fopenapi-extract
const res = await pay("https://agent402.tools/api/openapi-extract", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"spec":{"openapi":"3.0.0","paths":{"/users":{"get":{"operationId":"listUsers","parameters":[{"in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"ok"},"400":{"description":"bad"}},"summary":"List users","tags":["users"]}},"/users/{id}":{"delete":{"operationId":"deleteUser","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"gone"}},"summary":"Delete user","tags":["users"]}}}}}),
});
console.log(await res.json());

Example input

{
  "spec": {
    "openapi": "3.0.0",
    "paths": {
      "/users": {
        "get": {
          "operationId": "listUsers",
          "parameters": [
            {
              "in": "query",
              "name": "limit",
              "required": false,
              "schema": {
                "type": "integer"
              }
            }
          ],
          "responses": {
            "200": {
              "description": "ok"
            },
            "400": {
              "description": "bad"
            }
          },
          "summary": "List users",
          "tags": [
            "users"
          ]
        }
      },
      "/users/{id}": {
        "delete": {
          "operationId": "deleteUser",
          "parameters": [
            {
              "in": "path",
              "name": "id",
              "required": true,
              "schema": {
                "type": "string"
              }
            }
          ],
          "responses": {
            "204": {
              "description": "gone"
            }
          },
          "summary": "Delete user",
          "tags": [
            "users"
          ]
        }
      }
    }
  }
}

Example output

{
  "endpoints": [
    {
      "hasJsonBody": false,
      "method": "GET",
      "operationId": "listUsers",
      "params": [
        {
          "in": "query",
          "name": "limit",
          "required": false,
          "type": "integer"
        }
      ],
      "path": "/users",
      "responses": [
        "200",
        "400"
      ],
      "summary": "List users",
      "tags": [
        "users"
      ]
    },
    {
      "hasJsonBody": false,
      "method": "DELETE",
      "operationId": "deleteUser",
      "params": [
        {
          "in": "path",
          "name": "id",
          "required": true,
          "type": "string"
        }
      ],
      "path": "/users/{id}",
      "responses": [
        "204"
      ],
      "summary": "Delete user",
      "tags": [
        "users"
      ]
    }
  ],
  "stats": {
    "byMethod": {
      "DELETE": 1,
      "GET": 1
    },
    "byTag": {
      "users": 2
    },
    "total": 2
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402183 ms$0.001