{
  "openapi": "3.1.0",
  "info": {
    "title": "Lordevo Agent Directory API",
    "version": "1.0.0",
    "description": "Directory of services AI agents can discover, pay for (x402 USDC on Base, API keys) and call. Read-only, no auth, rate-limited per IP (60/min).",
    "contact": {
      "url": "https://lordevo.com/agents"
    }
  },
  "servers": [
    {
      "url": "https://lordevo.com"
    }
  ],
  "paths": {
    "/api/v1/search": {
      "get": {
        "operationId": "searchServices",
        "summary": "Search listings",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "What you need, in plain words (max 200 chars).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Category id from /api/v1/categories.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payment",
            "in": "query",
            "required": false,
            "description": "x402, apikey or free.",
            "schema": {
              "type": "string",
              "enum": [
                "x402",
                "apikey",
                "free"
              ]
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "description": "http, mcp or api.",
            "schema": {
              "type": "string",
              "enum": [
                "http",
                "mcp",
                "api"
              ]
            }
          },
          {
            "name": "max_price",
            "in": "query",
            "required": false,
            "description": "Max price per call in USD.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1-50, default 10.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "description": "0-1000.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "include_down",
            "in": "query",
            "required": false,
            "description": "1 to include endpoints that failed two health checks.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "object"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "provider": {
                            "type": "string"
                          },
                          "label": {
                            "type": "string",
                            "description": "\"Lordevo service\" when operated by Lordevo"
                          },
                          "operator_service": {
                            "type": "boolean"
                          },
                          "category": {
                            "type": "string"
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "http",
                              "mcp",
                              "api"
                            ]
                          },
                          "url": {
                            "type": "string"
                          },
                          "method": {
                            "type": "string"
                          },
                          "payment": {
                            "type": "string",
                            "enum": [
                              "x402",
                              "apikey",
                              "free"
                            ]
                          },
                          "price_usd": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "network": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "auth": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "docs": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "up",
                              "unstable",
                              "down",
                              "unknown"
                            ]
                          },
                          "last_checked": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "source": {},
                          "details": {
                            "type": "string"
                          },
                          "score": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad parameter"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/v1/services/{id}": {
      "get": {
        "operationId": "getService",
        "summary": "One listing in full",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Listing",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "provider": {
                      "type": "string"
                    },
                    "label": {
                      "type": "string",
                      "description": "\"Lordevo service\" when operated by Lordevo"
                    },
                    "operator_service": {
                      "type": "boolean"
                    },
                    "category": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "http",
                        "mcp",
                        "api"
                      ]
                    },
                    "url": {
                      "type": "string"
                    },
                    "method": {
                      "type": "string"
                    },
                    "payment": {
                      "type": "string",
                      "enum": [
                        "x402",
                        "apikey",
                        "free"
                      ]
                    },
                    "price_usd": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "network": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "auth": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "docs": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "up",
                        "unstable",
                        "down",
                        "unknown"
                      ]
                    },
                    "last_checked": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "source": {},
                    "details": {
                      "type": "string"
                    },
                    "score": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/api/v1/categories": {
      "get": {
        "operationId": "listCategories",
        "summary": "Categories with counts",
        "responses": {
          "200": {
            "description": "Categories"
          }
        }
      }
    },
    "/api/v1/sources": {
      "get": {
        "operationId": "listSources",
        "summary": "Data sources and attribution",
        "responses": {
          "200": {
            "description": "Sources"
          }
        }
      }
    },
    "/api/v1/submit": {
      "post": {
        "operationId": "submitService",
        "summary": "Suggest a service (moderated, never auto-published). 5 per hour per IP.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "description",
                  "url",
                  "payment"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "description": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 1500
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  },
                  "payment": {
                    "type": "string",
                    "enum": [
                      "x402",
                      "apikey",
                      "free"
                    ]
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "http",
                      "mcp",
                      "api"
                    ]
                  },
                  "price_usd": {
                    "type": "number"
                  },
                  "network": {
                    "type": "string",
                    "enum": [
                      "base",
                      "base-sepolia",
                      "solana",
                      "other"
                    ]
                  },
                  "docs": {
                    "type": "string",
                    "format": "uri"
                  },
                  "contact": {
                    "type": "string",
                    "format": "email"
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 10
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Queued for review"
          },
          "400": {
            "description": "Validation errors"
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcp",
        "summary": "MCP JSON-RPC endpoint (streamable HTTP, JSON responses). Tools: search_services, get_service, list_categories.",
        "responses": {
          "200": {
            "description": "JSON-RPC response"
          }
        }
      }
    }
  }
}