{
  "openapi": "3.1.0",
  "info": {
    "title": "Benchcraft Answer Desk public search",
    "version": "1.0.0",
    "description": "Read-only search over the published questions, product facts and official guidance. No sign-in required."
  },
  "servers": [
    {
      "url": "https://benchcraftdesk.co.uk"
    }
  ],
  "paths": {
    "/api/answers": {
      "get": {
        "operationId": "searchAnswers",
        "summary": "Find a published answer for a buyer question",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ranked matches with source pages. No matches returns an empty list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "results": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "question",
                          "answer",
                          "url",
                          "topic"
                        ],
                        "properties": {
                          "question": {
                            "type": "string"
                          },
                          "answer": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          },
                          "topic": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "catalog": {
                      "type": "string",
                      "format": "uri"
                    },
                    "support": {
                      "type": "string",
                      "format": "uri"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid query or result limit."
          }
        }
      }
    }
  }
}