{
  "openapi": "3.1.0",
  "info": {
    "title": "KASQ tools for agents",
    "version": "1.1.0",
    "summary": "Free, read-only tools for AI agents from KASQ (APPSTAR LTD). No AI model in any answer; not affiliated with HSE.",
    "description": "The guidance search and the document status have two tiers. Without a key: 30 calls a minute and 300 a UTC day from one address. With a free key in the X-Api-Key header: 60 calls a minute and 2,000 a UTC day; get one at https://kasq.uk/agents. For everybody together: 20,000 calls a UTC day, then 503 until midnight UTC. Very broad use is slowed to one call every 10 seconds for a day. For higher limits, write to hello@kasq.uk.\n\nThe calculators: 30 calls a minute from one address, and for everybody together 300 a minute and 20,000 a UTC day. They take no key.\n\nA refusal is JSON with an error field. A 429 carries Retry-After.",
    "termsOfService": "https://kasq.uk/agents/terms",
    "contact": {
      "name": "KASQ",
      "email": "hello@kasq.uk"
    }
  },
  "externalDocs": {
    "description": "What an agent can call, the limits and a free key",
    "url": "https://kasq.uk/agents"
  },
  "servers": [
    {
      "url": "https://kasq.uk"
    }
  ],
  "paths": {
    "/api/tools/noise": {
      "get": {
        "operationId": "noiseDailyExposureGet",
        "summary": "Daily noise exposure (LEP,d)",
        "description": "One worker's daily noise exposure LEP,d and HSE exposure points from each task's level in dB(A) and minutes, with the action-value band. Unprotected exposure; the 87 dB(A) limit applies at the ear. MCP tool noise_daily_exposure on /mcp/tools gives the same answer.",
        "parameters": [
          {
            "name": "level_db",
            "in": "query",
            "required": true,
            "description": "A-weighted level of the task, dB(A). Repeat it, with minutes, for each task.",
            "schema": {
              "type": "array",
              "items": {
                "type": "number",
                "description": "A-weighted level of the task, dB(A). Repeat it, with minutes, for each task.",
                "exclusiveMinimum": 0,
                "maximum": 140
              }
            },
            "style": "form",
            "explode": true
          },
          {
            "name": "minutes",
            "in": "query",
            "required": true,
            "description": "Minutes of exposure to that level in the day. One for each level_db.",
            "schema": {
              "type": "array",
              "items": {
                "type": "number",
                "description": "Minutes of exposure to that level in the day. One for each level_db.",
                "minimum": 0,
                "maximum": 1440
              }
            },
            "style": "form",
            "explode": true
          }
        ],
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoiseDailyExposureAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (30 a minute from one address, 300 a minute or 20,000 a UTC day from everybody). Retry-After says how many seconds to wait.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorLimited"
                }
              }
            }
          },
          "503": {
            "description": "The calculators are paused.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorPaused"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "noiseDailyExposurePost",
        "summary": "Daily noise exposure (LEP,d)",
        "description": "One worker's daily noise exposure LEP,d and HSE exposure points from each task's level in dB(A) and minutes, with the action-value band. Unprotected exposure; the 87 dB(A) limit applies at the ear. MCP tool noise_daily_exposure on /mcp/tools gives the same answer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "entries": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 24,
                    "items": {
                      "type": "object",
                      "properties": {
                        "level_db": {
                          "type": "number",
                          "description": "A-weighted level of the task, dB(A).",
                          "exclusiveMinimum": 0,
                          "maximum": 140
                        },
                        "minutes": {
                          "type": "number",
                          "description": "Minutes of exposure to that level in the day.",
                          "minimum": 0,
                          "maximum": 1440
                        }
                      },
                      "required": [
                        "level_db",
                        "minutes"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "entries"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NoiseDailyExposureAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "413": {
            "description": "The body is larger than 8 KB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (30 a minute from one address, 300 a minute or 20,000 a UTC day from everybody). Retry-After says how many seconds to wait.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorLimited"
                }
              }
            }
          },
          "503": {
            "description": "The calculators are paused.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorPaused"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/havs": {
      "get": {
        "operationId": "havsExposureGet",
        "summary": "Hand-arm vibration points and minutes to EAV/ELV",
        "description": "HSE exposure points per hour and trigger-time minutes to the exposure action value and limit value from a tool's vibration magnitude in m/s²; with minutes, also the day's points, A(8) and band. MCP tool havs_exposure on /mcp/tools gives the same answer.",
        "parameters": [
          {
            "name": "magnitude_ms2",
            "in": "query",
            "required": true,
            "description": "Vibration magnitude of the tool, m/s².",
            "schema": {
              "type": "number",
              "description": "Vibration magnitude of the tool, m/s².",
              "minimum": 0.1,
              "maximum": 50
            }
          },
          {
            "name": "minutes",
            "in": "query",
            "required": false,
            "description": "Optional trigger time in the day, minutes.",
            "schema": {
              "type": "number",
              "description": "Optional trigger time in the day, minutes.",
              "minimum": 0,
              "maximum": 1440
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HavsExposureAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (30 a minute from one address, 300 a minute or 20,000 a UTC day from everybody). Retry-After says how many seconds to wait.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorLimited"
                }
              }
            }
          },
          "503": {
            "description": "The calculators are paused.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorPaused"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "havsExposurePost",
        "summary": "Hand-arm vibration points and minutes to EAV/ELV",
        "description": "HSE exposure points per hour and trigger-time minutes to the exposure action value and limit value from a tool's vibration magnitude in m/s²; with minutes, also the day's points, A(8) and band. MCP tool havs_exposure on /mcp/tools gives the same answer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "magnitude_ms2": {
                    "type": "number",
                    "description": "Vibration magnitude of the tool, m/s².",
                    "minimum": 0.1,
                    "maximum": 50
                  },
                  "minutes": {
                    "type": "number",
                    "description": "Optional trigger time in the day, minutes.",
                    "minimum": 0,
                    "maximum": 1440
                  }
                },
                "required": [
                  "magnitude_ms2"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HavsExposureAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "413": {
            "description": "The body is larger than 8 KB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (30 a minute from one address, 300 a minute or 20,000 a UTC day from everybody). Retry-After says how many seconds to wait.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorLimited"
                }
              }
            }
          },
          "503": {
            "description": "The calculators are paused.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorPaused"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/dropped-object": {
      "get": {
        "operationId": "droppedObjectSeverityGet",
        "summary": "Dropped object severity (DROPS Calculator)",
        "description": "The DROPS Calculator's severity band (Slight, Minor, Major or Fatality) and impact energy for an object of a given mass in kg falling a given height in m, with a rule-of-thumb exclusion-zone radius. MCP tool dropped_object_severity on /mcp/tools gives the same answer.",
        "parameters": [
          {
            "name": "mass_kg",
            "in": "query",
            "required": true,
            "description": "Mass of the object, kg.",
            "schema": {
              "type": "number",
              "description": "Mass of the object, kg.",
              "minimum": 0.001,
              "maximum": 5000
            }
          },
          {
            "name": "height_m",
            "in": "query",
            "required": true,
            "description": "Height it could fall, m.",
            "schema": {
              "type": "number",
              "description": "Height it could fall, m.",
              "minimum": 0.1,
              "maximum": 500
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DroppedObjectSeverityAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (30 a minute from one address, 300 a minute or 20,000 a UTC day from everybody). Retry-After says how many seconds to wait.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorLimited"
                }
              }
            }
          },
          "503": {
            "description": "The calculators are paused.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorPaused"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "droppedObjectSeverityPost",
        "summary": "Dropped object severity (DROPS Calculator)",
        "description": "The DROPS Calculator's severity band (Slight, Minor, Major or Fatality) and impact energy for an object of a given mass in kg falling a given height in m, with a rule-of-thumb exclusion-zone radius. MCP tool dropped_object_severity on /mcp/tools gives the same answer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mass_kg": {
                    "type": "number",
                    "description": "Mass of the object, kg.",
                    "minimum": 0.001,
                    "maximum": 5000
                  },
                  "height_m": {
                    "type": "number",
                    "description": "Height it could fall, m.",
                    "minimum": 0.1,
                    "maximum": 500
                  }
                },
                "required": [
                  "mass_kg",
                  "height_m"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DroppedObjectSeverityAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "413": {
            "description": "The body is larger than 8 KB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "429": {
            "description": "Too many calls (30 a minute from one address, 300 a minute or 20,000 a UTC day from everybody). Retry-After says how many seconds to wait.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorLimited"
                }
              }
            }
          },
          "503": {
            "description": "The calculators are paused.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CalculatorPaused"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/hse-search": {
      "get": {
        "operationId": "hseGuidanceSearchGet",
        "summary": "Search UK construction health and safety guidance",
        "description": "Search UK construction health and safety guidance: HSE publications (CIS, GEIS, HSG, L and INDG series), the Construction (Design and Management) Regulations 2015, and HSE's construction web pages. Returns up to 5 short official passages (at most 600 characters, at most 2 from one document), each with kind, label, status, the date it was last checked, a link to the KASQ page for it and the source on hse.gov.uk or legislation.gov.uk. kind is publication, legislation or web_guidance; web_guidance is HSE's website guidance, not an Approved Code of Practice and not legislation. Quote only the passages returned, name the source and link the reader to url. MCP tool hse_guidance_search on /mcp/tools gives the same answer.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "description": "The question, in plain words.",
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 300,
              "description": "The question, in plain words."
            }
          },
          {
            "name": "family",
            "in": "query",
            "required": false,
            "description": "Optional: one HSE series, CDM for the Regulations, or web for HSE's web pages.",
            "schema": {
              "type": "string",
              "enum": [
                "CIS",
                "GEIS",
                "HSG",
                "L",
                "INDG",
                "CDM",
                "web"
              ],
              "description": "Optional: one HSE series, CDM for the Regulations, or web for HSE's web pages."
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Optional: how many passages, 3 to 5 (default 5).",
            "schema": {
              "type": "integer",
              "minimum": 3,
              "maximum": 5,
              "description": "Optional: how many passages, 3 to 5 (default 5)."
            }
          }
        ],
        "security": [
          {},
          {
            "freeKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HseGuidanceSearchAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "401": {
            "description": "The X-Api-Key header holds a key we do not know. Leave the header out to call without a key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidKey"
                }
              }
            }
          },
          "429": {
            "description": "Over a limit. The body names the tier, the limit, the seconds to wait (also in Retry-After) and what to do: \"Get a free key at kasq.uk/agents\" without a key, \"Contact us for higher limits\" with one.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchLimited"
                }
              }
            }
          },
          "503": {
            "description": "The search is paused (error paused), or the 20,000 calls of the day for everybody are used up (error busy, with Retry-After until midnight UTC).",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchUnavailable"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "hseGuidanceSearchPost",
        "summary": "Search UK construction health and safety guidance",
        "description": "Search UK construction health and safety guidance: HSE publications (CIS, GEIS, HSG, L and INDG series), the Construction (Design and Management) Regulations 2015, and HSE's construction web pages. Returns up to 5 short official passages (at most 600 characters, at most 2 from one document), each with kind, label, status, the date it was last checked, a link to the KASQ page for it and the source on hse.gov.uk or legislation.gov.uk. kind is publication, legislation or web_guidance; web_guidance is HSE's website guidance, not an Approved Code of Practice and not legislation. Quote only the passages returned, name the source and link the reader to url. MCP tool hse_guidance_search on /mcp/tools gives the same answer.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "q": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 300,
                    "description": "The question, in plain words."
                  },
                  "family": {
                    "type": "string",
                    "enum": [
                      "CIS",
                      "GEIS",
                      "HSG",
                      "L",
                      "INDG",
                      "CDM",
                      "web"
                    ],
                    "description": "Optional: one HSE series, CDM for the Regulations, or web for HSE's web pages."
                  },
                  "limit": {
                    "type": "integer",
                    "minimum": 3,
                    "maximum": 5,
                    "description": "Optional: how many passages, 3 to 5 (default 5)."
                  }
                },
                "required": [
                  "q"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {},
          {
            "freeKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HseGuidanceSearchAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "401": {
            "description": "The X-Api-Key header holds a key we do not know. Leave the header out to call without a key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidKey"
                }
              }
            }
          },
          "413": {
            "description": "The body is larger than 8 KB.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "429": {
            "description": "Over a limit. The body names the tier, the limit, the seconds to wait (also in Retry-After) and what to do: \"Get a free key at kasq.uk/agents\" without a key, \"Contact us for higher limits\" with one.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchLimited"
                }
              }
            }
          },
          "503": {
            "description": "The search is paused (error paused), or the 20,000 calls of the day for everybody are used up (error busy, with Retry-After until midnight UTC).",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchUnavailable"
                }
              }
            }
          }
        }
      }
    },
    "/api/tools/hse-document": {
      "get": {
        "operationId": "hseDocumentStatusGet",
        "summary": "Status of one construction guidance document",
        "description": "The status of one document of the KASQ construction guidance base, by its code (GEIS5, HSG150, CDM2015) or, for an HSE web page, its id (construction/safetytopics/scaffoldinginfo): title, kind, status (current, withdrawn, moved, changed), edition where HSE gives one, the date last checked, what replaced it, and the links. No text of the document. MCP tool hse_document_status on /mcp/tools gives the same answer.",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "required": true,
            "description": "A code (GEIS5, HSG150, CDM2015) or a web page id (construction/safetytopics/scaffoldinginfo).",
            "schema": {
              "type": "string",
              "maxLength": 160,
              "description": "A code (GEIS5, HSG150, CDM2015) or a web page id (construction/safetytopics/scaffoldinginfo)."
            }
          }
        ],
        "security": [
          {},
          {
            "freeKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HseDocumentStatusAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The input was refused; reason says why.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Refusal"
                }
              }
            }
          },
          "401": {
            "description": "The X-Api-Key header holds a key we do not know. Leave the header out to call without a key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvalidKey"
                }
              }
            }
          },
          "404": {
            "description": "No document of the base has this code or id.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotInBase"
                }
              }
            }
          },
          "429": {
            "description": "Over a limit. The body names the tier, the limit, the seconds to wait (also in Retry-After) and what to do: \"Get a free key at kasq.uk/agents\" without a key, \"Contact us for higher limits\" with one.",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchLimited"
                }
              }
            }
          },
          "503": {
            "description": "The search is paused (error paused), or the 20,000 calls of the day for everybody are used up (error busy, with Retry-After until midnight UTC).",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchUnavailable"
                }
              }
            }
          }
        }
      }
    },
    "/api/news/articles.json": {
      "get": {
        "operationId": "newsArticlesGet",
        "summary": "KASQ construction news as JSON",
        "description": "The newest 60 KASQ news articles about UK construction projects and HSE news, newest first, each with its address, headline, summary, dates, the fact tiles the page shows with the source of each, the place, the sources listed under it and, for a project, the stage, contractor, client and value where the page states them. A field is left out when it is not known. Read-only, no key.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The answer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewsArticlesAnswer"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "NoiseDailyExposureAnswer": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string"
          },
          "build": {
            "type": "object"
          },
          "inputs": {
            "type": "object"
          },
          "result": {
            "type": "object"
          },
          "method": {
            "type": "string"
          },
          "source": {
            "type": "object"
          },
          "disclaimer": {
            "type": "string"
          }
        },
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source",
          "disclaimer"
        ]
      },
      "Refusal": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_input",
              "bad_request",
              "too_large",
              "method_not_allowed"
            ]
          },
          "reason": {
            "type": "string"
          },
          "tool": {
            "type": "string"
          },
          "disclaimer": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ]
      },
      "CalculatorLimited": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "rate_limited",
              "daily_limit"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "CalculatorPaused": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "paused"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "HavsExposureAnswer": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string"
          },
          "build": {
            "type": "object"
          },
          "inputs": {
            "type": "object"
          },
          "result": {
            "type": "object"
          },
          "method": {
            "type": "string"
          },
          "source": {
            "type": "object"
          },
          "disclaimer": {
            "type": "string"
          }
        },
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source",
          "disclaimer"
        ]
      },
      "DroppedObjectSeverityAnswer": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string"
          },
          "build": {
            "type": "object"
          },
          "inputs": {
            "type": "object"
          },
          "result": {
            "type": "object"
          },
          "method": {
            "type": "string"
          },
          "source": {
            "type": "object"
          },
          "disclaimer": {
            "type": "string"
          }
        },
        "required": [
          "tool",
          "inputs",
          "result",
          "method",
          "source",
          "disclaimer"
        ]
      },
      "HseGuidanceSearchAnswer": {
        "type": "object",
        "properties": {
          "passages": {
            "type": "array",
            "maxItems": 5,
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "publication",
                    "legislation",
                    "web_guidance"
                  ]
                },
                "label": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "section": {
                  "type": "string"
                },
                "excerpt": {
                  "type": "string",
                  "maxLength": 600
                },
                "status": {
                  "type": "string"
                },
                "checked": {
                  "type": "string"
                },
                "checked_basis": {
                  "type": "string",
                  "enum": [
                    "watcher",
                    "copy"
                  ]
                },
                "updated": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "source_url": {
                  "type": "string"
                },
                "licence": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "kind",
                "label",
                "title",
                "excerpt",
                "status",
                "checked",
                "url",
                "source_url",
                "licence"
              ]
            }
          },
          "attribution": {
            "type": "string"
          },
          "via": {
            "type": "string"
          },
          "next": {
            "type": "object"
          },
          "terms": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          },
          "logging": {
            "type": "string"
          }
        },
        "required": [
          "passages",
          "attribution",
          "via",
          "terms",
          "ref",
          "logging"
        ]
      },
      "InvalidKey": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "invalid_key"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message"
        ]
      },
      "SearchLimited": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "rate_limited"
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "anonymous",
              "free"
            ]
          },
          "limit": {
            "type": "string"
          },
          "retry_after_s": {
            "type": "integer",
            "minimum": 1
          },
          "message": {
            "type": "string"
          },
          "slowed": {
            "type": "boolean"
          }
        },
        "required": [
          "error",
          "tier",
          "limit",
          "retry_after_s",
          "message"
        ]
      },
      "SearchUnavailable": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "paused",
              "busy"
            ]
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "message"
        ]
      },
      "HseDocumentStatusAnswer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "edition": {
            "type": "string"
          },
          "updated": {
            "type": "string"
          },
          "checked": {
            "type": "string"
          },
          "checked_basis": {
            "type": "string"
          },
          "replaced_by": {
            "type": "string"
          },
          "moved_to": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "source_url": {
            "type": "string"
          },
          "licence": {
            "type": "string"
          },
          "attribution": {
            "type": "string"
          },
          "via": {
            "type": "string"
          },
          "terms": {
            "type": "string"
          },
          "ref": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "kind",
          "label",
          "title",
          "family",
          "status",
          "checked",
          "url",
          "source_url",
          "licence",
          "attribution",
          "via",
          "terms",
          "ref"
        ]
      },
      "NotInBase": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "enum": [
              "not_in_base"
            ]
          }
        },
        "required": [
          "error"
        ]
      },
      "NewsArticlesAnswer": {
        "type": "object",
        "properties": {
          "version": {
            "type": "integer",
            "const": 1
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 60
          },
          "articles": {
            "type": "array",
            "maxItems": 60,
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string"
                },
                "headline": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "projects",
                    "hse"
                  ]
                },
                "publishedAt": {
                  "type": "string"
                },
                "modifiedAt": {
                  "type": "string"
                },
                "card": {
                  "type": "string"
                },
                "picture": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "alt": {
                      "type": "string"
                    },
                    "caption": {
                      "type": "string"
                    },
                    "digitalSourceType": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "url"
                  ],
                  "additionalProperties": false
                },
                "tiles": {
                  "type": "array",
                  "minItems": 1,
                  "maxItems": 6,
                  "items": {
                    "type": "object",
                    "properties": {
                      "label": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      },
                      "source": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "label",
                      "value"
                    ],
                    "additionalProperties": false
                  }
                },
                "place": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "lat": {
                      "type": "number",
                      "minimum": -90,
                      "maximum": 90
                    },
                    "lon": {
                      "type": "number",
                      "minimum": -180,
                      "maximum": 180
                    },
                    "locationPrecision": {
                      "type": "string",
                      "enum": [
                        "exact",
                        "street",
                        "town",
                        "approximate"
                      ]
                    }
                  },
                  "additionalProperties": false
                },
                "eventDate": {
                  "type": "string"
                },
                "project": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "additionalProperties": false
                },
                "stage": {
                  "type": "string"
                },
                "contractor": {
                  "type": "string"
                },
                "client": {
                  "type": "string"
                },
                "value": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "currency": {
                      "type": "string",
                      "const": "GBP"
                    },
                    "scope": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "amount",
                    "currency"
                  ],
                  "additionalProperties": false
                },
                "sources": {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "object",
                    "properties": {
                      "org": {
                        "type": "string"
                      },
                      "title": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      },
                      "reported": {
                        "type": "boolean",
                        "const": true
                      }
                    },
                    "required": [
                      "url"
                    ],
                    "additionalProperties": false
                  }
                },
                "sourcing": {
                  "type": "string",
                  "enum": [
                    "official",
                    "reported"
                  ]
                },
                "primarySource": {
                  "type": "string"
                }
              },
              "required": [
                "url",
                "headline",
                "category",
                "publishedAt",
                "modifiedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "version",
          "count",
          "articles"
        ],
        "additionalProperties": false
      }
    },
    "headers": {
      "Retry-After": {
        "description": "Seconds to wait before calling again.",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "securitySchemes": {
      "freeKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "A free key for the guidance search and the document status: 2,000 calls a UTC day instead of 300. Optional. Get one at https://kasq.uk/agents."
      }
    }
  }
}
