{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending & SAM.gov Contracts — Zero Proxy, $4.50/1K",
    "description": "Zero-proxy USAspending.gov & SAM.gov federal contract awards & expiring incumbents ($4.50/1K, >99% success). Extracts $100K-$50M+ prime contracts expiring in 30-365 days & fresh prime awards with 100% Recipient UEI, 6-digit NAICS/PSC, agency & sales hooks.",
    "version": "1.0",
    "x-build-id": "QhHhr8jRtYTaGp2Mh"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pipeforge~us-federal-contract-awards-expiring-incumbents/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pipeforge-us-federal-contract-awards-expiring-incumbents",
        "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/pipeforge~us-federal-contract-awards-expiring-incumbents/runs": {
      "post": {
        "operationId": "runs-sync-pipeforge-us-federal-contract-awards-expiring-incumbents",
        "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/pipeforge~us-federal-contract-awards-expiring-incumbents/run-sync": {
      "post": {
        "operationId": "run-sync-pipeforge-us-federal-contract-awards-expiring-incumbents",
        "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"
        ],
        "properties": {
          "mode": {
            "title": "GovCon Intelligence Mode",
            "enum": [
              "expiring_incumbents",
              "new_awards"
            ],
            "type": "string",
            "description": "Select 'expiring_incumbents' to extract active prime federal contracts expiring within 30-365 days (re-compete & teaming triggers), or 'new_awards' to extract newly awarded prime contracts (subcontracting & vendor ramp-up triggers).",
            "default": "expiring_incumbents"
          },
          "minAwardAmount": {
            "title": "Minimum Award Amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum prime federal contract obligated award value in USD (default: $250,000).",
            "default": 250000
          },
          "maxAwardAmount": {
            "title": "Maximum Award Amount (USD, 0 = Unlimited)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum prime federal contract award value in USD. Leave at 0 for no upper cap.",
            "default": 0
          },
          "naicsPrefixes": {
            "title": "Target NAICS Code Prefixes (2 to 6 Digits)",
            "type": "array",
            "description": "NAICS prefixes to filter federal contracts. Default covers 54 (IT, Cyber, Engineering & Professional Services), 51 (Software, Cloud & Telecom), 56 (Facilities & Administrative Support), 33 (Defense, Aerospace & Electronics Mfg), and 23 (Commercial & Institutional Construction).",
            "default": [
              "54",
              "51",
              "56",
              "33",
              "23"
            ],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of Performance US States (Optional)",
            "type": "array",
            "description": "Optional list of 2-letter US state codes (e.g., [\"VA\", \"MD\", \"DC\", \"TX\", \"CA\"]). Leave empty to scan all US states and territories.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Contract Description Keywords (Optional)",
            "type": "array",
            "description": "Optional keywords to filter contract descriptions or NAICS/PSC scopes (e.g., [\"cybersecurity\", \"cloud\", \"software\", \"construction\"]). Leave empty for all matching NAICS contracts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minDaysUntilExpiry": {
            "title": "Min Days Until Expiration (expiring_incumbents mode)",
            "minimum": 1,
            "maximum": 1825,
            "type": "integer",
            "description": "Minimum days remaining until the contract End Date (default: 30 days).",
            "default": 30
          },
          "maxDaysUntilExpiry": {
            "title": "Max Days Until Expiration (expiring_incumbents mode)",
            "minimum": 1,
            "maximum": 1825,
            "type": "integer",
            "description": "Maximum days remaining until the contract End Date (default: 365 days).",
            "default": 365
          },
          "lookbackDays": {
            "title": "New Awards Lookback Window in Days (new_awards mode)",
            "minimum": 1,
            "maximum": 1095,
            "type": "integer",
            "description": "Number of days back from today to capture newly started prime awards (default: 90 days; excludes future typo start dates).",
            "default": 90
          },
          "maxPages": {
            "title": "Max USAspending API Pages to Scan (100 contracts/page)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Maximum number of 100-record USAspending.gov API pages to scan and filter in memory (default: 5 pages = up to 500 prime contracts).",
            "default": 5
          },
          "limit": {
            "title": "Max Verified Contracts to Return",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of verified prime federal contract records (with 100% Recipient UEI and NAICS code completeness) to return.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}