{
  "openapi": "3.0.1",
  "info": {
    "title": "Roof Measurement API - Area, Pitch, Condition, Hail Risk",
    "description": "Measure any US property from aerial imagery: roof area, roofing squares, pitch, eave height, material, shape and estimated age, a five point condition rating with the ponding, rust, tarp and patching findings behind it, pools, trampolines, fences and debris, plus wildfire and hail risk scores.",
    "version": "0.1",
    "x-build-id": "7RSUZwUot2KopgckE"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nabeelbaghoor~roof-measurement-condition-api/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nabeelbaghoor-roof-measurement-condition-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~roof-measurement-condition-api/runs": {
      "post": {
        "operationId": "runs-sync-nabeelbaghoor-roof-measurement-condition-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~roof-measurement-condition-api/run-sync": {
      "post": {
        "operationId": "run-sync-nabeelbaghoor-roof-measurement-condition-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": [
              "propertyData",
              "propertySummary",
              "propertyAttributes",
              "imageryCaptures",
              "orthomosaicSearch"
            ],
            "type": "string",
            "description": "Property data reads one property in full: every structure, its roof measurements and condition, the hazards around it and the imagery behind them. Property summary reads the headline roof condition, material and solar panel presence for up to twenty addresses per call, which is the cheap way to screen a list. Property attributes reads the older near real time attributes service. Imagery captures ranks the aerial captures over a point, and orthomosaic search finds stitched imagery over an area.",
            "default": "propertyData"
          },
          "targets": {
            "title": "Addresses or coordinates",
            "type": "array",
            "description": "One subject per line. A full street address including city, state and ZIP, or a \"latitude,longitude\" pair in that order. A line of two numbers is read as coordinates and anything else as an address.",
            "items": {
              "type": "string"
            }
          },
          "street": {
            "title": "Street",
            "type": "string",
            "description": "Street line of a single structured address, used when the list above is empty. Pair it with the city, state and ZIP fields. A structured address geocodes more reliably than a single line when the address is unusual."
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City of the structured address."
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "Two letter state code of the structured address, for example NE."
          },
          "zip": {
            "title": "ZIP code",
            "type": "string",
            "description": "Postal code of the structured address."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Two letter country code of the structured address. Defaults to US.",
            "default": "US"
          },
          "productIds": {
            "title": "Data packs",
            "type": "array",
            "description": "Which licensed data packs to ask for. Leave empty to get whatever your application is already entitled to. Packs are licensed individually and a request naming one you do not hold is rejected whole rather than trimmed, so ask only for packs you have.",
            "items": {
              "type": "string",
              "enum": [
                "property_data_id_001",
                "property_data_id_002",
                "property_data_id_003",
                "property_data_id_004",
                "property_data_id_005",
                "property_data_id_006",
                "property_data_id_007",
                "property_data_id_008",
                "property_data_id_009"
              ],
              "enumTitles": [
                "Roof area estimate - roof area and squares",
                "Roof pitch and eave height",
                "Roof material and condition",
                "Roof age",
                "Property condition and details - pools, debris, hazards",
                "Risk and vulnerability scores - wildfire and hail",
                "Building outlines",
                "Property ortho imagery - top down",
                "Property oblique imagery - angled"
              ]
            }
          },
          "includeStructures": {
            "title": "Include a row per structure",
            "type": "boolean",
            "description": "Emit one row for each structure on the property, carrying its roof measurements, materials, condition sub-elements and the hazard zones around it. A property with a house, a garage and a shed produces three rows rather than one blended one.",
            "default": true
          },
          "includeImages": {
            "title": "Include a row per image",
            "type": "boolean",
            "description": "Emit one row for each aerial image behind the analysis, with its token, view, capture date, cardinal direction and a download link. Off by default because the rows are metadata about pictures rather than property data.",
            "default": false
          },
          "polygonWkt": {
            "title": "Polygon (well known text)",
            "type": "string",
            "description": "An area of interest for the imagery modes, written as WKT in EPSG:4326, for example POLYGON((-95.98608 41.25056, -95.98608 41.2502, -95.98555 41.2502, -95.98555 41.25056, -95.98608 41.25056)). Takes precedence over the coordinates above."
          },
          "radiusMeters": {
            "title": "Radius in metres",
            "type": "integer",
            "description": "How far around the point to search in the imagery modes. Capture ranking is capped by the provider at 75 metres and larger values are clamped to it; orthomosaic search has no such cap and defaults to 100."
          },
          "maxImagesPerView": {
            "title": "Images per view",
            "type": "integer",
            "description": "How many images to return for each view in capture ranking. The provider defaults to one, which is the best image for that view."
          },
          "maxGsdMeters": {
            "title": "Maximum ground sample distance",
            "type": "number",
            "description": "Only consider imagery at or below this ground sample distance in metres per pixel. A smaller number is sharper imagery, for example 0.075."
          },
          "compositeRequirement": {
            "title": "Composite imagery",
            "enum": [
              "",
              "COMPOSITE_REQUIREMENT_EITHER",
              "COMPOSITE_REQUIREMENT_COMPOSITE_ONLY",
              "COMPOSITE_REQUIREMENT_SINGLE_ONLY"
            ],
            "type": "string",
            "description": "Composite images are stitched from several frames taken at different moments, so their capture time is approximate. Choose whether to accept them, require them or exclude them.",
            "default": ""
          },
          "capturedSince": {
            "title": "Captured since",
            "type": "string",
            "description": "Only consider imagery captured on or after this date, as YYYY-MM-DD."
          },
          "capturedUntil": {
            "title": "Captured until",
            "type": "string",
            "description": "Only consider imagery captured on or before this date, as YYYY-MM-DD."
          },
          "orthomosaicCategories": {
            "title": "Orthomosaic spectrum",
            "type": "array",
            "description": "Limit orthomosaic search to visible light imagery, near infrared imagery, or both. Leave empty for the provider's default.",
            "items": {
              "type": "string",
              "enum": [
                "ORTHOMOSAIC_CATEGORY_VISUAL",
                "ORTHOMOSAIC_CATEGORY_INFRARED"
              ],
              "enumTitles": [
                "Visual - visible light",
                "Infrared - near infrared"
              ]
            }
          },
          "orthomosaicLevels": {
            "title": "Orthomosaic positioning quality",
            "type": "array",
            "description": "Limit orthomosaic search by how the imagery was positioned. Georegistered is geographically placed, aerial triangulated is refined against matching points across images, and measured is anchored to surveyed ground control points. They differ in absolute accuracy, which matters if you measure off the image.",
            "items": {
              "type": "string",
              "enum": [
                "ORTHOMOSAIC_LEVEL_GEOREGISTERED",
                "ORTHOMOSAIC_LEVEL_ATED",
                "ORTHOMOSAIC_LEVEL_MEASURED"
              ],
              "enumTitles": [
                "Georegistered - geographically positioned",
                "Aerial triangulated - refined across images",
                "Measured - anchored to surveyed ground control"
              ]
            }
          },
          "spatialOperation": {
            "title": "How the area is matched",
            "enum": [
              "",
              "SPATIAL_OPERATION_INTERSECTS",
              "SPATIAL_OPERATION_CONTAINS"
            ],
            "type": "string",
            "description": "Intersects returns imagery that overlaps the area at all. Contains returns only imagery that covers the whole area, which is what you want when a partial image would be useless.",
            "default": ""
          },
          "pageSize": {
            "title": "Results per page",
            "type": "integer",
            "description": "How many orthomosaics the provider returns per page, between 1 and 100. Paging continues automatically until the row cap is reached.",
            "default": 10
          },
          "clientId": {
            "title": "Client ID",
            "type": "string",
            "description": "Your own application's client ID from the provider's developer portal. Access is a two part credential: this and the client secret are sent together, so one of the two being wrong looks exactly like both being wrong."
          },
          "clientSecret": {
            "title": "Client secret",
            "type": "string",
            "description": "Your own application's client secret from the provider's developer portal. Stored encrypted and never written into the dataset. Can also be supplied as the DATA_API_KEY environment secret."
          },
          "useSandbox": {
            "title": "Use the free sandbox",
            "type": "boolean",
            "description": "Call the provider's free sandbox instead of production. The sandbox mirrors production behaviour but only holds about 1.5 square miles of Omaha, Nebraska, so anything outside that area comes back empty. Useful for checking your credentials work before spending anything.",
            "default": false
          },
          "maxResults": {
            "title": "Maximum rows",
            "type": "integer",
            "description": "Stop after this many rows. Counts every row: properties, structures, images and imagery records 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.",
            "default": 60
          },
          "baseUrl": {
            "title": "Data host",
            "type": "string",
            "description": "Overrides the host the data endpoints are called on. Leave empty unless the provider has given you a different one."
          },
          "tokenBaseUrl": {
            "title": "Token host",
            "type": "string",
            "description": "Overrides the host the access token is minted on. Tokens always come from the production host, in sandbox and production alike, and it is a different host from the data endpoints by design, which is the most common cause of a 404 that looks like a bad credential. Leave empty unless the provider has given you a different one."
          },
          "legacyBaseUrl": {
            "title": "Attributes host",
            "type": "string",
            "description": "Overrides the host the older property attributes service is called on. It is a different host from the other data endpoints, and it is the one the sandbox actually moves. 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}