{
  "openapi": "3.1.0",
  "info": {
    "title": "tapa.gr public read-only API",
    "version": "1.0.0",
    "summary": "Read tapa.gr pages, pricing and contact details. No auth, GET only.",
    "description": "Public, read-only operations of tapa.gr (Greek web-design studio, SYMBOLS HOUSE OF BRANDS Ο.Ε.). There is no authentication, no sandbox and no write operation: quotes, audits and contact forms are submitted by people in the browser (Cloudflare Turnstile). Prices are net, + ΦΠΑ 24%. Site content is mostly Greek. The same operations are available as MCP tools at https://tapa.gr/mcp.",
    "termsOfService": "https://tapa.gr/oroi-xrisis/",
    "contact": {
      "name": "tapa.gr",
      "email": "hello@tapa.gr",
      "url": "https://tapa.gr/epikoinonia/"
    }
  },
  "externalDocs": {
    "description": "Developers & API (tapa.gr)",
    "url": "https://tapa.gr/developers/"
  },
  "servers": [
    {
      "url": "https://tapa.gr",
      "description": "Production"
    }
  ],
  "security": [],
  "tags": [
    {
      "name": "agent",
      "description": "JSON endpoints that mirror the MCP tools."
    },
    {
      "name": "content",
      "description": "Static agent-readable files."
    },
    {
      "name": "mcp",
      "description": "Model Context Protocol endpoint."
    }
  ],
  "paths": {
    "/api/agent/search": {
      "get": {
        "operationId": "searchPages",
        "tags": [
          "agent"
        ],
        "summary": "Search tapa.gr pages",
        "description": "Keyword search (Greek or English) over public tapa.gr pages. Returns titles, URLs, Markdown URLs and descriptions.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "Keywords, e.g. \"ιστοσελίδα για ιατρούς\" or \"pricing\".",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum results (1-20, default 8).",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 8
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching pages.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchResults"
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid query.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (60 requests per minute per IP).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/page": {
      "get": {
        "operationId": "getPageMarkdown",
        "tags": [
          "agent"
        ],
        "summary": "Read one tapa.gr page as Markdown",
        "description": "Returns the Markdown version of one public tapa.gr page. Only tapa.gr paths or URLs are accepted.",
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "required": true,
            "description": "Page path such as /times-kataskevis-istoselidas/ or a full https://tapa.gr/ URL.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The page in Markdown.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PageMarkdown"
                }
              }
            }
          },
          "400": {
            "description": "Path missing or not on tapa.gr.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "No such page.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (60 requests per minute per IP).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/pricing": {
      "get": {
        "operationId": "getPricing",
        "tags": [
          "agent"
        ],
        "summary": "Get tapa.gr pricing",
        "description": "Website packages (399€, 690€, 990€ + VAT) with renewals, extras, and technical support packs (80€, 300€, 400€ + VAT).",
        "responses": {
          "200": {
            "description": "Current pricing (net, + VAT 24%).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Pricing"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (60 requests per minute per IP).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/contact": {
      "get": {
        "operationId": "getContact",
        "tags": [
          "agent"
        ],
        "summary": "Get tapa.gr contact details",
        "description": "Email, phone, WhatsApp, address and the quote request form URL.",
        "responses": {
          "200": {
            "description": "Contact details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (60 requests per minute per IP).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "tags": [
          "agent"
        ],
        "summary": "Service health",
        "description": "Health status of the public read-only API (checks that the page index is readable).",
        "responses": {
          "200": {
            "description": "Healthy.",
            "content": {
              "application/health+json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          },
          "503": {
            "description": "Unhealthy.",
            "content": {
              "application/health+json": {
                "schema": {
                  "$ref": "#/components/schemas/Health"
                }
              }
            }
          }
        }
      }
    },
    "/agent-index.json": {
      "get": {
        "operationId": "getAgentIndex",
        "tags": [
          "content"
        ],
        "summary": "Get the page index",
        "description": "JSON index of all public pages (URL, Markdown URL, title, description, H2 headings).",
        "responses": {
          "200": {
            "description": "Page index.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentIndex"
                }
              }
            }
          },
          "404": {
            "description": "Page not found (Markdown 404 body).",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/index.md": {
      "get": {
        "operationId": "getHomeMarkdown",
        "tags": [
          "content"
        ],
        "summary": "Get the homepage as Markdown",
        "responses": {
          "200": {
            "description": "Homepage in Markdown with frontmatter.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Page not found (Markdown 404 body).",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/{slug}/index.md": {
      "get": {
        "operationId": "getPageMarkdownFile",
        "tags": [
          "content"
        ],
        "summary": "Get a top-level page as Markdown",
        "description": "Markdown twin of a top-level page. For nested pages (e.g. /blog/<slug>/) use getPageMarkdown, or append index.md to the page URL.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Page slug, e.g. about or times-kataskevis-istoselidas.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Page in Markdown with frontmatter.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Page not found (Markdown 404 body).",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/pricing.md": {
      "get": {
        "operationId": "getPricingMarkdown",
        "tags": [
          "content"
        ],
        "summary": "Get pricing as Markdown",
        "description": "English pricing summary followed by the Greek pricing page.",
        "responses": {
          "200": {
            "description": "Pricing in Markdown.",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Page not found (Markdown 404 body).",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getLlmsTxt",
        "tags": [
          "content"
        ],
        "summary": "Get the llms.txt agent guide",
        "responses": {
          "200": {
            "description": "Agent guide (Greek, Markdown formatted).",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "Page not found (Markdown 404 body).",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "callMcp",
        "tags": [
          "mcp"
        ],
        "summary": "MCP JSON-RPC endpoint (Streamable HTTP)",
        "description": "Model Context Protocol server with read-only tools search_pages, get_page_markdown, get_pricing, get_contact. Supported protocol versions: 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26. Server card: https://tapa.gr/mcp/server-card",
        "parameters": [
          {
            "name": "MCP-Protocol-Version",
            "in": "header",
            "required": false,
            "description": "MCP protocol version.",
            "schema": {
              "type": "string",
              "enum": [
                "2026-07-28",
                "2025-11-25",
                "2025-06-18",
                "2025-03-26"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "202": {
            "description": "Notification accepted (no body)."
          },
          "400": {
            "description": "Invalid request, unsupported version or header mismatch.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "404": {
            "description": "Method not found (modern protocol).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (60 requests per minute per IP).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Seconds to wait."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Health": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pass",
              "fail",
              "warn"
            ]
          },
          "serviceId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "checks": {
            "type": "object"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "SearchResult": {
        "type": "object",
        "required": [
          "title",
          "url"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "md": {
            "type": "string",
            "format": "uri"
          },
          "description": {
            "type": "string"
          }
        }
      },
      "SearchResults": {
        "type": "object",
        "required": [
          "query",
          "results"
        ],
        "properties": {
          "query": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchResult"
            }
          }
        }
      },
      "PageMarkdown": {
        "type": "object",
        "required": [
          "url",
          "markdown"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "md": {
            "type": "string",
            "format": "uri"
          },
          "markdown": {
            "type": "string"
          },
          "truncated": {
            "type": "boolean"
          }
        }
      },
      "SitePackage": {
        "type": "object",
        "required": [
          "id",
          "name",
          "priceNet",
          "renewalPerYearNet"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "priceNet": {
            "type": "number",
            "description": "EUR, excluding VAT."
          },
          "pages": {
            "type": "string"
          },
          "deliveryWorkingDays": {
            "type": "integer"
          },
          "recommended": {
            "type": "boolean"
          },
          "includedEmails": {
            "type": "integer"
          },
          "domainIncluded": {
            "type": "boolean"
          },
          "supportHoursIncluded": {
            "type": "integer"
          },
          "firstYearHostingIncluded": {
            "type": "boolean"
          },
          "renewalPerYearNet": {
            "type": "number"
          },
          "renewal": {
            "type": "string"
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "SupportPack": {
        "type": "object",
        "required": [
          "id",
          "hours",
          "priceNet"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "hours": {
            "type": "integer"
          },
          "ratePerHourNet": {
            "type": "number"
          },
          "priceNet": {
            "type": "number"
          },
          "availabilityLimited": {
            "type": "boolean"
          }
        }
      },
      "Pricing": {
        "type": "object",
        "required": [
          "currency",
          "sitePackages",
          "supportPacks"
        ],
        "properties": {
          "currency": {
            "type": "string",
            "const": "EUR"
          },
          "vat": {
            "type": "object",
            "properties": {
              "rate": {
                "type": "number"
              },
              "note": {
                "type": "string"
              }
            }
          },
          "sitePackages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SitePackage"
            }
          },
          "sitePackagePayment": {
            "type": "string"
          },
          "extras": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          },
          "supportPacks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportPack"
            }
          },
          "supportTerms": {
            "type": "object",
            "properties": {
              "validityDays": {
                "type": "integer"
              },
              "changeRequestsWithinWorkingDays": {
                "type": "integer"
              },
              "payment": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "pricingPage": {
            "type": "string",
            "format": "uri"
          },
          "noEshop": {
            "type": "string"
          }
        }
      },
      "Contact": {
        "type": "object",
        "required": [
          "email",
          "phone",
          "quoteRequestForm"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "phone": {
            "type": "string"
          },
          "whatsapp": {
            "type": "object",
            "properties": {
              "number": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "address": {
            "type": "string"
          },
          "contactPage": {
            "type": "string",
            "format": "uri"
          },
          "quoteRequestForm": {
            "type": "string",
            "format": "uri"
          },
          "freeAudit": {
            "type": "string",
            "format": "uri"
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "areaServed": {
            "type": "string"
          },
          "note": {
            "type": "string"
          }
        }
      },
      "AgentIndex": {
        "type": "object",
        "required": [
          "site",
          "pages"
        ],
        "properties": {
          "site": {
            "type": "string",
            "format": "uri"
          },
          "generated": {
            "type": "string",
            "format": "date"
          },
          "pages": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "url",
                "title"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "md": {
                  "type": "string",
                  "format": "uri"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "headings": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer"
            ]
          },
          "method": {
            "type": "string",
            "examples": [
              "initialize",
              "tools/list",
              "tools/call",
              "server/discover"
            ]
          },
          "params": {
            "type": "object"
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": [
          "jsonrpc"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "result": {
            "type": "object"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "integer"
              },
              "message": {
                "type": "string"
              },
              "data": {}
            }
          }
        }
      }
    }
  }
}
