{
  "openapi": "3.0.1",
  "info": {
    "title": "Insurance Loss Run Extractor: Loss Run PDF to Excel & CSV",
    "description": "Insurance loss run extractor: turn carrier loss run PDFs (Travelers, Hartford, Liberty, Zurich, CNA, Chubb, AmTrust, state funds, TPAs) into validated claims and policy-year totals in Excel, CSV and JSON: paid/reserve/incurred, frequency, severity, large losses. Rules-based, no AI.",
    "version": "0.1",
    "x-build-id": "CzMnTX7yt67TImZcd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hanielazevedo~insurance-loss-run-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hanielazevedo-insurance-loss-run-extractor",
        "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~insurance-loss-run-extractor/runs": {
      "post": {
        "operationId": "runs-sync-hanielazevedo-insurance-loss-run-extractor",
        "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~insurance-loss-run-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-hanielazevedo-insurance-loss-run-extractor",
        "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": "Loss run PDF URLs (public)",
            "type": "array",
            "description": "Public http(s) links to carrier or TPA loss run PDFs. One PDF may bundle several carriers / lines / policy years. To use files from your Apify account, put them in a key-value store and select it below: this Actor runs with limited permissions and cannot read a store you have not selected. The prefilled public sample (Travelers, 2 pages) is processed free of charge.",
            "items": {
              "type": "string"
            }
          },
          "pdfStore": {
            "title": "Loss run key-value store",
            "type": "string",
            "description": "Your Apify key-value store holding loss run PDFs (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 processed."
          },
          "pdfKeys": {
            "title": "PDF record keys",
            "type": "array",
            "description": "Optional. Keys of the PDF records in the selected store, e.g. \"acme-wc-lossrun-2025.pdf\". Leave empty to use every \"*.pdf\" record.",
            "items": {
              "type": "string"
            }
          },
          "pages": {
            "title": "Page range",
            "type": "string",
            "description": "Optional, applies to every file. 1-based pages to read, e.g. \"94-104\" or \"3-8,12\". Use it when the loss runs sit inside a larger RFP or submission package. Empty = all pages (up to \"Max pages per file\")."
          },
          "redactClaimants": {
            "title": "Claimant names",
            "enum": [
              "none",
              "initials",
              "hash",
              "remove"
            ],
            "type": "string",
            "description": "Privacy option for claimant / injured worker names. \"hash\" gives the same token for the same name within one run.",
            "default": "none"
          },
          "largeLossThreshold": {
            "title": "Large loss threshold (USD incurred)",
            "minimum": 1,
            "type": "integer",
            "description": "Claims with total incurred at or above this amount get largeLoss: true and are counted in largeLossCount / largeLossIncurred per policy year. incurredCappedAtThreshold caps each claim at this amount.",
            "default": 100000
          },
          "toleranceAbs": {
            "title": "Reconciliation tolerance (USD)",
            "minimum": 0,
            "maximum": 100,
            "type": "number",
            "description": "Allowed rounding difference per term when checking paid + reserve = incurred and printed totals (plus 0.05% relative). Carriers that print whole dollars need about 1.",
            "default": 1
          },
          "includeCarrierSummaries": {
            "title": "Include carrier policy-year summary rows",
            "type": "boolean",
            "description": "Return the carrier's own policy-year / line summary lines (claim count, paid, reserve, incurred) as items of type \"policyYearSummary\". Validated ones are billed as policy-year-validated.",
            "default": true
          },
          "enableOcr": {
            "title": "OCR scanned pages",
            "type": "boolean",
            "description": "Read image-only (scanned) pages with Tesseract OCR. OCR text is less reliable: OCR'd amounts rarely reconcile, so those rows usually come back flagged and free.",
            "default": true
          },
          "maxPages": {
            "title": "Max pages per file",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Safety limit per file: at most this many pages are read (text pages are fast; long RFP bundles: use \"pages\" instead).",
            "default": 60
          },
          "ocrMaxPages": {
            "title": "Max OCR pages per file",
            "minimum": 0,
            "maximum": 60,
            "type": "integer",
            "description": "At most this many scanned (image-only) pages are OCR'd per file. OCR takes a few seconds per page.",
            "default": 15
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Files bigger than this are skipped with FILE_TOO_LARGE (hard cap 50 MB).",
            "default": 25
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}