{
  "openapi": "3.0.1",
  "info": {
    "title": "GRIB2 & NetCDF Reader API: Weather Data to CSV, JSON & Maps",
    "description": "Read GRIB and NetCDF weather and climate files from links or uploads: GFS, ECMWF, HRRR, ERA5, CMIP. Values at points as JSON and CSV, area statistics, maps and NetCDF subsets. With a variables list, only those fields are downloaded, through the file's index. For developers and AI agents.",
    "version": "0.1",
    "x-build-id": "Y6o57DlvieST4zlak"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jumblemog~grib-netcdf-reader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jumblemog-grib-netcdf-reader",
        "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/jumblemog~grib-netcdf-reader/runs": {
      "post": {
        "operationId": "runs-sync-jumblemog-grib-netcdf-reader",
        "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/jumblemog~grib-netcdf-reader/run-sync": {
      "post": {
        "operationId": "run-sync-jumblemog-grib-netcdf-reader",
        "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": {
          "files": {
            "title": "Links to GRIB or NetCDF files",
            "type": "array",
            "description": "Direct links to .grib2, .grib, .nc or .nc4 files (gzip, bzip2 and ZIP work too): NOAA and ECMWF open data, AWS, Google Cloud and Azure buckets, THREDDS file servers, Google Drive, Dropbox, GitHub. Write {fh} or {fh:03d} in a link and set forecastHours to read a whole run, such as ...gfs.t00z.pgrb2.0p25.f{fh:03d}. Write example for three built-in GFS files. Up to 400 files per run.",
            "items": {
              "type": "string"
            }
          },
          "upload": {
            "title": "Or upload a file",
            "type": "string",
            "description": "A GRIB or NetCDF file from your computer, read together with any links."
          },
          "forecastHours": {
            "title": "Forecast hours for {fh} in links",
            "type": "string",
            "description": "Fills {fh}, {fh:02d} or {fh:03d} in the links: 0-48/6 is every 6 hours up to 48; 0-120/3, 126-240/6 or a plain list such as 0, 12, 24 work too."
          },
          "variables": {
            "title": "Variables",
            "type": "array",
            "description": "Which fields to read; all when empty. A name such as TMP, 2t, t2m, msl or tas; a GRIB index line part such as TMP:2 m above ground or APCP:surface; key=value pairs such as param=t levelist=850; or re: and a regular expression. For GRIB links with a .idx or .index file next to them (NOAA, ECMWF open data), only these fields are downloaded.",
            "items": {
              "type": "string"
            }
          },
          "levels": {
            "title": "Levels",
            "type": "array",
            "description": "Keep only these levels, such as 850 (hPa), 2 m above ground or surface; all when empty.",
            "items": {
              "type": "string"
            }
          },
          "timeFrom": {
            "title": "From (valid time)",
            "type": "string",
            "description": "Keep times from this one on, in UTC: 2026-11-18 or 2026-11-18T06:00."
          },
          "timeTo": {
            "title": "Until (valid time)",
            "type": "string",
            "description": "Keep times up to this one, in UTC."
          },
          "points": {
            "title": "Points",
            "type": "array",
            "description": "Places to read values at, one per line: London: 51.507, -0.128, or 51.5N 0.13W, or lat 51.5, lon -0.13. Latitude first. Up to 1,000. With points, the dataset holds one row per point, variable and time; without, one item per file.",
            "items": {
              "type": "string"
            }
          },
          "interpolation": {
            "title": "Values at points",
            "enum": [
              "nearest",
              "bilinear"
            ],
            "type": "string",
            "description": "Nearest gives the value of the closest grid cell (and says how far it is); bilinear interpolates between the four around the point.",
            "default": "nearest"
          },
          "area": {
            "title": "Area",
            "type": "string",
            "description": "Cut maps, statistics and exports to an area: a name (europe, conus, japan, uk, australia, pacific ...), lat 35 to 72, lon -25 to 45, or west, south, east, north as in GeoJSON: -25, 35, 45, 72. Areas may cross the date line. The whole grid when empty."
          },
          "units": {
            "title": "Units",
            "enum": [
              "metric",
              "imperial",
              "original"
            ],
            "type": "string",
            "description": "Temperatures, pressures, rain and wind converted for reading; other variables keep the file's units.",
            "default": "metric"
          },
          "maps": {
            "title": "Maps",
            "enum": [
              "first",
              "all",
              "none"
            ],
            "type": "string",
            "description": "PNG maps with coastlines, borders, a colour scale and isobars on pressure maps.",
            "default": "first"
          },
          "maxMaps": {
            "title": "Most maps",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "Stop drawing after this many maps.",
            "default": 20
          },
          "imageWidth": {
            "title": "Map width (pixels)",
            "minimum": 600,
            "maximum": 4000,
            "type": "integer",
            "description": "Width of the map pictures.",
            "default": 1600
          },
          "stats": {
            "title": "Statistics",
            "type": "boolean",
            "description": "Minimum, maximum (with where they are) and area-weighted mean of each variable at each time, over the area or the whole grid.",
            "default": true
          },
          "netcdf": {
            "title": "NetCDF copy of the selection",
            "type": "boolean",
            "description": "A compressed NetCDF file per input file with the variables, levels, times and area picked, in the units chosen. Handy for turning GRIB into NetCDF.",
            "default": false
          },
          "gridCsv": {
            "title": "Every grid cell as CSV",
            "type": "boolean",
            "description": "A CSV with one row per grid cell, variable and time (lat, lon, value), for the area. Use an area: a global 0.25° grid is a million rows per field.",
            "default": false
          },
          "maxGridRows": {
            "title": "Most rows in the grid CSV",
            "minimum": 1,
            "maximum": 5000000,
            "type": "integer",
            "description": "The grid CSV stops at this many rows.",
            "default": 1000000
          },
          "windFromComponents": {
            "title": "Wind speed and direction from u and v",
            "type": "boolean",
            "description": "Adds wind speed and direction (where it blows from, degrees from north) for each pair of u and v components. Winds relative to a projected grid (HRRR, NAM) are turned to north first.",
            "default": true
          },
          "maxDatasetRows": {
            "title": "Most rows in the dataset",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "Values at points beyond this go to values.csv only (which holds up to a million).",
            "default": 100000
          },
          "timeLimitSeconds": {
            "title": "Time limit (seconds)",
            "minimum": 10,
            "maximum": 3300,
            "type": "integer",
            "description": "Downloading and reading stop after this long; what was read is kept. Each file is billed for its own reading time.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}