{
  "openapi": "3.0.1",
  "info": {
    "title": "STAC Catalog Extractor",
    "description": "Point at ANY STAC API — Earth Search, Planetary Computer, USGS & 100s of public satellite/EO catalogs. Search items by bbox/datetime/collection/cloud-cover or list collections; auto-paginate to flat rows + raw GeoJSON. Pay per item.",
    "version": "0.1",
    "x-build-id": "rOPHiicUs8yKNiE7e"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~stac-catalog-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-stac-catalog-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~stac-catalog-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-stac-catalog-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~stac-catalog-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-stac-catalog-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": [
          "stacRoot"
        ],
        "properties": {
          "stacRoot": {
            "title": "STAC API root URL",
            "type": "string",
            "description": "The root URL of ANY STAC API (SpatioTemporal Asset Catalog). Examples: https://earth-search.aws.element84.com/v1 (Element84 / AWS open data), https://planetarycomputer.microsoft.com/api/stac/v1 (Microsoft Planetary Computer), https://landsatlook.usgs.gov/stac-server (USGS). Do NOT include /search or /collections — just the API root."
          },
          "collections": {
            "title": "Collections",
            "type": "array",
            "description": "Collection id(s) to search, e.g. sentinel-2-l2a, landsat-c2-l2, sentinel-1-grd. Leave EMPTY together with the other search filters to run in discovery mode (list every collection the catalog exposes). Turn on \"List collections only\" below to just browse what's available first.",
            "items": {
              "type": "string"
            }
          },
          "listCollectionsOnly": {
            "title": "List collections only (discovery)",
            "type": "boolean",
            "description": "When on, the actor only reads {stacRoot}/collections and returns one row per available collection (id, title, license, spatial/temporal extent, search URL) — it does NOT search any items. Use this to discover what a catalog exposes, then set Collections + a bbox/datetime to extract items.",
            "default": false
          },
          "bbox": {
            "title": "Bounding box (bbox)",
            "type": "array",
            "description": "Spatial filter as [west, south, east, north] in WGS84 decimal degrees (a 6-number [w,s,minZ,e,n,maxZ] 3D box is also accepted). Example for the San Francisco Bay Area: [-122.6, 37.6, -122.2, 37.9]. Leave empty for no spatial filter."
          },
          "datetime": {
            "title": "Date/time window",
            "type": "string",
            "description": "Temporal filter in RFC 3339. A single instant (2024-06-15T00:00:00Z), a closed range (2024-06-01T00:00:00Z/2024-06-30T23:59:59Z), or an open range using \"..\" (2024-06-01T00:00:00Z/.. or ../2024-06-30T00:00:00Z). Leave empty for no time filter."
          },
          "ids": {
            "title": "Item IDs",
            "type": "array",
            "description": "Fetch specific STAC Item id(s) directly (e.g. S2B_10SEG_20240627_0_L2A). When set, this narrows the search to exactly these items. Leave empty to search by the filters above.",
            "items": {
              "type": "string"
            }
          },
          "query": {
            "title": "Property query (STAC query extension)",
            "type": "object",
            "description": "Property filters using the STAC `query` extension, as a JSON object of {property: {op: value}}. Example to keep only low-cloud scenes: {\"eo:cloud_cover\": {\"lt\": 20}}. Supported ops depend on the server (eq, neq, lt, lte, gt, gte, in, startsWith …). Leave empty for none."
          },
          "filter": {
            "title": "CQL2 filter (STAC filter extension)",
            "type": "object",
            "description": "Advanced filter using the STAC `filter` extension in CQL2-JSON, as a JSON object. Example: {\"op\":\"<\",\"args\":[{\"property\":\"eo:cloud_cover\"},20]}. Only supported on servers that advertise the filter conformance class; use the simpler Property query above when unsure. Leave empty for none."
          },
          "filterLang": {
            "title": "Filter language",
            "type": "string",
            "description": "Language for the CQL2 filter above. Usually cql2-json (the default). Only change if the target server requires cql2-text.",
            "default": "cql2-json"
          },
          "intersects": {
            "title": "Intersects geometry (GeoJSON)",
            "type": "object",
            "description": "Spatial filter as a GeoJSON geometry object (Point, Polygon, etc.) — an alternative to the bounding box for non-rectangular areas of interest. Example: {\"type\":\"Point\",\"coordinates\":[-122.4,37.8]}. Leave empty to use the bbox instead."
          },
          "sortby": {
            "title": "Sort by",
            "type": "string",
            "description": "Sort order (STAC `sort` extension), e.g. -properties.datetime for newest first, or +properties.eo:cloud_cover for least-cloudy first. Only honored by servers that advertise the sort conformance class. Leave empty for the server default order."
          },
          "limit": {
            "title": "Page size",
            "minimum": 1,
            "type": "integer",
            "description": "Server-side page size requested per /search call (the actor auto-follows the rel=\"next\" link regardless). Most servers cap this around 100–1000. Leave at the default unless you have a reason to change it.",
            "default": 100
          },
          "maxResults": {
            "title": "Max results (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total number of items to pull across all pages (the actor auto-paginates until this cap or the result set is exhausted). Each returned item is one billable event. Default 25.",
            "default": 25
          },
          "bearerToken": {
            "title": "Bearer token (optional)",
            "type": "string",
            "description": "Optional OAuth2 bearer token for gated STAC deployments. Sent as Authorization: Bearer ***. NOT required for public catalogs (Earth Search, Planetary Computer, USGS) — 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. {\"Ocp-Apim-Subscription-Key\": \"...\"} for a gated deployment. Leave empty for public catalogs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}