{
  "openapi": "3.0.1",
  "info": {
    "title": "NYC Procurement Scraper: City Record Bids & Awards to Excel",
    "description": "Scrape New York City procurement notices from The City Record via the official NYC Open Data API, no key. Solicitations with due dates, intents to award and contract awards with vendor and amount. Filter by keyword, agency, category, method, amount. \"Only new\" daily alerts. Excel, CSV, JSON.",
    "version": "1.0",
    "x-build-id": "NMCpAyvsKUkhc4dhk"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tenderfeed~nyc-city-record-procurement/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tenderfeed-nyc-city-record-procurement",
        "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/tenderfeed~nyc-city-record-procurement/runs": {
      "post": {
        "operationId": "runs-sync-tenderfeed-nyc-city-record-procurement",
        "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/tenderfeed~nyc-city-record-procurement/run-sync": {
      "post": {
        "operationId": "run-sync-tenderfeed-nyc-city-record-procurement",
        "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": "Keywords",
            "type": "array",
            "description": "Words to look for in the title and notice text, e.g. [\"software\", \"cleaning\"]. Empty = all notices.",
            "items": {
              "type": "string"
            }
          },
          "keywordMode": {
            "title": "Keyword match",
            "enum": [
              "any",
              "all"
            ],
            "type": "string",
            "description": "Match ANY or ALL keywords.",
            "default": "any"
          },
          "noticeTypes": {
            "title": "Notice types",
            "type": "array",
            "description": "Empty = all three. Solicitation = open bids/RFPs; Intent to Award = negotiated or sole-source awards announced before signing; Award = signed contracts with vendor and amount.",
            "items": {
              "type": "string",
              "enum": [
                "Solicitation",
                "Intent to Award",
                "Award"
              ],
              "enumTitles": [
                "Solicitation (bids, RFPs)",
                "Intent to Award",
                "Award (winner + amount)"
              ]
            }
          },
          "categories": {
            "title": "Categories",
            "type": "array",
            "description": "City Record procurement category. Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "Goods",
                "Goods and Services",
                "Services (other than human services)",
                "Human Services/Client Services",
                "Construction/Construction Services",
                "Construction Related Services"
              ],
              "enumTitles": [
                "Goods",
                "Goods and Services",
                "Services (other than human services)",
                "Human Services/Client Services",
                "Construction/Construction Services",
                "Construction Related Services"
              ]
            }
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Agency name contains (case-insensitive), e.g. [\"Health + Hospitals\", \"Design and Construction\", \"Education\"].",
            "items": {
              "type": "string"
            }
          },
          "selectionMethods": {
            "title": "Selection methods",
            "type": "array",
            "description": "Selection method contains, e.g. [\"Competitive Sealed Bids\", \"Request for Proposals\", \"M/WBE\"].",
            "items": {
              "type": "string"
            }
          },
          "vendor": {
            "title": "Vendor name contains",
            "type": "string",
            "description": "Award notices only: winning vendor name contains, e.g. \"Consulting\"."
          },
          "publishedFrom": {
            "title": "Published from",
            "type": "string",
            "description": "YYYY-MM-DD or relative (\"30 days\"). Default: last 14 days."
          },
          "publishedTo": {
            "title": "Published to",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "onlyOpen": {
            "title": "Only open solicitations",
            "type": "boolean",
            "description": "Keep only notices with a bid/response due date today or later.",
            "default": false
          },
          "minValue": {
            "title": "Minimum amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Applied to the contract amount (award amount on Award notices)."
          },
          "maxValue": {
            "title": "Maximum amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Applied to the contract amount (award amount on Award notices)."
          },
          "includeUnknownValue": {
            "title": "Include notices without an amount",
            "type": "boolean",
            "description": "Keep notices that publish no amount when an amount filter is set.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit. Default 50. The City Record publishes ~270 procurement notices per month.",
            "default": 50
          },
          "includeBuyerContacts": {
            "title": "Include agency contact (name, email, phone)",
            "type": "boolean",
            "description": "Agency procurement contact published on the notice (buyerContactName/Email/Phone). Turn off for organization-level data only.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new notices (monitoring mode)",
            "type": "boolean",
            "description": "Remember what earlier runs delivered and return (and charge for) only notices you have not received yet. Ideal for scheduled daily alerts.",
            "default": false
          },
          "monitoringId": {
            "title": "Monitoring ID",
            "type": "string",
            "description": "Name of the watch-list memory used by 'Only new'. Use a different ID per saved search/schedule."
          },
          "includeRawData": {
            "title": "Include raw City Record row",
            "type": "boolean",
            "description": "Adds the full NYC Open Data row under `raw` (bigger output). Contact keys are removed unless contacts are on.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}