{
  "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": "2I1B4tDGxCBNVY4i3"
  },
  "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": "Any listed three digit NYC agency code, such as 040 for Education, 846 for Parks or 858 for Information Technology. Leave empty for all agencies.",
            "items": {
              "type": "string",
              "enum": [
                "040",
                "846",
                "850",
                "826",
                "816",
                "806",
                "071",
                "069",
                "125",
                "856",
                "841",
                "068",
                "056",
                "827",
                "858",
                "857",
                "057",
                "801",
                "072",
                "002",
                "015",
                "025",
                "836",
                "017",
                "127",
                "866",
                "030",
                "810",
                "126",
                "820",
                "131",
                "860"
              ],
              "enumTitles": [
                "040 Department of Education",
                "846 Parks and Recreation",
                "850 Design and Construction",
                "826 Environmental Protection",
                "816 Health and Mental Hygiene",
                "806 Housing Preservation and Development",
                "071 Department of Homeless Services",
                "069 Department of Social Services",
                "125 Department for the Aging",
                "856 Citywide Administrative Services",
                "841 Department of Transportation",
                "068 Administration for Children's Services",
                "056 Police Department",
                "827 Sanitation",
                "858 Information Technology and Telecommunications",
                "857 DCAS Municipal Supply Service",
                "057 Fire Department",
                "801 Small Business Services",
                "072 Department of Correction",
                "002 Mayoralty",
                "015 Office of the Comptroller",
                "025 Law Department",
                "836 Department of Finance",
                "017 Emergency Management",
                "127 Financial Information Services Agency",
                "866 Consumer and Worker Protection",
                "030 City Planning",
                "810 Department of Buildings",
                "126 Cultural Affairs",
                "820 Administrative Trials and Hearings",
                "131 Office of Payroll Administration",
                "860 Records and Information Services"
              ]
            }
          },
          "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}