{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Contracts by Agency, NAICS and Recipient",
    "description": "US federal government contracts from USAspending.gov. Filter by date, keyword, recipient, awarding agency, NAICS and PSC code, state and amount. One row per contract with recipient, UEI, agency, amount, dates, codes, place of performance and a link to the award page.",
    "version": "0.1",
    "x-build-id": "ge91EvKSfsCWRcOfT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nightwave-owner~usaspending-federal-contracts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nightwave-owner-usaspending-federal-contracts",
        "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/nightwave-owner~usaspending-federal-contracts/runs": {
      "post": {
        "operationId": "runs-sync-nightwave-owner-usaspending-federal-contracts",
        "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/nightwave-owner~usaspending-federal-contracts/run-sync": {
      "post": {
        "operationId": "run-sync-nightwave-owner-usaspending-federal-contracts",
        "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": {
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "First action date, YYYY-MM-DD, for example \"2026-09-01\". Defaults to 29 days before dateTo, so 30 days in total. The range can be at most 366 days and cannot start before 2007-10-01."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Last action date (inclusive), YYYY-MM-DD, for example \"2026-09-30\". Defaults to today in Washington time. Leave empty for scheduled runs, so the range follows the calendar."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words or phrases to search for in the award text, at least 3 characters each, for example [\"cloud\", \"cybersecurity\"]. Awards matching any of them are returned. Empty means no keyword filter.",
            "items": {
              "type": "string"
            }
          },
          "recipientName": {
            "title": "Recipient name or UEI",
            "type": "string",
            "description": "Company name (or part of it) or a Unique Entity ID (UEI) of the contractor, for example \"Booz Allen\" or \"JCBMLGPE6Z71\". Empty means all contractors."
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Agency names exactly as USAspending writes them, for example [\"General Services Administration\"] or a sub agency such as [\"Federal Acquisition Service\"]. Empty means all agencies.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes, 2 to 6 digits, for example [\"541511\"] (custom computer programming). A shorter code matches every code that starts with it, so 5415 includes 541511 and 541512. Empty means all industries.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service Codes, for example [\"DA01\"] (business application development support) or [\"R499\"]. Empty means all products and services.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two letter state codes where the work is done, for example [\"VA\", \"DC\"]. Empty means all states.",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only contracts with an award amount of at least this many US dollars, for example 1000000. Empty means no lower limit."
          },
          "maxAmount": {
            "title": "Maximum amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only contracts with an award amount of at most this many US dollars, for example 50000000. Empty means no upper limit."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum number of contracts, for example 50. Largest award amount first (most recently modified first with onlyNew). Each contract is one billable result. 1 to 10 000, defaults to 50.",
            "default": 50
          },
          "includeDetails": {
            "title": "Include award details",
            "type": "boolean",
            "description": "Also fetch each award's detail record to fill totalObligation and baseAndAllOptionsValue, for example true. Makes one extra request per contract, so a run takes about half a second longer per row. Defaults to false.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new contract activity",
            "type": "boolean",
            "description": "For scheduled runs. When true, contracts that an earlier run with the same input already delivered are skipped and not charged, so a daily run returns only awards that are new or have a new action (modification or obligation) since the last run. The first run returns everything in the selection. Defaults to false.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}