{
  "openapi": "3.0.1",
  "info": {
    "title": "US USAspending Federal Contract Awards & Funded GovCon Leads",
    "description": "Extract newly obligated US federal contracts, IDVs & grants from USAspending.gov API v2 with prime contractor UEIs, award & ceiling USD amounts, Small Business / 8(a) / SDVOSB status, NAICS/PSC codes & street addresses.",
    "version": "1.0",
    "x-build-id": "8Oe6cEXlAvwRk2Dfl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/regpulse-data~us-usaspending-federal-contract-award-leads/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-regpulse-data-us-usaspending-federal-contract-award-leads",
        "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/regpulse-data~us-usaspending-federal-contract-award-leads/runs": {
      "post": {
        "operationId": "runs-sync-regpulse-data-us-usaspending-federal-contract-award-leads",
        "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/regpulse-data~us-usaspending-federal-contract-award-leads/run-sync": {
      "post": {
        "operationId": "run-sync-regpulse-data-us-usaspending-federal-contract-award-leads",
        "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": {
          "mode": {
            "title": "Operation Mode",
            "enum": [
              "recent_contracts",
              "federal_grants",
              "recipient_search",
              "watchlist_diff"
            ],
            "type": "string",
            "description": "Select 'recent_contracts' for newly obligated federal contract awards (prime & subcontracting leads), 'federal_grants' for federal grants and cooperative agreements, 'recipient_search' to look up awards by prime contractor name or SAM.gov UEI, or 'watchlist_diff' for stateful monitoring of new awards and obligation changes.",
            "default": "recent_contracts"
          },
          "query": {
            "title": "Search Query (Keyword, Contractor Name, or UEI)",
            "type": "string",
            "description": "In 'recent_contracts', 'federal_grants', or 'watchlist_diff' mode, filters award descriptions by keyword (e.g., 'cybersecurity', 'cloud migration', 'HVAC'). In 'recipient_search' mode, matches recipient name or 12-character SAM.gov UEI (e.g., 'BOOZ ALLEN', 'PALANTIR', 'FYHNA5WC8XD7')."
          },
          "daysBack": {
            "title": "Days Back Window",
            "minimum": 1,
            "maximum": 1825,
            "type": "integer",
            "description": "Number of days prior to endDate to scan when startDate is not explicitly set (1 to 1825 days).",
            "default": 30
          },
          "startDate": {
            "title": "Start Date (YYYY-MM-DD, Optional)",
            "type": "string",
            "description": "Explicit ISO start date (e.g., '2026-10-01'). Overrides daysBack when provided."
          },
          "endDate": {
            "title": "End Date (YYYY-MM-DD, Optional)",
            "type": "string",
            "description": "Explicit ISO end date (e.g., '2026-11-20'). Defaults to today (UTC)."
          },
          "minAwardAmountUsd": {
            "title": "Minimum Award Amount (USD)",
            "minimum": 0,
            "type": "number",
            "description": "Minimum obligated award amount in USD. Defaults to $100,000 in 'recent_contracts' and 'watchlist_diff' modes (set 0 for no floor).",
            "default": 100000
          },
          "maxAwardAmountUsd": {
            "title": "Maximum Award Amount (USD, Optional)",
            "minimum": 0,
            "type": "number",
            "description": "Optional upper bound on obligated award amount in USD (useful for targeting mid-market or small-business prime contractors)."
          },
          "agencies": {
            "title": "Awarding Federal Agencies",
            "type": "array",
            "description": "Filter by awarding federal department/agency names or abbreviations (e.g., 'Department of Defense', 'Department of Health and Human Services', 'General Services Administration', or shortcuts 'DoD', 'HHS', 'GSA', 'VA', 'DHS', 'NASA').",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS Industry Codes",
            "type": "array",
            "description": "Filter contracts by 2-to-6-digit NAICS codes (e.g., '541511', '541512', '541519', '236220').",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of Performance US States",
            "type": "array",
            "description": "Filter by 2-letter US state/territory codes for Place of Performance (e.g., 'VA', 'MD', 'CA', 'TX', 'DC').",
            "items": {
              "type": "string"
            }
          },
          "includeIdvs": {
            "title": "Include IDVs (Indefinite Delivery Vehicles)",
            "type": "boolean",
            "description": "When enabled in 'recent_contracts' or 'watchlist_diff' mode, also extracts newly obligated Indefinite Delivery Vehicles (IDIQ, GWAC, BPA, FSS) alongside definitive contracts and delivery orders. Always enabled in 'recipient_search' mode.",
            "default": false
          },
          "newAwardsOnly": {
            "title": "Newly Obligated Awards Only",
            "type": "boolean",
            "description": "When true (default for 'recent_contracts' and 'watchlist_diff'), filters by base award obligation date so legacy multi-year contracts modified recently do not crowd out newly won awards. Set false to include modifications to existing awards.",
            "default": true
          },
          "enrichAwardDetails": {
            "title": "Enrich Full Award Details (Address, Parent, Small Business, Ceiling)",
            "type": "boolean",
            "description": "Calls USAspending.gov /api/v2/awards/{id}/ (concurrency 6) to populate recipient street address, city/state/ZIP, congressional district, parent company name, Small Business / 8(a) / SDVOSB / WOSB categories, set-aside type, and base-and-all-options ceiling.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum Records to Return",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of billed award leads pushed to the dataset (1 to 5,000).",
            "default": 100
          },
          "stateStoreName": {
            "title": "Watchlist State Store Name (for watchlist_diff Mode)",
            "type": "string",
            "description": "Named Apify Key-Value Store used to persist snapshots across scheduled runs in 'watchlist_diff' mode.",
            "default": "us-usaspending-watchlist-state"
          },
          "watchlistStateKey": {
            "title": "Watchlist State Key (for watchlist_diff Mode)",
            "type": "string",
            "description": "Record key inside the Key-Value Store for storing the award watchlist snapshot.",
            "default": "USASPENDING_AWARD_WATCHLIST_SNAPSHOT"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}