{
  "openapi": "3.0.1",
  "info": {
    "title": "OGC EDR Extractor",
    "description": "Point at ANY OGC API - EDR (Environmental Data Retrieval) service — Met Office, FMI, pygeoapi. List collections, then query environmental data by position, area, radius, trajectory, or cube. Flattens CoverageJSON / GeoJSON to rows (parameter, value, unit, lon/lat, time). Pay per record.",
    "version": "0.1",
    "x-build-id": "z7gKT1aWbNuT28dDz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~ogc-edr-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-ogc-edr-extractor",
        "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/datamule~ogc-edr-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-ogc-edr-extractor",
        "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/datamule~ogc-edr-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-ogc-edr-extractor",
        "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",
        "required": [
          "baseUrl"
        ],
        "properties": {
          "baseUrl": {
            "title": "EDR service root URL",
            "type": "string",
            "description": "The root URL of ANY OGC API - EDR (Environmental Data Retrieval) service. Examples: https://demo.pygeoapi.io/master (pygeoapi reference server), https://labs.metoffice.gov.uk/edr (UK Met Office, 26 collections), https://opendata.fmi.fi/edr (Finnish Meteorological Institute, 47 collections incl. ECMWF). Do NOT include /collections — just the EDR service root."
          },
          "collectionId": {
            "title": "Collection id",
            "type": "string",
            "description": "The collection to query, e.g. icoads-sst (pygeoapi) or global_pop_density (Met Office). Leave EMPTY to run in discovery mode — list every EDR collection the service exposes with its supported query types, parameters and spatial/temporal extent. Read the discovery output first to pick a real collection id + a query type it supports."
          },
          "listCollectionsOnly": {
            "title": "List collections only (discovery)",
            "type": "boolean",
            "description": "When on, the actor only reads {baseUrl}/collections and returns one row per available EDR collection (id, title, supported queryTypes, parameterNames, spatial/temporal extent, CRS) — it does NOT run any query. Use this to discover what a service exposes, then set a Collection id + Query type to extract data.",
            "default": false
          },
          "queryType": {
            "title": "Query type",
            "enum": [
              "position",
              "area",
              "radius",
              "trajectory",
              "corridor",
              "cube",
              "locations",
              "items",
              "instances"
            ],
            "type": "string",
            "description": "The EDR query family to run against the chosen collection. Only the types a collection advertises in its data_queries are valid (the actor validates this and tells you what's supported). position = value(s) at a point; area = within a polygon; radius = within a circle; trajectory/corridor = along a path; cube = within a bounding box + time; locations = named locations (often returns GeoJSON); items = the collection's item index.",
            "default": "position"
          },
          "coords": {
            "title": "Coordinates (WKT)",
            "type": "string",
            "description": "The query geometry as a Well-Known-Text (WKT) string in WGS84 lon/lat. position: POINT(-30 40). area: POLYGON((-40 30,-20 30,-20 50,-40 50,-40 30)). trajectory: LINESTRING(-30 40,-25 42,-20 45). Required for position/area/radius/trajectory/corridor. Ignored for cube (use Bounding box) and for a specific locations query (use Location id)."
          },
          "bbox": {
            "title": "Bounding box (cube)",
            "type": "array",
            "description": "Bounding box for a cube query as [west, south, east, north] in WGS84 decimal degrees, e.g. [-35, 38, -25, 44]. Used by the cube query type; leave empty for other query types."
          },
          "datetime": {
            "title": "Date/time window",
            "type": "string",
            "description": "Temporal filter in RFC 3339. A single instant (2000-06-16T06:00:00Z), a closed range (2000-06-01T00:00:00Z/2000-06-30T23:59:59Z), or an open range with \"..\" (2000-06-01T00:00:00Z/.. or ../2000-06-30T00:00:00Z). Must fall within the collection's temporal extent (visible in discovery mode). Leave empty to let the server return its full time series for the location."
          },
          "parameterNames": {
            "title": "Parameter names",
            "type": "array",
            "description": "The parameter(s) to retrieve, e.g. SST, AIRT (visible per-collection in discovery mode under parameterNames). Sent as the EDR parameter-name filter. Leave empty to return every parameter the collection offers.",
            "items": {
              "type": "string"
            }
          },
          "z": {
            "title": "Vertical level (z)",
            "type": "string",
            "description": "Optional vertical coordinate / level for collections with a vertical dimension (pressure level, depth, height), e.g. 850 or a range 100/500. Leave empty for surface/2D collections."
          },
          "locationId": {
            "title": "Location id (locations query)",
            "type": "string",
            "description": "For a locations query: the id of a specific named location to retrieve (GET .../locations/{locationId}). Leave empty with queryType=locations to list every named location the collection offers."
          },
          "within": {
            "title": "Radius distance (radius query)",
            "type": "string",
            "description": "For a radius query: the radius distance from the point, e.g. 100. Pair with Radius units."
          },
          "withinUnits": {
            "title": "Radius units (radius query)",
            "type": "string",
            "description": "For a radius query: the units of the radius distance, e.g. km or mi (must be a unit the collection advertises)."
          },
          "maxRecords": {
            "title": "Max records (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total number of records to emit (observations in query mode, collections in discovery mode). Each returned record is one billable event. Default 25.",
            "default": 25
          },
          "queryParams": {
            "title": "Extra query parameters",
            "type": "object",
            "description": "Arbitrary extra query-string parameters appended to the query request, as a JSON object — a generic passthrough for provider-specific keys. The reserved keys coords/bbox/datetime/z/parameter-name/crs/f/limit are managed by the actor and ignored here. Leave empty for none."
          },
          "bearerToken": {
            "title": "Bearer token (optional)",
            "type": "string",
            "description": "Optional OAuth2 bearer token for key-gated EDR services. Sent as Authorization: Bearer ***. NOT required for public services (pygeoapi, Met Office labs, FMI) — leave empty. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers to send with every request, as a JSON object, e.g. {\"apikey\": \"...\"} for a service that takes an API key in a header. Leave empty for public services."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}