{
  "openapi": "3.0.1",
  "info": {
    "title": "Weather & Environmental Data by Location",
    "description": "Returns current conditions, daily weather, air quality and nearby earthquakes for place names or coordinates, joining Open-Meteo forecast and air-quality data with the USGS earthquake catalog on one location and date axis.",
    "version": "1.1",
    "x-build-id": "VLzod9NldZ0Z5Tbu5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/luochengfengqi~weather-environment-by-location/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-luochengfengqi-weather-environment-by-location",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/luochengfengqi~weather-environment-by-location/runs": {
      "post": {
        "operationId": "runs-sync-luochengfengqi-weather-environment-by-location",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/luochengfengqi~weather-environment-by-location/run-sync": {
      "post": {
        "operationId": "run-sync-luochengfengqi-weather-environment-by-location",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "locations": {
            "title": "Locations (place names or coordinates)",
            "type": "array",
            "description": "One entry per location. Accepted formats: (1) a place name such as 'Shanghai', 'Berlin, Germany' or 'San Francisco' (the top geocoding result is used); (2) decimal coordinates such as '31.23,121.47'; (3) labeled coordinates such as 'lat:31.23,lon:121.47'.",
            "default": [
              "Shanghai",
              "Berlin",
              "San Francisco"
            ],
            "items": {
              "type": "string"
            }
          },
          "forecastDays": {
            "title": "Forecast Days",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Number of forecast days to return per location, including today (1 to 16). Combined with Past Days this sets the daily record window.",
            "default": 7
          },
          "pastDays": {
            "title": "Past Days",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Number of past days to include before today (0 to 30), using the same forecast model run. Set to 0 for forecast-only output.",
            "default": 2
          },
          "includeAirQuality": {
            "title": "Include Air Quality",
            "type": "boolean",
            "description": "When enabled, hourly Open-Meteo air-quality data (PM2.5, PM10, US and European AQI, ozone, nitrogen dioxide) is aggregated into daily mean and maximum fields on each daily record.",
            "default": true
          },
          "includeEarthquakes": {
            "title": "Include Earthquakes (USGS)",
            "type": "boolean",
            "description": "When enabled, the USGS earthquake catalog is searched around each location and returned as earthquake records; each daily record also gains the count and strongest magnitude of returned events on that date.",
            "default": true
          },
          "earthquakeRadiusKm": {
            "title": "Earthquake Search Radius (km)",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "Radius around each location for the USGS earthquake search, in kilometers (10 to 2000). Larger radii return more events in seismically active regions.",
            "default": 300
          },
          "minEarthquakeMagnitude": {
            "title": "Minimum Earthquake Magnitude",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Minimum magnitude for returned USGS events (0 to 10). The default 2.5 keeps locally noticeable events and filters micro-earthquakes.",
            "default": 2.5
          },
          "maxEarthquakeEvents": {
            "title": "Max Earthquake Events per Location",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Maximum USGS events returned per location (0 to 200), strongest first. Daily earthquake counts are computed over the returned events, so a low cap can undercount very active dates.",
            "default": 20
          },
          "openMeteoApiKey": {
            "title": "Open-Meteo API Key (optional)",
            "type": "string",
            "description": "Optional Open-Meteo subscription key. When supplied, your key is used on the commercial customer endpoints for geocoding, forecast and air quality. When left empty, the operator's configured Open-Meteo key is used instead, so runs are covered commercially by default."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}