{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Contract Awards Scraper & Monitor",
    "description": "USAspending scraper and monitor for new US federal contract awards. Official USAspending.gov API, no API key. Filter by NAICS, PSC, agency, recipient state, place of performance, amount and keywords; get only awards new since your last run, including late-loaded DoD awards.",
    "version": "0.0",
    "x-build-id": "09fkfao4byf50WoII"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/vocal_rhapsody~usaspending-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-vocal_rhapsody-usaspending-awards",
        "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/vocal_rhapsody~usaspending-awards/runs": {
      "post": {
        "operationId": "runs-sync-vocal_rhapsody-usaspending-awards",
        "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/vocal_rhapsody~usaspending-awards/run-sync": {
      "post": {
        "operationId": "run-sync-vocal_rhapsody-usaspending-awards",
        "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 (prefix match)",
            "type": "array",
            "description": "Prefix match: \"5415\" matches 541511, 541512 and so on. Leave empty to include all NAICS codes.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (prefix match)",
            "type": "array",
            "description": "Product/service codes, prefix match: \"R4\" matches R499 and so on. Leave empty to include all PSC codes.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies (text match)",
            "type": "array",
            "description": "Case-insensitive text match on the awarding department or sub-agency name, e.g. \"VETERANS\", \"HEALTH\". An award is kept if any entry matches. Leave empty to include all. Matching happens after download, so combine it with a NAICS or PSC code to keep runs short.",
            "items": {
              "type": "string"
            }
          },
          "recipientStates": {
            "title": "Recipient states (two-letter codes)",
            "type": "array",
            "description": "Two-letter US state codes of the recipient's location, e.g. TX. Leave empty to include all.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states (two-letter codes)",
            "type": "array",
            "description": "Two-letter US state codes where the work is performed, e.g. VA. Leave empty to include all.",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with a total obligated amount of at least this value, in US dollars. Leave empty for no minimum."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Only awards with a total obligated amount of at most this value, in US dollars. Leave empty for no maximum."
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms passed to USAspending's own keyword search; USAspending decides which award text is matched. Leave empty to skip.",
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "Lookback window (days)",
            "minimum": 1,
            "maximum": 90,
            "type": "integer",
            "description": "How many days back to look, from 1 to 90. What counts depends on the date mode: newly published, signed, or any action. With \"Only new since last run\" on, the first run returns everything in this window, up to Max items.",
            "default": 7
          },
          "dateMode": {
            "title": "Date mode",
            "enum": [
              "published",
              "signed",
              "anyAction"
            ],
            "type": "string",
            "description": "What the lookback window refers to. \"Newly published\" (default, best for a daily new-awards feed): awards added to or changed in USAspending in the window, kept if signed within the max award age; this also catches awards reported late, such as Department of Defense awards that appear about 90 days after signing. \"Signed\": base award signed inside the window; late-reported awards fall out of a short window. \"Any action\": any award with an action, such as a modification, in the window.",
            "default": "published"
          },
          "maxAwardAgeDays": {
            "title": "Max award age (days since signed)",
            "minimum": 0,
            "maximum": 730,
            "type": "integer",
            "description": "Newly published mode only: skip awards signed more than this many days ago, which drops older awards that were only modified recently. Default 180, maximum 730. Raise it to also catch very late reports; set 0 to keep all ages.",
            "default": 180
          },
          "includeIdvs": {
            "title": "Include IDVs",
            "type": "boolean",
            "description": "Also include indefinite-delivery vehicles (GWAC, IDC, FSS, BOA, BPA), read after the regular contracts. Off by default: only definitive contracts, purchase orders, delivery orders and BPA calls.",
            "default": false
          },
          "onlyNew": {
            "title": "Only new since last run (turn on for scheduled monitoring)",
            "type": "boolean",
            "description": "Turn this on in your scheduled task to return only awards not seen in earlier runs with the same filters, so a scheduled run gives you just the new awards. The list of seen awards is kept per filter combination (including date mode and IDV setting) in the named key-value store \"usaspending-awards-state\" in your account. Off (the default) gives all matches in the window on every run.",
            "default": false
          },
          "resetState": {
            "title": "Reset saved state",
            "type": "boolean",
            "description": "Forget which awards were already seen for these filters and treat this run as a first run. Only applies when \"Only new since last run\" is on.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many results. You are charged per result, so this keeps the cost of a run predictable. Largest awards come first; awards beyond the cap are returned on the next run when \"Only new since last run\" is on.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}