{
  "openapi": "3.0.1",
  "info": {
    "title": "Arizona Mechanics Lien & Lis Pendens Feed",
    "description": "Every new mechanics lien and lis pendens recorded in Maricopa County (Phoenix, AZ) each week, grouped by company with repeat-filer and new-company flags. From the official county recorder. For collections, sureties and lien attorneys. More counties on request.",
    "version": "0.1",
    "x-build-id": "M9v59nxxayDHmLE7G"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sullivan-ventures~construction-distress-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sullivan-ventures-construction-distress-feed",
        "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/sullivan-ventures~construction-distress-feed/runs": {
      "post": {
        "operationId": "runs-sync-sullivan-ventures-construction-distress-feed",
        "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/sullivan-ventures~construction-distress-feed/run-sync": {
      "post": {
        "operationId": "run-sync-sullivan-ventures-construction-distress-feed",
        "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": {
          "lastNDays": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 92,
            "type": "integer",
            "description": "Used when Start date is empty. Window ends yesterday (records post with a 1-2 day lag).",
            "default": 7
          },
          "startDate": {
            "title": "Start date (YYYY-MM-DD)",
            "type": "string",
            "description": "Recording date, inclusive. Overrides Last N days."
          },
          "endDate": {
            "title": "End date (YYYY-MM-DD)",
            "type": "string",
            "description": "Recording date, inclusive. Defaults to yesterday."
          },
          "docTypes": {
            "title": "Document types",
            "type": "array",
            "description": "Default = construction-related (mechanics liens, modified mechanics liens, lis pendens).",
            "items": {
              "type": "string",
              "enum": [
                "mechanics_lien",
                "modified_mechanics_lien",
                "mechanics_lien_release",
                "lis_pendens",
                "trustee_sale_notice",
                "judgment",
                "state_tax_lien",
                "federal_tax_lien",
                "performance_bond",
                "notice_of_completion"
              ],
              "enumTitles": [
                "Mechanics lien (ML)",
                "Modified mechanics lien (MN)",
                "Release of mechanics lien (RM)",
                "Lis pendens (LP)",
                "Notice of trustee sale (NS)",
                "Judgment (JG)",
                "State tax lien (SL)",
                "Federal tax lien (FL)",
                "Performance/payment bond (PB)",
                "Notice of completion (NK)"
              ]
            },
            "default": [
              "mechanics_lien",
              "modified_mechanics_lien",
              "lis_pendens"
            ]
          },
          "businessOnly": {
            "title": "Business parties only",
            "type": "boolean",
            "description": "Keep only records with at least one business party, and leave individual people's names out of the output.",
            "default": true
          },
          "excludeIntermediaries": {
            "title": "Exclude serial filers from repeat flags",
            "type": "boolean",
            "description": "Banks, servicers, trustees, government, HOAs and debt buyers file on many records by design. They are still listed (with entity_hint) but not flagged as repeat companies unless you change the list below.",
            "default": true
          },
          "repeatExcludeHints": {
            "title": "Entity hints excluded from repeat flags",
            "type": "array",
            "description": "Only used when the switch above is on.",
            "items": {
              "type": "string",
              "enum": [
                "lender_trustee_gov",
                "hoa_association",
                "debt_buyer_collector",
                "contractor_supplier",
                "other_business"
              ]
            },
            "default": [
              "lender_trustee_gov",
              "hoa_association",
              "debt_buyer_collector"
            ]
          },
          "repeatThreshold": {
            "title": "Repeat threshold",
            "minimum": 2,
            "type": "integer",
            "description": "A company is a repeat company when it appears on at least this many records in the window.",
            "default": 2
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Named key-value store that remembers companies and records between runs (for new vs repeat).",
            "default": "construction-distress-state"
          },
          "updateState": {
            "title": "Update state after run",
            "type": "boolean",
            "description": "Turn off for one-off backfills you don't want counted as a prior run.",
            "default": true
          },
          "maxRecords": {
            "title": "Max records",
            "minimum": 1,
            "type": "integer",
            "description": "Safety cap across all document types.",
            "default": 2000
          },
          "requestDelayMs": {
            "title": "Delay between API calls (ms)",
            "minimum": 150,
            "type": "integer",
            "description": "Polite rate limit. One request at a time.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}