{
  "openapi": "3.0.1",
  "info": {
    "title": "Satellite Imagery Search API: Archive Scenes, Prices, Orders",
    "description": "Satellite imagery search API on your own SkyWatch EarthCache account: find archive scenes over a GeoJSON area with cloud cover, resolution, coverage and cost, quote archive or tasking prices, list imagery offerings and read your orders and their status. Never places orders. Bring your own key.",
    "version": "0.1",
    "x-build-id": "YjUVYLn8gHnb8XNMt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~satellite-imagery-search-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-satellite-imagery-search-api",
        "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/nabeelbaghoor~satellite-imagery-search-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-satellite-imagery-search-api",
        "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/nabeelbaghoor~satellite-imagery-search-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-satellite-imagery-search-api",
        "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": {
          "mode": {
            "title": "What to get",
            "enum": [
              "archiveSearch",
              "priceQuote",
              "listOrders",
              "orderDetails",
              "intervalResults",
              "offerings",
              "savedLocations"
            ],
            "type": "string",
            "description": "Archive search finds existing satellite scenes over your area with cloud cover, resolution, coverage and cost. Price quote prices an area per resolution category for archive or tasking (future capture), optionally with the probability of collection. Order list, Order details and Order interval results read the orders already on your account and their status. Imagery offerings lists partner products and offering IDs. Saved locations lists the areas saved on your account. Nothing in any mode places an order or spends money.",
            "default": "archiveSearch"
          },
          "aoi": {
            "title": "Area of interest (GeoJSON Polygon)",
            "type": "object",
            "description": "Archive search and Price quote need it; Imagery offerings uses it when set to find offerings that cover the area. One GeoJSON Polygon in WGS84 longitude, latitude order, with no holes and at most 500 vertices. A Feature or FeatureCollection holding a Polygon also works (first feature only). Archive orders need more than 1 square km."
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Archive search and Price quote. First capture date, YYYY-MM-DD. Archive search defaults to 90 days before the end date. Use past dates for archive and future dates for tasking."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Archive search and Price quote. Last capture date, YYYY-MM-DD. Archive search defaults to today."
          },
          "resolutions": {
            "title": "Resolution categories",
            "type": "array",
            "description": "Archive search searches all chosen categories at once. Price quote returns one quote per category. Low covers free Sentinel-2 data.",
            "items": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high",
                "very_high"
              ],
              "enumTitles": [
                "Low (8 to 30 m, e.g. Sentinel-2)",
                "Medium (1.26 to 8 m, e.g. SPOT)",
                "High (0.5 to 1.25 m, e.g. Pleiades, SkySat)",
                "Very high (under 0.5 m)"
              ]
            },
            "default": [
              "low"
            ]
          },
          "minCoverage": {
            "title": "Minimum coverage of area (%)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Archive search only. Keep scenes that cover at least this percentage of your area."
          },
          "orderBy": {
            "title": "Sort scenes by",
            "enum": [
              "date",
              "-date",
              "cost",
              "-cost",
              "coverage",
              "-coverage",
              "resolution",
              "-resolution"
            ],
            "type": "string",
            "description": "Archive search only. Leave empty for the API's own order."
          },
          "offNadirMin": {
            "title": "Minimum off-nadir angle",
            "minimum": -90,
            "maximum": 90,
            "type": "integer",
            "description": "Archive search only. Degrees, -90 to 90. Set with the maximum to limit how obliquely a scene was captured."
          },
          "offNadirMax": {
            "title": "Maximum off-nadir angle",
            "minimum": -90,
            "maximum": 90,
            "type": "integer",
            "description": "Archive search only. Degrees, -90 to 90, for example 30 with a minimum of -30."
          },
          "pollTimeoutSeconds": {
            "title": "Wait for search results (seconds)",
            "minimum": 30,
            "maximum": 900,
            "type": "integer",
            "description": "Archive search only. SkyWatch prepares results asynchronously; the run asks every 5 seconds for up to this long.",
            "default": 180
          },
          "interval": {
            "title": "Collection interval",
            "type": "string",
            "description": "Price quote only. Days per collection interval, such as 30d (1 to 999 days). Leave empty for one interval over the whole date range."
          },
          "tasking": {
            "title": "Tasking quote",
            "type": "boolean",
            "description": "Price quote only. Price a tasking (future capture) request instead of archive data.",
            "default": false
          },
          "includeProbability": {
            "title": "Include probability of collection",
            "type": "boolean",
            "description": "Price quote with Tasking quote only. Adds the probability that each future interval will be collected, from the pipeline calculator. Still only a quote: nothing is ordered.",
            "default": false
          },
          "source": {
            "title": "Data source",
            "type": "string",
            "description": "Price quote only. Optional source name to price, as Archive search returns it in the source column."
          },
          "orderIds": {
            "title": "Order IDs",
            "type": "array",
            "description": "Order details needs at least one. Order interval results reads only these orders when set, and every order otherwise. One order (pipeline) ID per line, as the Order list mode returns it, up to 500.",
            "items": {
              "type": "string"
            }
          },
          "sort": {
            "title": "Sort by creation date",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Order list, Order interval results and Saved locations.",
            "default": "desc"
          },
          "offeringType": {
            "title": "Offering type",
            "enum": [
              "archive",
              "tasking"
            ],
            "type": "string",
            "description": "Imagery offerings only. Archive (existing imagery) or tasking (future capture) offerings.",
            "default": "archive"
          },
          "partnerName": {
            "title": "Partner name",
            "type": "string",
            "description": "Imagery offerings only. Keep offerings from this provider, for example Airbus or Planet."
          },
          "productName": {
            "title": "Product name",
            "type": "string",
            "description": "Imagery offerings only. Keep offerings of this product name."
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The most rows this run returns and charges for. Paging stops here.",
            "default": 100
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own SkyWatch EarthCache API key, copied from your account settings in SkyWatch Hub. Stored as a secret, sent only to api.skywatch.co in the x-api-key header, and never logged. You can instead set the DATA_API_KEY environment secret."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}