{
  "openapi": "3.1.0",
  "info": {
    "title": "Honavar.com public API",
    "version": "1.0.0",
    "description": "Read-only endpoints of the Honavar.com travel guide. No key or sign-in is needed. Please cache responses and credit Honavar.com (and MET Norway for weather).",
    "contact": {
      "url": "https://honavar.com/about/"
    }
  },
  "servers": [
    {
      "url": "https://honavar.com"
    }
  ],
  "paths": {
    "/api/weather": {
      "get": {
        "operationId": "getWeather",
        "summary": "Honavar weather now and forecast",
        "description": "Current conditions, the next 24 hours and up to 7 days in IST. Source: MET Norway Locationforecast 2.0 (CC BY 4.0). Cached until MET's next update.",
        "responses": {
          "200": {
            "description": "Forecast summary",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date-time"
                    },
                    "now": {
                      "type": "object",
                      "description": "t and feels in °C, rh in %, wind in km/h, dir compass point, sym MET symbol code, rain in mm next hour, uv index"
                    },
                    "hours": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "at": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "t": {
                            "type": "number"
                          },
                          "sym": {
                            "type": "string"
                          },
                          "rain": {
                            "type": "number"
                          }
                        }
                      }
                    },
                    "days": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "d": {
                            "type": "string",
                            "format": "date"
                          },
                          "max": {
                            "type": "number"
                          },
                          "min": {
                            "type": "number"
                          },
                          "rain": {
                            "type": "number"
                          },
                          "sym": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      }
                    },
                    "source": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Forecast temporarily unavailable"
          }
        }
      }
    },
    "/api/search": {
      "get": {
        "operationId": "searchSite",
        "summary": "Search the whole site",
        "description": "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Keywords or a question"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Results in Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "Missing q",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/{page}/index.md": {
      "get": {
        "operationId": "getPageMarkdown",
        "summary": "One page as Markdown",
        "description": "Any page of the site as Markdown with YAML front matter. Sending Accept: text/markdown to the page URL works too.",
        "parameters": [
          {
            "name": "page",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Page path without slashes at the ends, for example places/eco-beach"
          }
        ],
        "responses": {
          "200": {
            "description": "Page Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No such page"
          }
        }
      }
    }
  }
}
