Skip to content
Fourohtwo

agent402.tools/api/openapi-search

Search operations in an OpenAPI 3.x or Swagger 2.x spec against a free-text query. Tokenizes the query (lowercase, alphanumeric runs), scores each operation by which fields the tokens match - operationId +3, path +3, tags +2, summary +2, description +1 per matched token - and returns ranked results.

SolanaBaseAnswering
POSThttps://agent402.tools/api/openapi-search

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agent402.tools/api/openapi-search", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"spec":{"paths":{"/posts":{"get":{"tags":["posts"],"summary":"List posts","responses":{"200":{}},"operationId":"listPosts"}},"/users/{id}":{"get":{"tags":["users"],"summary":"Get a user","responses":{"200":{}},"operationId":"getUser"}},"/users/{id}/avatar":{"put":{"tags":["users"],"summary":"Upload user avatar","responses":{"200":{}},"operationId":"uploadUserAvatar"}}}},"query":"user avatar"}),
});
console.log(await res.json());

Example input

{
  "spec": {
    "paths": {
      "/posts": {
        "get": {
          "tags": [
            "posts"
          ],
          "summary": "List posts",
          "responses": {
            "200": {}
          },
          "operationId": "listPosts"
        }
      },
      "/users/{id}": {
        "get": {
          "tags": [
            "users"
          ],
          "summary": "Get a user",
          "responses": {
            "200": {}
          },
          "operationId": "getUser"
        }
      },
      "/users/{id}/avatar": {
        "put": {
          "tags": [
            "users"
          ],
          "summary": "Upload user avatar",
          "responses": {
            "200": {}
          },
          "operationId": "uploadUserAvatar"
        }
      }
    }
  },
  "query": "user avatar"
}