{
  "openapi": "3.0.1",
  "info": {
    "title": "Expiring Federal Contracts – Recompete Radar",
    "description": "Federal contracts ending in 3-18 months (USAspending.gov) with incumbent and SAM.gov check. Soonest 25 per run, or only new/changed with a saved monitor name.",
    "version": "0.2",
    "x-build-id": "guelmyf2DLmcHd2Ye"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cce_partners~govcon-recompete-radar/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cce_partners-govcon-recompete-radar",
        "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/cce_partners~govcon-recompete-radar/runs": {
      "post": {
        "operationId": "runs-sync-cce_partners-govcon-recompete-radar",
        "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/cce_partners~govcon-recompete-radar/run-sync": {
      "post": {
        "operationId": "run-sync-cce_partners-govcon-recompete-radar",
        "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": {
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "6-digit (or 2-4 digit prefix) NAICS codes, e.g. 541512. At least one of NAICS, PSC, agency or incumbents is required.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product/Service codes, e.g. DA01, R499.",
            "items": {
              "type": "string"
            }
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier agency names exactly as on USAspending.gov, e.g. 'Department of Veterans Affairs'.",
            "items": {
              "type": "string"
            }
          },
          "incumbents": {
            "title": "Competitor watch: incumbents (names or UEIs)",
            "type": "array",
            "description": "Watch mode. Returns expiring contracts held by these companies. A 12-character UEI matches exactly; a name matches within the recipient name. Max 25.",
            "items": {
              "type": "string"
            }
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip small contracts."
          },
          "placeOfPerformanceStates": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "2-letter US state codes, e.g. VA, MD.",
            "items": {
              "type": "string"
            }
          },
          "monthsFrom": {
            "title": "Ends in at least (months)",
            "minimum": 0,
            "maximum": 59,
            "type": "integer",
            "description": "Start of the end-date window.",
            "default": 3
          },
          "monthsTo": {
            "title": "Ends in at most (months)",
            "minimum": 1,
            "maximum": 60,
            "type": "integer",
            "description": "End of the end-date window.",
            "default": 18
          },
          "endDateBasis": {
            "title": "End-date basis",
            "enum": [
              "current",
              "potential"
            ],
            "type": "string",
            "description": "The window always uses the CURRENT period-of-performance end (what USAspending search returns). 'potential' also drops contracts whose options can run past the window end (needs potential-end lookups, capped below).",
            "default": "current"
          },
          "maxPotentialEndLookups": {
            "title": "Max potential-end-date lookups",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "potentialEndDate needs one USAspending request per contract (1 per second, soonest-ending first, within maxRequests). Default 20 keeps runs to about 2 minutes; raise it (up to 500) to fill potentialEndDate for more rows. 0 turns lookups off.",
            "default": 20
          },
          "maxParentLookups": {
            "title": "Max parent-company lookups",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "currentParentName needs one USAspending recipient-profile request per unique incumbent (1 per second, run in parallel with the other steps, cached for 30 days). 0 = no lookups (the checked-in alias map still applies by incumbent name).",
            "default": 50
          },
          "activityYears": {
            "title": "Contract activity within (years)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Only contracts with an action (award or modification) in the last N years.",
            "default": 3
          },
          "joinSam": {
            "title": "Join to open SAM.gov notices",
            "type": "boolean",
            "description": "Match each contract to open SAM.gov notices (pre-solicitation, sources sought, solicitation, J&A).",
            "default": true
          },
          "samApiKey": {
            "title": "SAM.gov API key (optional)",
            "type": "string",
            "description": "Optional. Leave empty to use the official SAM.gov public nightly extract (keyless, up to ~24h old). With a key, the join uses the real-time API but cannot search notice descriptions."
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Max rows to return per run (you pay per row). Leave empty for the default: 25 without a monitor name, 100 with one."
          },
          "maxPagesPerQuery": {
            "title": "Max USAspending pages per query",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "100 contracts per page. Raise only for broad searches.",
            "default": 30
          },
          "maxRequests": {
            "title": "Max USAspending requests per run",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Hard budget. Requests are throttled to 1 per second.",
            "default": 200
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Set a name (e.g. 'va-it') to get only NEW or CHANGED contracts: the Actor saves what this monitor already returned, and later runs with the same name return only contracts it hasn't returned yet, plus contracts whose end date, amount or incumbent changed, or that got a new high/medium SAM.gov notice. Use one name per filter set. Leave empty to get the soonest-ending contracts each run (nothing saved, up to 25 by default)."
          },
          "stateKey": {
            "title": "State key (old name for Monitor name)",
            "type": "string",
            "description": "Same as Monitor name (kept for existing integrations). If both are set, Monitor name wins."
          },
          "emitUnchanged": {
            "title": "Also return unchanged rows",
            "type": "boolean",
            "description": "With a monitor name: also return unchanged rows (each row is billed). Without a monitor name every run returns the soonest-ending contracts anyway.",
            "default": false
          },
          "resetState": {
            "title": "Reset state",
            "type": "boolean",
            "description": "Forget what this monitor has already returned (needs a monitor name).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}