{
  "openapi": "3.0.1",
  "info": {
    "title": "Connecticut Open Expenditures - Every State Payment",
    "description": "Every payment Connecticut's state government made for goods and services (public open data, ~6.16M payment lines, FY2020-2027): service, department, program, expense category, fund and type, vendor with exact vendor id, payment method and status, payment and invoice dates, and amount.",
    "version": "0.0",
    "x-build-id": "0WcNfSyIZBxynotvY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~ct-open-expenditure/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-ct-open-expenditure",
        "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/j0401~ct-open-expenditure/runs": {
      "post": {
        "operationId": "runs-sync-j0401-ct-open-expenditure",
        "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/j0401~ct-open-expenditure/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-ct-open-expenditure",
        "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": {
          "vendor": {
            "title": "Vendor (contains)",
            "type": "string",
            "description": "Substring match on the payee name, e.g. 'AMAZON', 'DELL', 'MEDICAL'. Vendor names are free text as typed into the accounting system, so the same supplier can appear under several spellings. Blank = any.",
            "default": ""
          },
          "vendorId": {
            "title": "Vendor ID (contains)",
            "type": "string",
            "description": "Substring match on the exact vendor identifier, e.g. '0000053057'. This is a stable key, unlike the free-text vendor name. Blank = any.",
            "default": ""
          },
          "department": {
            "title": "Department (contains)",
            "type": "string",
            "description": "Substring match on the department (state agency), e.g. 'Transportation', 'Correction', 'Mental Health'. 90 agencies in total. Normalized across both ledger tables. Blank = any.",
            "default": ""
          },
          "service": {
            "title": "Government function (contains)",
            "type": "string",
            "description": "Substring match on the top-level government function, e.g. 'HEALTH', 'TRANSPORTATION', 'JUDICIAL', 'CORRECTIONS'. 10 functions in total. Blank = any.",
            "default": ""
          },
          "program": {
            "title": "Program (contains)",
            "type": "string",
            "description": "Substring match on the budget program, e.g. 'Other Expenses', 'Tax Relief', 'Renters Rebate'. 3,381 programs in total - fine-grained. Normalized across both ledger tables. Blank = any.",
            "default": ""
          },
          "expenseCategory": {
            "title": "Expense category (contains)",
            "type": "string",
            "description": "Substring match on the spending category, e.g. 'STATE AID', 'ELECTRICITY', 'SUPPLIES', 'GRANT'. 387 categories in total. Blank = any.",
            "default": ""
          },
          "fund": {
            "title": "Fund (contains)",
            "type": "string",
            "description": "Substring match on the fund, e.g. 'GENERAL', 'FEDERAL', 'TRANSPORTATION'. 87 funds in total. Blank = any.",
            "default": ""
          },
          "account": {
            "title": "Account (contains)",
            "type": "string",
            "description": "Substring match on the account code, e.g. '54010'. Blank = any.",
            "default": ""
          },
          "contractNumber": {
            "title": "Contract number (contains)",
            "type": "string",
            "description": "Substring match on the contract number. Blank = any.",
            "default": ""
          },
          "purchaseOrderNumber": {
            "title": "Purchase order (contains)",
            "type": "string",
            "description": "Substring match on the purchase order number. Blank = any.",
            "default": ""
          },
          "paymentId": {
            "title": "Payment ID (contains)",
            "type": "string",
            "description": "Substring match on the payment identifier. One payment covers several accounting lines, so the same id appears on multiple rows - it is a grouping key, not a row key. Blank = any.",
            "default": ""
          },
          "fundType": {
            "title": "Fund type",
            "enum": [
              "",
              "GENERAL",
              "SPECIAL_REVENUE",
              "CAPITAL_PROJECTS",
              "INTERNAL_SERVICE",
              "ENTERPRISE",
              "OTHER_TRUST_FUNDS",
              "PENSION_TRUST",
              "AGENCY"
            ],
            "type": "string",
            "description": "Exact fund type the payment was charged to. Blank = any.",
            "default": ""
          },
          "paymentStatus": {
            "title": "Payment status",
            "enum": [
              "",
              "Paid-Reconciled",
              "Paid-Unreconciled",
              "Stopped-Reconciled",
              "Escheated Check-Reconciled",
              "Void-Reconciled",
              "Stopped-Unreconciled"
            ],
            "type": "string",
            "description": "Exact payment status. Blank = any.",
            "default": ""
          },
          "paymentMethod": {
            "title": "Payment method",
            "enum": [
              "",
              "Automated Clearing House",
              "System Check",
              "Giro - EFT",
              "Wire Transfer",
              "Manual Check"
            ],
            "type": "string",
            "description": "Exact payment method. Blank = any.",
            "default": ""
          },
          "vendorType": {
            "title": "Vendor type",
            "enum": [
              "",
              "Corporation",
              "P-card Merchant",
              "Individual - Sole Proprietor",
              "Governmental",
              "Not-for-Profit",
              "LLC - Corporation",
              "LLC - Partnership",
              "LLC - Single Member",
              "Partnership"
            ],
            "type": "string",
            "description": "Exact vendor type. Note 322,330 rows carry no vendor type at all - filter on a type and they are excluded. Blank = any.",
            "default": ""
          },
          "fiscalYear": {
            "title": "Fiscal year",
            "type": "integer",
            "description": "Exact state fiscal year (July-June), e.g. 2025. Blank = any. FY2020-FY2027 are present."
          },
          "paymentFrom": {
            "title": "Payment date from",
            "type": "string",
            "description": "Earliest payment date, YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "paymentTo": {
            "title": "Payment date to",
            "type": "string",
            "description": "Latest payment date, YYYY-MM-DD. Blank = any.",
            "default": ""
          },
          "minAmount": {
            "title": "Minimum amount",
            "type": "number",
            "description": "Smallest payment amount in dollars. Leave blank to include refunds and reversals, which are negative (59,707 lines on the archive ledger, 116,639 on current). Set 0.01 for payments only."
          },
          "maxAmount": {
            "title": "Maximum amount",
            "type": "number",
            "description": "Largest payment amount in dollars. Blank = no upper bound."
          },
          "recentDays": {
            "title": "Paid within the last N days",
            "minimum": 0,
            "type": "integer",
            "description": "Only payments whose payment date falls within the last N days. Ignored when 'Payment date from' is set. 0 = off.",
            "default": 0
          },
          "corpus": {
            "title": "Ledger",
            "enum": [
              "current",
              "archive"
            ],
            "type": "string",
            "description": "Which ledger table: 'current' = Ledger Current (default), 'archive' = Ledger Archive. The two are near-duplicate copies of the same payments - read one, never sum them.",
            "default": "current"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "rows",
              "aggregate"
            ],
            "type": "string",
            "description": "rows = payment lines matching your filters (default). aggregate = one count row per group (see groupBy).",
            "default": "rows"
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "",
              "service",
              "department",
              "program",
              "expenseCategory",
              "fund",
              "fundType",
              "paymentStatus",
              "paymentMethod",
              "vendorType",
              "fiscalYear",
              "fiscalYearPeriod"
            ],
            "type": "string",
            "description": "Which dimension to aggregate over (mode=aggregate). Blank = service (10 values). Note 'program' has 3,375 values and returns a long result. Every group is returned.",
            "default": ""
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of records pushed in rows mode (0 = default 50; up to 2,000 per run). Each record is metered individually, so there is no per-run charge cap. Aggregate mode returns every group.",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}