{
  "openapi": "3.1.0",
  "info": {
    "title": "Hasty public agent API",
    "version": "2026.1",
    "description": "Read-only, first-party knowledge endpoints for Hasty. Values are grounded in the same sources as the human pages."
  },
  "servers": [
    {
      "url": "https://hasty.se"
    }
  ],
  "paths": {
    "/api/public/data": {
      "get": {
        "operationId": "getHastyData",
        "summary": "Get structured Hasty facts",
        "parameters": [
          {
            "name": "section",
            "in": "query",
            "schema": {
              "type": "string",
              "examples": [
                "pricing,services,contact"
              ]
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "sv",
                "en",
                "no",
                "da",
                "fi"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structured facts with sources and verification dates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/public/agent-ask": {
      "get": {
        "operationId": "askHasty",
        "summary": "Ask a source-grounded question",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 3,
              "maxLength": 500
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "sv",
                "en",
                "no",
                "da",
                "fi"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Answer with exact source excerpts",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "answer",
                    "grounded",
                    "sources"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Rate limited"
          }
        }
      }
    },
    "/api/public/research.csv": {
      "get": {
        "operationId": "downloadResearchProgramme",
        "summary": "Download the Nordic Marketing Production Index registry",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "sv",
                "en",
                "no",
                "da",
                "fi"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Versioned study registry",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "x-hasty-data-sections": [
    "pricing",
    "services",
    "cases",
    "contact",
    "facts",
    "methods",
    "cities",
    "markets",
    "glossary",
    "priceindex",
    "research",
    "company",
    "audiences",
    "outcomes",
    "help",
    "insights",
    "partner",
    "comparisons",
    "legal"
  ]
}