날씨 예보 AI

날씨 예보 AI · GPT Actions

7Timer! API

API for retrieving weather forecasts based on geographic coordinates. The API supports different products like astronomical (astro), civil, and meteorological (meteo) forecasts, and provides data in XML or JSON format.

  • GET /api.plRetrieve weather forecast data

    This endpoint returns weather forecast data for a specific location based on longitude and latitude. The data can be returned in XML or JSON format and can cover different forecast products.

Original API schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "7Timer! API",
    "description": "API for retrieving weather forecasts based on geographic coordinates. The API supports different products like astronomical (astro), civil, and meteorological (meteo) forecasts, and provides data in XML or JSON format.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://www.7timer.info/bin",
      "description": "Main API server"
    }
  ],
  "paths": {
    "/api.pl": {
      "get": {
        "operationId": "getWeatherData",
        "summary": "Retrieve weather forecast data",
        "description": "This endpoint returns weather forecast data for a specific location based on longitude and latitude. The data can be returned in XML or JSON format and can cover different forecast products.",
        "parameters": [
          {
            "name": "lon",
            "in": "query",
            "required": true,
            "description": "Longitude of the location.",
            "schema": {
              "type": "number",
              "format": "float",
              "example": 113.17
            }
          },
          {
            "name": "lat",
            "in": "query",
            "required": true,
            "description": "Latitude of the location.",
            "schema": {
              "type": "number",
              "format": "float",
              "example": 23.09
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "description": "Type of forecast product. Available options: 'astro', 'civil', 'civillight', 'meteo', 'two'.",
            "schema": {
              "type": "string",
              "enum": [
                "astro",
                "civil",
                "civillight",
                "meteo",
                "two"
              ],
              "example": "astro"
            }
          },
          {
            "name": "output",
            "in": "query",
            "required": true,
            "description": "Format of the output. Available options: 'xml', 'json'.",
            "schema": {
              "type": "string",
              "enum": [
                "xml",
                "json"
              ],
              "example": "json"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response, containing weather forecast data.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataseries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "timepoint": {
                            "type": "integer",
                            "description": "Time point in hours from now"
                          },
                          "cloudcover": {
                            "type": "integer",
                            "description": "Cloud cover percentage"
                          },
                          "seeing": {
                            "type": "integer",
                            "description": "Astronomical seeing"
                          },
                          "transparency": {
                            "type": "integer",
                            "description": "Atmospheric transparency"
                          },
                          "rh2m": {
                            "type": "integer",
                            "description": "Relative humidity at 2 meters"
                          },
                          "temp2m": {
                            "type": "integer",
                            "description": "Temperature at 2 meters (°C)"
                          },
                          "prec_type": {
                            "type": "string",
                            "description": "Precipitation type",
                            "enum": [
                              "snow",
                              "rain",
                              "frzr",
                              "icep",
                              "none"
                            ]
                          },
                          "prec_amount": {
                            "type": "integer",
                            "description": "Precipitation amount"
                          },
                          "wind10m": {
                            "type": "object",
                            "properties": {
                              "direction": {
                                "type": "string",
                                "description": "Wind direction",
                                "enum": [
                                  "N",
                                  "NE",
                                  "E",
                                  "SE",
                                  "S",
                                  "SW",
                                  "W",
                                  "NW"
                                ]
                              },
                              "speed": {
                                "type": "integer",
                                "description": "Wind speed in m/s"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "string",
                  "description": "XML string with weather forecast data"
                }
              }
            }
          },
          "400": {
            "description": "Invalid parameters provided"
          }
        }
      }
    }
  }
}