{
  "openapi": "3.0.1",
  "info": {
    "title": "NYC Government Contracts & Procurement - Awards & Solicitations",
    "description": "New York City contract awards (53,868) and open solicitations (45,257) from the Office of Citywide Procurement (public open data). Search by agency, vendor, PIN, category or date; look up one notice; or aggregate awards by agency or category. The historical bid tabulations are a third corpus.",
    "version": "0.0",
    "x-build-id": "9yQeaAI4IsAnnQN0G"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0401~nyc-contracts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0401-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/j0401~nyc-contracts/runs": {
      "post": {
        "operationId": "runs-sync-j0401-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/j0401~nyc-contracts/run-sync": {
      "post": {
        "operationId": "run-sync-j0401-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": {
          "corpus": {
            "title": "Dataset",
            "enum": [
              "awards",
              "solicitations",
              "bids"
            ],
            "type": "string",
            "description": "awards = contracts NYC has awarded (~53,900, has vendor + amount). solicitations = open requests for bids/proposals (~45,300, has due date). bids = historical bid tabulations (which bidder priced which line item) - NOTE: frozen; its newest bid dates to 2021, last updated 2023.",
            "default": "awards"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "",
              "search",
              "record",
              "aggregate"
            ],
            "type": "string",
            "description": "search = filter notices. record = one notice by requestId (or bidNumber for bids). aggregate = one row per group with a count. Blank auto-routes."
          },
          "requestId": {
            "title": "Request ID / bid number",
            "type": "string",
            "description": "With mode=record: the procurement request id, e.g. \"20261005010\" (awards / solicitations), or the bid number for the bids corpus."
          },
          "agency": {
            "title": "Agency",
            "type": "string",
            "description": "Agency name contains (e.g. \"Parks\", \"Police\", \"Sanitation\"). Awards & solicitations only."
          },
          "vendor": {
            "title": "Vendor / awardee",
            "type": "string",
            "description": "Awarded vendor name contains (e.g. \"Dell\"). Awards only - solicitations have no vendor yet."
          },
          "bidder": {
            "title": "Bidder name",
            "type": "string",
            "description": "Bidder name contains (bids corpus only)."
          },
          "pin": {
            "title": "PIN",
            "type": "string",
            "description": "Exact procurement PIN (awards / solicitations only), e.g. \"82727W0007001\"."
          },
          "bidNumber": {
            "title": "Bid number",
            "type": "string",
            "description": "Exact bid number (bids corpus only)."
          },
          "category": {
            "title": "Category",
            "enum": [
              "",
              "Goods",
              "Goods and Services",
              "Services (other than human services)",
              "Human Services/Client Services",
              "Construction/Construction Services",
              "Construction Related Services"
            ],
            "type": "string",
            "description": "Procurement category. Blank = all. Awards & solicitations only."
          },
          "selectionMethod": {
            "title": "Selection method",
            "type": "string",
            "description": "Selection method contains (e.g. \"Sole Source\", \"Request for Proposals\", \"Competitive Sealed Bids\"). Awards & solicitations only."
          },
          "title": {
            "title": "Title keyword",
            "type": "string",
            "description": "Short title contains (e.g. \"environmental\", \"records\")."
          },
          "dateFrom": {
            "title": "Start date on/after",
            "type": "string",
            "description": "Notice start date lower bound, ISO YYYY-MM-DD (e.g. \"2026-01-01\")."
          },
          "dateTo": {
            "title": "Start date on/before",
            "type": "string",
            "description": "Notice start date upper bound, ISO YYYY-MM-DD."
          },
          "dueFrom": {
            "title": "Due date on/after",
            "type": "string",
            "description": "Response due-date lower bound, ISO YYYY-MM-DD (solicitations)."
          },
          "dueTo": {
            "title": "Due date on/before",
            "type": "string",
            "description": "Response due-date upper bound, ISO YYYY-MM-DD (solicitations)."
          },
          "minAmount": {
            "title": "Min contract amount",
            "type": "number",
            "description": "Minimum contract amount (USD), awards only."
          },
          "maxAmount": {
            "title": "Max contract amount",
            "type": "number",
            "description": "Maximum contract amount (USD), awards only."
          },
          "aggregate": {
            "title": "Aggregate instead of records",
            "type": "boolean",
            "description": "When on, returns one summary record per group with a count, instead of notices.",
            "default": false
          },
          "groupBy": {
            "title": "Aggregate by",
            "enum": [
              "",
              "agency",
              "category",
              "selectionMethod",
              "year"
            ],
            "type": "string",
            "description": "Blank = a default dimension for the selected dataset. agency / category / selectionMethod / year (awards & solicitations); the bids corpus only supports year.",
            "default": ""
          },
          "maxResults": {
            "title": "Max records",
            "minimum": 0,
            "type": "integer",
            "description": "Cap the number of records pushed (0 = a default of 50).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}