{
  "openapi": "3.0.1",
  "info": {
    "title": "Aerial Imagery API - Coverage, AI Roof and Property Data",
    "description": "Find every aerial capture over a location with its date and resolution, then read what the provider's AI found in it: roofs with material, pitch and condition, buildings with heights, solar panels, pools, trees and surfaces, each with its area and confidence, plus one-row aggregate rollups.",
    "version": "0.1",
    "x-build-id": "Sbs2bSerMHO1sSDsu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~aerial-imagery-ai-data-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-aerial-imagery-ai-data-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~aerial-imagery-ai-data-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-aerial-imagery-ai-data-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~aerial-imagery-ai-data-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-aerial-imagery-ai-data-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 do",
            "enum": [
              "coverage",
              "transaction",
              "aiFeatures",
              "aiRollups",
              "aiCoverage",
              "aiClasses",
              "aiPacks"
            ],
            "type": "string",
            "description": "Coverage lists the aerial captures over a location with their dates and resolution. Transaction checks what content is available for an address, free in preview. AI features returns each detected feature with its area and confidence. AI rollups returns the same information already aggregated into one value per measure. AI coverage says which AI resources exist over a location. Class and pack catalogues say what this account may ask for.",
            "default": "coverage"
          },
          "points": {
            "title": "Points",
            "type": "array",
            "description": "One \"latitude,longitude\" pair per line, in that order. The provider's own paths take longitude first and a swapped pair returns a real location somewhere else in the world rather than an error, so the order is fixed for you here.",
            "items": {
              "type": "string"
            }
          },
          "polygons": {
            "title": "Polygons",
            "type": "array",
            "description": "One area of interest per line, as a comma separated list of longitude and latitude values where the first and last point are the same. Used by the coverage and AI modes.",
            "items": {
              "type": "string"
            }
          },
          "addresses": {
            "title": "Addresses",
            "type": "array",
            "description": "One full street address per line, written as \"street, city, state, zip\". The AI endpoints geocode from separate street, city, state and ZIP parameters rather than from one string, so the line is split for you; a line that cannot be split is reported rather than sent as a street that will not match.",
            "items": {
              "type": "string"
            }
          },
          "since": {
            "title": "Captured since",
            "type": "string",
            "description": "Only consider captures on or after this date, as YYYY-MM-DD. The coverage endpoints also accept a relative form such as 5M for five months ago."
          },
          "until": {
            "title": "Captured until",
            "type": "string",
            "description": "Only consider captures on or before this date, as YYYY-MM-DD, or a relative form such as 1Y."
          },
          "order": {
            "title": "Which survey to use",
            "enum": [
              "",
              "latest",
              "earliest"
            ],
            "type": "string",
            "description": "When several surveys match the date range, which one the AI endpoints read from. Latest is usually what you want; earliest is how you look at a property before a known event.",
            "default": ""
          },
          "resourceTypes": {
            "title": "Resource types",
            "type": "string",
            "description": "Comma separated resource types to consider, written as class or class:type. For example photos,tiles:Vert,tiles:North for coverage, or raster:Vert for a transactional request. Leave empty on coverage for everything the account can see."
          },
          "surveyLimit": {
            "title": "Surveys per location",
            "type": "integer",
            "description": "How many survey records the provider returns per location. Transactional requests cap this at 1000."
          },
          "sortBy": {
            "title": "Sort surveys by",
            "type": "string",
            "description": "Which field to order surveys by, with a leading minus for descending. For example -captureDate for newest first. Defaults to capture date descending."
          },
          "overlap": {
            "title": "Partial coverage",
            "enum": [
              "",
              "full",
              "all"
            ],
            "type": "string",
            "description": "Whether to include imagery that only partly covers the requested area. Full returns only imagery covering the whole of it, which is what you want when a partial image would be useless.",
            "default": ""
          },
          "includeTags": {
            "title": "Include tags",
            "type": "string",
            "description": "Comma separated tag queries a capture must match at least one of, written as type:name. For example disaster:flood,disaster:hurricane to find post-catastrophe flights."
          },
          "excludeTags": {
            "title": "Exclude tags",
            "type": "string",
            "description": "Comma separated tag queries that exclude a capture, written as type:name."
          },
          "dates": {
            "title": "Transaction dates",
            "enum": [
              "single",
              "all"
            ],
            "type": "string",
            "description": "Whether a transactional request covers every available date or a single one per resource type. Single is the cheaper question.",
            "default": "single"
          },
          "spendCredits": {
            "title": "Spend credits on transactions",
            "type": "boolean",
            "description": "Off by default, which sends the request in preview: the same coverage comes back free and without a transaction token. Turn this on only when you actually want the token that unlocks the content, because that is the call that charges your balance. Every row records what it cost.",
            "default": false
          },
          "resourceFilter": {
            "title": "Resource matching",
            "type": "string",
            "description": "Whether a transactional request matches surveys carrying all of the listed resource types or at least one of them. Accepts allTypes or anyTypes."
          },
          "packs": {
            "title": "AI packs",
            "type": "string",
            "description": "Comma separated AI pack names to request, for example building,roof_char,surfaces. Leave empty for everything the account holds. Run the pack catalogue mode to see what that is."
          },
          "classes": {
            "title": "AI feature classes",
            "type": "string",
            "description": "Comma separated feature class IDs to keep, filtering out everything else. Run the class catalogue mode to see which IDs this account may request."
          },
          "includeSupplementary": {
            "title": "Supplementary data",
            "type": "string",
            "description": "Comma separated supplementary datasets to add to the response, for example roofSpotlightIndex. These are add-ons on top of the base features rather than part of them."
          },
          "includeAttributes": {
            "title": "Include a row per attribute",
            "type": "boolean",
            "description": "Emit a row for each attribute on each feature, and for each component inside it. A roof's material attribute breaks into the area, ratio and confidence of every material found on it, with one marked dominant. Collapsing that onto the feature row keeps the dominant material and loses the mix.",
            "default": false
          },
          "parcelMode": {
            "title": "Treat the area as a parcel",
            "type": "boolean",
            "description": "Treat the requested area as a parcel boundary, which makes the provider mark which features belong to the parcel and return their clipped geometry. Useful when a roof crosses the boundary.",
            "default": false
          },
          "bulk": {
            "title": "Bulk request",
            "type": "boolean",
            "description": "Tell the provider this request belongs to a large batch, which exempts it from interactive rate limiting. It does not change the answer or the page size, only how the request is throttled.",
            "default": false
          },
          "includeAlphaClasses": {
            "title": "Include alpha classes",
            "type": "boolean",
            "description": "Include feature classes the provider marks as alpha. These are experimental and their definitions can change.",
            "default": false
          },
          "includeBetaClasses": {
            "title": "Include beta classes",
            "type": "boolean",
            "description": "Include feature classes the provider marks as beta.",
            "default": false
          },
          "use3dCoverage": {
            "title": "Use 3D coverage boundary",
            "type": "boolean",
            "description": "Pick the survey resource using the 3D attribute coverage boundary rather than the ordinary one. Relevant when you need roof pitch or building height, which only exist where 3D coverage does.",
            "default": false
          },
          "excludePartialResources": {
            "title": "Exclude partial resources",
            "type": "boolean",
            "description": "Skip survey resources that only have predictions over part of their area. Worth switching on when an absent feature has to mean absent rather than not analysed.",
            "default": false
          },
          "postCatastrophe": {
            "title": "Post-catastrophe imagery",
            "enum": [
              "",
              "true",
              "false",
              "any"
            ],
            "type": "string",
            "description": "Whether to use only imagery flown after a catastrophe, only imagery flown before one, or either. Choosing deliberately matters when you are comparing a property to its pre-event state.",
            "default": ""
          },
          "systemVersion": {
            "title": "AI system version",
            "type": "string",
            "description": "Pin the request to one AI system version, so results stay comparable across runs as the models change."
          },
          "systemVersionPrefix": {
            "title": "AI system version prefix",
            "type": "string",
            "description": "Pin the request to a family of AI system versions by prefix rather than to one exact version."
          },
          "country": {
            "title": "Country",
            "enum": [
              "",
              "US",
              "AU"
            ],
            "type": "string",
            "description": "Two letter country code for geocoded requests. The AI geocoder supports US and AU.",
            "default": ""
          },
          "reference": {
            "title": "Your reference",
            "type": "string",
            "description": "An opaque string echoed back on every AI response, for example a policy or job number. Useful for tying rows back to whatever prompted the lookup."
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Your own account key, created in your account rather than through an API call. Sent in an Authorization header whose scheme is spelled \"Apikey\" with a capital A and nothing else capitalised, which the provider treats as case significant. Stored encrypted and never written into the dataset. Can also be supplied as the DATA_API_KEY environment secret."
          },
          "maxResults": {
            "title": "Maximum rows",
            "type": "integer",
            "description": "Stop after this many rows. Counts every row: surveys, features, attributes, rollups and catalogue entries alike.",
            "default": 100
          },
          "requestsPerMinute": {
            "title": "Requests per minute",
            "type": "integer",
            "description": "How fast to call the provider. Lower this if your plan's rate limit is being hit, or switch on bulk mode for a large batch.",
            "default": 60
          },
          "baseUrl": {
            "title": "API host",
            "type": "string",
            "description": "Overrides the host the API is called on. Leave empty unless the provider has given you a different one."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}