{
  "openapi": "3.0.1",
  "info": {
    "title": "Checkbook NYC Contracts Scraper: City Vendors & Agencies",
    "description": "Scrape New York City government contracts by agency, vendor, purpose, amount and start date, with spend to date and M/WBE status, billed per result.",
    "version": "0.1",
    "x-build-id": "jbwahdIlRPpWvVUWm"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/talcoe~checkbook-nyc-contracts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-talcoe-checkbook-nyc-contracts",
        "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/talcoe~checkbook-nyc-contracts/runs": {
      "post": {
        "operationId": "runs-sync-talcoe-checkbook-nyc-contracts",
        "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/talcoe~checkbook-nyc-contracts/run-sync": {
      "post": {
        "operationId": "run-sync-talcoe-checkbook-nyc-contracts",
        "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": {
          "keywords": {
            "title": "Contract purpose keywords",
            "type": "array",
            "description": "Return contracts whose purpose text contains any of these words (one search per keyword). Leave empty for all contracts.",
            "items": {
              "type": "string"
            }
          },
          "agencyCodes": {
            "title": "Agencies",
            "type": "array",
            "description": "Limit to these city agencies. Leave empty for all agencies.",
            "items": {
              "type": "string",
              "enum": [
                "125",
                "126",
                "127",
                "131",
                "801",
                "806",
                "810",
                "816",
                "820",
                "826",
                "827",
                "836",
                "841",
                "846",
                "850",
                "856",
                "857",
                "858",
                "860",
                "866",
                "002",
                "015",
                "017",
                "025",
                "030",
                "040",
                "056",
                "057",
                "068",
                "069",
                "071",
                "072"
              ],
              "enumTitles": [
                "125 Department for the Aging",
                "126 Cultural Affairs",
                "127 Financial Information Services Agency",
                "131 Office of Payroll Administration",
                "801 Small Business Services",
                "806 Housing Preservation and Development",
                "810 Department of Buildings",
                "816 Health and Mental Hygiene",
                "820 Administrative Trials and Hearings",
                "826 Environmental Protection",
                "827 Sanitation",
                "836 Department of Finance",
                "841 Department of Transportation",
                "846 Parks and Recreation",
                "850 Design and Construction",
                "856 Citywide Administrative Services",
                "857 DCAS Municipal Supply Service",
                "858 Information Technology and Telecommunications",
                "860 Records and Information Services",
                "866 Consumer and Worker Protection",
                "002 Mayoralty",
                "015 Office of the Comptroller",
                "017 Emergency Management",
                "025 Law Department",
                "030 City Planning",
                "040 Department of Education",
                "056 Police Department",
                "057 Fire Department",
                "068 Administration for Children's Services",
                "069 Department of Social Services",
                "071 Department of Homeless Services",
                "072 Department of Correction"
              ]
            }
          },
          "startDateFrom": {
            "title": "Contract start date from",
            "type": "string",
            "description": "Only contracts starting on or after this date (YYYY-MM-DD).",
            "default": "2025-01-01"
          },
          "startDateTo": {
            "title": "Contract start date to",
            "type": "string",
            "description": "Only contracts starting on or before this date (YYYY-MM-DD). Optional."
          },
          "minAmount": {
            "title": "Minimum contract amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only contracts with a current amount at or above this value.",
            "default": 100000
          },
          "maxAmount": {
            "title": "Maximum contract amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only contracts with a current amount at or below this value. Optional."
          },
          "status": {
            "title": "Contract status",
            "enum": [
              "registered",
              "pending"
            ],
            "type": "string",
            "description": "Registered contracts are approved and active. Pending contracts are awaiting registration.",
            "default": "registered"
          },
          "includeSubVendors": {
            "title": "Include subcontractor rows",
            "type": "boolean",
            "description": "Also return one extra record per subcontractor on contracts that report them.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Hard stop for the run. You are billed per result, so this caps the cost.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify proxy is recommended for larger runs.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}