# Roof takeoff from construction drawings and specs

**Use case:** 

Fills a roof-takeoff schema from a roofing drawing set or spec PDF with a text layer: roof areas and eave, rake, ridge and valley lengths where the text states them, each flagged verificationRequired; roof system; assembly layers from deck up; penetrations and flashing; code citations with paragraph references. Hosted fast model on UFGS 07 31 13 Asphalt Shingles, a public-domain spec.

## Input

```json
{
  "urls": [
    "https://www.wbdg.org/FFC/DOD/UFGS/UFGS%2007%2031%2013.pdf"
  ],
  "schema": {
    "type": "object",
    "properties": {
      "specSection": {
        "type": "string",
        "description": "Specification section number and title, or the drawing set title, e.g. 07 31 13 Asphalt Shingles"
      },
      "roofSystem": {
        "type": "string",
        "description": "The roof system specified, in one line: covering, underlayment, deck, slope range, fastening, as the document states it"
      },
      "roofAreas": {
        "type": "array",
        "description": "Roof areas or planes with a quantity stated in the text (roof plan labels, area schedules, notes). Report only numbers written in the document; never compute from geometry. Empty when the document states no areas.",
        "items": {
          "type": "object",
          "properties": {
            "label": {
              "type": "string",
              "description": "Roof area, plane or building label with its sheet or paragraph reference"
            },
            "areaSqFt": {
              "type": "number",
              "description": "Area in square feet as stated"
            },
            "verificationRequired": {
              "type": "boolean",
              "description": "Always true: every quantity is confirmed on the roof before material is ordered"
            }
          }
        }
      },
      "linearQuantities": {
        "type": "array",
        "description": "Eave, rake, ridge, hip, valley, perimeter and gutter lengths where the text states them, with the sheet or paragraph reference. Empty when none are stated.",
        "items": {
          "type": "object",
          "properties": {
            "item": {
              "type": "string",
              "description": "What is measured and where, e.g. ridge, Building 3 (Sheet A-201)"
            },
            "lengthFt": {
              "type": "number",
              "description": "Length in linear feet as stated"
            },
            "verificationRequired": {
              "type": "boolean",
              "description": "Always true: confirm on the roof before ordering"
            }
          }
        }
      },
      "assemblyLayers": {
        "type": "array",
        "description": "The roof assembly layers from the deck up, one string each: component, material, thickness or weight, product standard and the paragraph that specifies it, e.g. underlayment: ASTM D226 Type II felt or ASTM D4869 Type IV, one layer, para 2.3",
        "items": {
          "type": "string"
        }
      },
      "penetrations": {
        "type": "array",
        "description": "Penetrations, curbs, drains, skylights, hatches, vents and flashing conditions the document counts or details, one string each with count (if stated), flashing method and paragraph or detail reference",
        "items": {
          "type": "string"
        }
      },
      "codeReferences": {
        "type": "array",
        "description": "Building codes, standards and test methods cited (IBC, FBC, ASCE 7, ASTM, UL, FM, ANSI/SPRI) with what each governs, one string each, e.g. UL 2218 Class 4: impact resistance of shingles",
        "items": {
          "type": "string"
        }
      }
    }
  },
  "extractor": "hosted",
  "modelTier": "fast",
  "instructions": "This is a roofing takeoff. Report only quantities written in the text; never estimate or compute from drawings. Set verificationRequired to true on every quantity. Cite the paragraph, note or sheet each quantity, layer and code reference comes from. Leave arrays empty and fields null for anything the document does not state.",
  "maxInputTokens": 40000,
  "maxConcurrency": 1,
  "includeMarkdown": false,
  "maxFileSizeMb": 25,
  "downloadTimeoutSecs": 20
}
```

## Output

```json
{
  "filename": {
    "label": "File",
    "format": "text"
  },
  "title": {
    "label": "Title",
    "format": "text"
  },
  "pages": {
    "label": "Pages",
    "format": "number"
  },
  "extractionMethod": {
    "label": "Method",
    "format": "text"
  },
  "modelTier": {
    "label": "Tier",
    "format": "text"
  },
  "filledFields": {
    "label": "Filled",
    "format": "number"
  },
  "totalFields": {
    "label": "Fields",
    "format": "number"
  },
  "overallConfidence": {
    "label": "Confidence",
    "format": "number"
  },
  "data": {
    "label": "Extracted JSON",
    "format": "object"
  },
  "modelCostUsdEstimate": {
    "label": "Model cost (USD)",
    "format": "number"
  },
  "error": {
    "label": "Error",
    "format": "text"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The PDF & Document to JSON Extractor (AI) — Invoices, Forms Actor is ready to run with the inputs already set for "Roof takeoff from construction drawings and specs". [Sign up or log in](https://console.apify.com/create-task-from-example/v39XRtPienYUU9Pfs) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Roof takeoff from construction drawings and specs" task

The PDF & Document to JSON Extractor (AI) — Invoices, Forms Actor will start running based on the input automatically. You can also change all the input fields, like document urls, JSON Schema of the object to extract, and more, to match your specific use case.

### 3. Receive the "Roof takeoff from construction drawings and specs" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as file, title, pages, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Roof takeoff from construction drawings and specs" task via API](https://apify.com/owlabee/document-to-json-extractor.md).

## About this Actor

This example demonstrates how to use [PDF & Document to JSON Extractor (AI) — Invoices, Forms](https://apify.com/owlabee/document-to-json-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/owlabee/document-to-json-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/owlabee/document-to-json-extractor.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
