{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Contract Recompete Watch",
    "description": "Review watched federal contracts against dated SAM.gov notices. See recorded dates, source links and gaps that help you decide what to check next.",
    "version": "0.2",
    "x-build-id": "iVwhYYgySJLogOQM6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/critd~recompete-watch/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-critd-recompete-watch",
        "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/critd~recompete-watch/runs": {
      "post": {
        "operationId": "runs-sync-critd-recompete-watch",
        "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/critd~recompete-watch/run-sync": {
      "post": {
        "operationId": "run-sync-critd-recompete-watch",
        "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",
        "required": [
          "mode",
          "coverage"
        ],
        "properties": {
          "mode": {
            "title": "Review mode",
            "enum": [
              "demo",
              "review",
              "monitor",
              "qualify_sam"
            ],
            "type": "string",
            "description": "Use Demo for fictional examples, or select review/monitor for your supplied input. qualify_sam is an owner-only deployment diagnostic; customer runs cannot use it.",
            "default": "demo"
          },
          "coverage": {
            "title": "Selected coverage",
            "enum": [
              "award_only",
              "award_and_notices",
              "award_and_snapshot"
            ],
            "type": "string",
            "description": "Select award_and_snapshot to compare watched contracts with our latest published official SAM snapshot. The report shows the source date, inspected coverage and any gaps. Updates are operator-published, not real-time. Snapshot mode requires operator-provisioned private source access. Authenticated SAM API mode remains separate. Demo uses award_only.",
            "default": "award_only"
          },
          "contracts": {
            "title": "Contract links",
            "maxItems": 100,
            "type": "array",
            "description": "Contracts supplied for this review.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "customerId",
                "awardUrl"
              ],
              "properties": {
                "customerId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128,
                  "title": "Customer id",
                  "description": "Customer id supplied for this review.",
                  "editor": "textfield"
                },
                "awardUrl": {
                  "type": "string",
                  "maxLength": 256,
                  "title": "Award url",
                  "description": "Award url supplied for this review.",
                  "editor": "textfield"
                }
              }
            }
          },
          "contractsCsv": {
            "title": "Or paste CSV: customerId,awardUrl",
            "type": "string",
            "description": "Contracts csv supplied for this review."
          },
          "lookAheadDays": {
            "title": "Highlight recorded dates within this many days",
            "minimum": 1,
            "maximum": 730,
            "type": "integer",
            "description": "Look ahead days supplied for this review.",
            "default": 180
          },
          "maxRequests": {
            "title": "Maximum total official-source requests",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Max requests supplied for this review.",
            "default": 60
          },
          "state": {
            "title": "Named history store (monitor only)",
            "required": [
              "scopeId"
            ],
            "type": "object",
            "description": "Monitor scope and optional exact baseline. Select the history store in historyStoreId for hosted runs.",
            "properties": {
              "storeId": {
                "type": "string",
                "title": "Store id",
                "description": "History key-value store to read and update across monitor runs.",
                "editor": "textfield",
                "resourceType": "keyValueStore",
                "resourcePermissions": [
                  "READ",
                  "WRITE"
                ]
              },
              "scopeId": {
                "type": "string",
                "title": "Scope id",
                "description": "Stable name for this comparison scope. Use the same value in subsequent monitor runs.",
                "editor": "textfield"
              },
              "baselineSnapshotId": {
                "type": "string",
                "title": "Baseline snapshot id",
                "description": "Optional exact snapshot to compare with instead of the stored history head.",
                "nullable": true,
                "editor": "textfield"
              },
              "recoverySnapshotIds": {
                "type": "array",
                "maxItems": 5,
                "items": {
                  "type": "string"
                },
                "title": "Recovery snapshot ids",
                "description": "Optional retained snapshot IDs for explicit recovery; at most five.",
                "editor": "json"
              }
            },
            "additionalProperties": false
          },
          "noticeSearch": {
            "title": "SAM discovery scope (requires SAM_API_KEY)",
            "required": [
              "postedFrom",
              "postedTo",
              "pageSize",
              "maxPages",
              "maxDescriptions"
            ],
            "type": "object",
            "description": "Notice search supplied for this review.",
            "properties": {
              "postedFrom": {
                "type": "string",
                "title": "Posted from",
                "description": "Posted from supplied for this review.",
                "editor": "textfield"
              },
              "postedTo": {
                "type": "string",
                "title": "Posted to",
                "description": "Posted to supplied for this review.",
                "editor": "textfield"
              },
              "pageSize": {
                "type": "integer",
                "minimum": 1,
                "maximum": 20,
                "title": "Page size",
                "description": "Page size supplied for this review.",
                "editor": "number"
              },
              "maxPages": {
                "type": "integer",
                "minimum": 1,
                "maximum": 5,
                "title": "Max pages",
                "description": "Max pages supplied for this review.",
                "editor": "number"
              },
              "maxDescriptions": {
                "type": "integer",
                "minimum": 1,
                "maximum": 100,
                "title": "Max descriptions",
                "description": "Max descriptions supplied for this review.",
                "editor": "number"
              }
            },
            "additionalProperties": false
          },
          "noticePostedFrom": {
            "title": "Notice posting start date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD. Defaults to seven days before the end date."
          },
          "noticePostedTo": {
            "title": "Notice posting end date (optional)",
            "type": "string",
            "description": "YYYY-MM-DD. Defaults to today. Choose award_and_notices; leave advanced noticeSearch empty."
          },
          "historyStoreId": {
            "title": "History store",
            "type": "string",
            "description": "For monitor runs, select the history key-value store here and set state.scopeId. If state.storeId is also supplied, it must match."
          },
          "samQualification": {
            "title": "Selected SAM notice (operator diagnostic only)",
            "required": [
              "noticeId",
              "organizationCode",
              "postedDate"
            ],
            "type": "object",
            "description": "For the authorized owner in qualify_sam mode only: a public notice ID, SAM organization code and exact posting date. Uses at most three requests for lookup, description and refresh; does not repeat or claim pagination qualification. Never supply a key or URL.",
            "properties": {
              "noticeId": {
                "title": "Public notice ID",
                "description": "32 hexadecimal characters from the public SAM notice URL.",
                "type": "string",
                "editor": "textfield",
                "pattern": "^[a-fA-F0-9]{32}$"
              },
              "organizationCode": {
                "title": "SAM organization code",
                "description": "The published SAM organization code for this notice.",
                "type": "string",
                "editor": "textfield",
                "pattern": "^[a-zA-Z0-9.]{1,32}$"
              },
              "postedDate": {
                "title": "Notice posting date",
                "description": "Exact source posting date, YYYY-MM-DD.",
                "type": "string",
                "editor": "textfield",
                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
              }
            },
            "additionalProperties": false
          },
          "snapshot": {
            "title": "Dated snapshot scope",
            "required": [
              "postedFrom",
              "postedTo"
            ],
            "type": "object",
            "description": "Posting dates select the snapshot scope. Omit revision (or use current) to resolve our latest published revision once per run. Exact retained revisions are optional for reproducibility; retired revisions fail without silently advancing. Source dates and gaps appear with results.",
            "properties": {
              "revision": {
                "title": "Snapshot revision",
                "description": "Use current (the default) or an exact retained 64-character revision. The report records the revision actually used.",
                "type": "string",
                "editor": "textfield",
                "pattern": "^(current|[a-f0-9]{64})$"
              },
              "postedFrom": {
                "title": "Posted from",
                "description": "Inclusive YYYY-MM-DD; the window cannot exceed 365 days.",
                "type": "string",
                "editor": "textfield",
                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
              },
              "postedTo": {
                "title": "Posted through",
                "description": "Inclusive YYYY-MM-DD, no later than today.",
                "type": "string",
                "editor": "textfield",
                "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
              }
            },
            "additionalProperties": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}