{
  "openapi": "3.0.1",
  "info": {
    "title": "Floor Plan Takeoff: PDF Room Areas, Wall LF & Door Counts",
    "description": "Construction takeoff from vector floor-plan PDFs: room square footage and perimeters, wall linear feet by thickness, door counts and a room overlay PNG per sheet. Scale self-check against printed dimensions. $2.50 per measured sheet; failed sheets are free.",
    "version": "0.1",
    "x-build-id": "ICnvNpZgpZUMiKq7T"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hanielazevedo~floor-plan-takeoff/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hanielazevedo-floor-plan-takeoff",
        "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/hanielazevedo~floor-plan-takeoff/runs": {
      "post": {
        "operationId": "runs-sync-hanielazevedo-floor-plan-takeoff",
        "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/hanielazevedo~floor-plan-takeoff/run-sync": {
      "post": {
        "operationId": "run-sync-hanielazevedo-floor-plan-takeoff",
        "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": {
          "pdfUrls": {
            "title": "PDF URLs (public)",
            "type": "array",
            "description": "Public http(s) links to vector PDF drawing sets (CAD/Revit/Bluebeam exports, not scans). To use your own files from Apify Console, put them in a key-value store and select it in \"PDF key-value store\" below: this Actor runs with limited permissions and cannot read a store you have not selected. Leave both empty to measure the bundled public-domain sample (USDA Forest Service building diagrams, page 5, 1/4\"=1'-0\").",
            "items": {
              "type": "string"
            }
          },
          "pdfStore": {
            "title": "PDF key-value store",
            "type": "string",
            "description": "Your Apify key-value store that holds the PDFs (upload them in Console > Storage > Key-value stores). Selecting it grants this run read-only access to that one store. Without record keys, every record whose key ends in \".pdf\" is measured."
          },
          "pdfKeys": {
            "title": "PDF record keys",
            "type": "array",
            "description": "Optional. Keys of the PDF records in the selected store, e.g. \"A-101.pdf\". Leave empty to use every \"*.pdf\" record.",
            "items": {
              "type": "string"
            }
          },
          "pages": {
            "title": "Pages",
            "type": "string",
            "description": "1-based pages to measure in every PDF: \"1\", \"1,3,5\", \"2-6\", \"4-end\" or \"all\". Each measured page = one sheet. Default: 1 (page 5 for the sample)."
          },
          "scale": {
            "title": "Drawing scale (paper inches per foot)",
            "type": "string",
            "description": "The printed plan scale, as paper inches per real foot: \"1/4\" means 1/4\"=1'-0\" (also accepted: \"1/8\", \"3/32\", \"3/16\", \"0.125\", \"1/4\\\"=1'-0\\\"\", \"1:48\", engineering \"1\\\" = 20'\"). The engine cross-checks it against the printed dimension strings and warns on a mismatch. Default 1/4 (sample only; set yours)."
          },
          "profile": {
            "title": "Drawing profile",
            "enum": [
              "auto",
              "cad-fills",
              "cad-strokes",
              "cad-wall-layers",
              "residential-tower",
              "school-institutional",
              "fire-station",
              "dental-medical",
              "residential-single-family",
              "residential-renovation",
              "residential-multifamily",
              "residential-duplicated-sheet"
            ],
            "type": "string",
            "description": "How the plan was drafted. Auto probes the PDF (CAD fills vs live strokes vs named wall layers) and is right for most sets. Building-type profiles are tuned presets.",
            "default": "auto"
          },
          "overlayImage": {
            "title": "Save overlay PNG",
            "type": "boolean",
            "description": "Save a color overlay of the detected rooms (labelled with roomId) per sheet to the key-value store; the dataset row links to it.",
            "default": true
          },
          "wallHeightFt": {
            "title": "Wall height (ft)",
            "minimum": 1,
            "maximum": 60,
            "type": "number",
            "description": "Finished wall height used for wall-surface SF and per-room assembly quantities (paint, base).",
            "default": 9
          },
          "maxSheets": {
            "title": "Max sheets per run",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Safety cap on the number of sheets measured in one run.",
            "default": 50
          },
          "maxFileSizeMb": {
            "title": "Max PDF size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger downloads are rejected.",
            "default": 100
          },
          "sheetTimeoutSecs": {
            "title": "Per-sheet time limit (s)",
            "minimum": 30,
            "maximum": 1800,
            "type": "integer",
            "description": "A sheet that takes longer is reported as ENGINE_ERROR (not charged) and the run continues.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}