{
  "openapi": "3.1.0",
  "info": {
    "title": "IconServe",
    "version": "0.1.0",
    "description": "Static open-source icons (Lucide, Heroicons, Tabler, Simple Icons) as SVG/PNG for AI agents."
  },
  "servers": [
    {
      "url": "https://icons-for-agents.site"
    }
  ],
  "paths": {
    "/api/search": {
      "get": {
        "operationId": "searchIcons",
        "summary": "Search icons by keyword or natural language.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Search query."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "set",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Restrict to one set."
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked matches."
          }
        }
      }
    },
    "/api/icon": {
      "get": {
        "operationId": "getIcon",
        "summary": "Get one icon as JSON (svg markup + metadata + URLs).",
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "set",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "style",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "color",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "size",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "stroke",
            "in": "query",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Icon JSON."
          },
          "404": {
            "description": "Not found."
          }
        }
      }
    },
    "/icons/{set}/{name}.svg": {
      "get": {
        "operationId": "getIconSvg",
        "summary": "Raw SVG for a specific set. Supports color/size/stroke/style/format query params.",
        "parameters": [
          {
            "name": "set",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG (or PNG with format=png)."
          }
        }
      }
    },
    "/i/{name}.svg": {
      "get": {
        "operationId": "getBestIconSvg",
        "summary": "Raw SVG best-match across all sets. Supports color/size/stroke/format query params.",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SVG (or PNG with format=png)."
          }
        }
      }
    },
    "/api/sets": {
      "get": {
        "operationId": "listSets",
        "summary": "List sets, counts, licenses.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}