{
  "openapi": "3.0.1",
  "info": {
    "title": "NYC City Record Scraper: Bids, Awards & Notices",
    "description": "NYC City Record notices from NYC Open Data: city procurement solicitations, contract awards, intents to award, hearings and agency rules. One row per notice with agency, PIN, due date, amount, vendor and text. Filter by section, type, agency, keyword or amount, or monitor new ones. No contact data.",
    "version": "1.0",
    "x-build-id": "DufiMvN4kML4mhto3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/civitab~nyc-city-record/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-civitab-nyc-city-record",
        "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/civitab~nyc-city-record/runs": {
      "post": {
        "operationId": "runs-sync-civitab-nyc-city-record",
        "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/civitab~nyc-city-record/run-sync": {
      "post": {
        "operationId": "run-sync-civitab-nyc-city-record",
        "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": {
          "sections": {
            "title": "Sections",
            "type": "array",
            "description": "City Record sections to include. Procurement covers solicitations, awards and intents to award. The personnel and court sections are not offered.",
            "items": {
              "type": "string",
              "enum": [
                "Procurement",
                "Public Comment on Contract Awards",
                "Contract Award Hearings",
                "Public Hearings and Meetings",
                "Agency Rules",
                "Special Materials",
                "Property Disposition"
              ]
            },
            "default": [
              "Procurement"
            ]
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Optional. For example only Solicitation (open bids) or only Award. Empty = all types in the chosen sections.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Award",
                "Intent to Award",
                "Public Hearings",
                "Meetings",
                "Notice",
                "Rules"
              ]
            },
            "default": []
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 0,
            "maximum": 3650,
            "type": "integer",
            "description": "Notices published in the last N days (by start date). Ignored when 'Published from' is set. 0 = no date limit.",
            "default": 7
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "Optional start date (YYYY-MM-DD).",
            "default": ""
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "Optional end date, inclusive (YYYY-MM-DD).",
            "default": ""
          },
          "onlyOpen": {
            "title": "Only open (due date in the future)",
            "type": "boolean",
            "description": "Keep only notices whose due date is today or later. Useful with Solicitation.",
            "default": false
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Optional. Agency name contains any of these (case-insensitive), e.g. 'Parks', 'Education'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "Optional. Category contains any of these, e.g. 'Goods', 'Construction', 'Human Services'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "selectionMethods": {
            "title": "Selection methods",
            "type": "array",
            "description": "Optional. Selection method contains any of these, e.g. 'Competitive Sealed Bids', 'Request for Proposals'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional. Match any keyword in title, description, vendor or PIN (case-insensitive).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum contract amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Notices without an amount are excluded when set.",
            "default": null
          },
          "maxAmount": {
            "title": "Maximum contract amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional.",
            "default": null
          },
          "maxItems": {
            "title": "Max notices",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many notices.",
            "default": 50
          },
          "onlyNew": {
            "title": "Only new (monitor mode)",
            "type": "boolean",
            "description": "Skip notices delivered by earlier runs with the same filters. Schedule it daily for a feed of new notices.",
            "default": false
          },
          "requestDelaySecs": {
            "title": "Delay between API requests (seconds)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Polite throttle. The portal robots.txt asks for 1 second.",
            "default": 1
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}