{
  "openapi": "3.0.1",
  "info": {
    "title": "USASpending GovCon Incumbent & Recompete Enricher",
    "description": "Extract expiring federal contracts, incumbent prime contractors (UEI + Legal Name), award ceilings, solicitation crosswalk IDs, and single-bid competition vulnerabilities from USAspending.gov (FPDS).",
    "version": "0.0",
    "x-build-id": "x2pIPMEiC6RfewWh4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zodiacxs~usaspending-incumbent-recompete-enricher/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zodiacxs-usaspending-incumbent-recompete-enricher",
        "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/zodiacxs~usaspending-incumbent-recompete-enricher/runs": {
      "post": {
        "operationId": "runs-sync-zodiacxs-usaspending-incumbent-recompete-enricher",
        "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/zodiacxs~usaspending-incumbent-recompete-enricher/run-sync": {
      "post": {
        "operationId": "run-sync-zodiacxs-usaspending-incumbent-recompete-enricher",
        "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": [
          "maxRecords"
        ],
        "properties": {
          "searchKeywords": {
            "title": "Search Keywords / Scope Filter",
            "type": "string",
            "description": "Keywords, technical capabilities, or solicitation/contract identifiers (e.g., 'zero trust', 'cloud migration', 'cybersecurity', 'DevSecOps'). Leave blank to filter purely by NAICS/Agency.",
            "default": "cybersecurity"
          },
          "naicsCodes": {
            "title": "NAICS Industry Codes",
            "maxItems": 50,
            "type": "array",
            "description": "6-digit NAICS codes to target (e.g., 541511 Custom Computer Programming, 541512 Computer Systems Design, 541519 Other Computer Related Services).",
            "default": [
              "541511",
              "541512"
            ],
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "Product & Service Codes (PSC)",
            "maxItems": 50,
            "type": "array",
            "description": "Optional 4-character Federal PSC codes (e.g., 'D302' IT Systems Development, 'D310' Cyber Security and Data Backup).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "recipientSearchText": {
            "title": "Target Incumbent Contractor Name or UEI",
            "type": "string",
            "description": "Optional: Filter awards held by a specific incumbent contractor name or 12-character SAM UEI (e.g., 'Booz Allen', 'Leidos', 'J8K2L9M4N1P2')."
          },
          "awardingAgencyName": {
            "title": "Awarding Toptier Agency Name",
            "type": "string",
            "description": "Optional: Filter by awarding toptier agency name (e.g., 'Department of Defense', 'Department of Homeland Security', 'Department of Veterans Affairs')."
          },
          "awardIds": {
            "title": "Specific Contract / Award IDs (PIID Crosswalk)",
            "maxItems": 100,
            "type": "array",
            "description": "Optional list of specific contract PIIDs (e.g., 'W911NF26C0001') to cross-walk from SAM.gov notices.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "awardTypeGroup": {
            "title": "Contract Vehicle Type",
            "enum": [
              "CONTRACTS_ONLY",
              "IDVS_ONLY",
              "CONTRACTS_AND_IDVS"
            ],
            "type": "string",
            "description": "Select Definitive Contracts (A, B, C, D), Indefinite Delivery Vehicles / IDIQs (IDVs), or both.",
            "default": "CONTRACTS_ONLY"
          },
          "expiringWithinDays": {
            "title": "Recompete Radar: Expiring Within (Days)",
            "minimum": 0,
            "maximum": 1825,
            "type": "integer",
            "description": "Client-side Period-of-Performance End Date filter applied BEFORE charging PPE. Set to e.g. 180 or 365 to only harvest contracts expiring within N days. Set to 0 to disable expiration filtering and harvest all matching awards.",
            "default": 365
          },
          "includeRecentlyExpiredDays": {
            "title": "Include Recently Expired Contracts (Bridge / Transition Window Days)",
            "minimum": 0,
            "maximum": 365,
            "type": "integer",
            "description": "When Expiring Within (Days) > 0, also include contracts whose End Date passed within the last N days (captures delayed recompetes and bridge extensions).",
            "default": 60
          },
          "minAwardAmount": {
            "title": "Minimum Award Amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter out micro-purchases below this obligated dollar threshold (e.g., 100000 for $100k+ contracts).",
            "default": 100000
          },
          "maxRecords": {
            "title": "Maximum Contracts to Harvest (PPE Budget Cap)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Hard ceiling on validated contract records pushed to dataset ($0.03 per record).",
            "default": 100
          },
          "enrichCompetitionVulnerability": {
            "title": "Enrich FPDS Competition Vulnerability & Solicitation ID (+$0.02/record)",
            "type": "boolean",
            "description": "When enabled, queries `/api/v2/awards/{generated_internal_id}/` for each matched contract to extract Number of Offers Received, Single-Bid Vulnerability flag, Extent Competed, Set-Aside Type, Potential Award Ceiling, Contracting Office, and SAM.gov Solicitation ID.",
            "default": true
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Optional proxy settings (USASpending API is public and normally requires no proxy).",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}