{
  "openapi": "3.0.1",
  "info": {
    "title": "Federal Contract Awards Tracker: New US Government Awards",
    "description": "Who just won US federal contracts? New contract, IDV, grant and loan awards from the official USAspending API. Filter by agency, NAICS, PSC, state, recipient, set-aside and amount. Delta mode for daily alerts.",
    "version": "1.0",
    "x-build-id": "NUMhyFruklKauVOaf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datacrate~federal-contract-awards-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datacrate-federal-contract-awards-tracker",
        "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/datacrate~federal-contract-awards-tracker/runs": {
      "post": {
        "operationId": "runs-sync-datacrate-federal-contract-awards-tracker",
        "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/datacrate~federal-contract-awards-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-datacrate-federal-contract-awards-tracker",
        "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": {
          "awardKind": {
            "title": "Award type",
            "enum": [
              "contracts",
              "idvs",
              "grants",
              "loans"
            ],
            "type": "string",
            "description": "Contracts (purchase orders, definitive contracts, delivery orders), IDVs (indefinite-delivery vehicles and framework agreements), grants (block, formula, project, cooperative agreements) or loans.",
            "default": "contracts"
          },
          "sinceDays": {
            "title": "Look back (days)",
            "minimum": 1,
            "maximum": 365,
            "type": "integer",
            "description": "How many days back to search. Federal agencies report with a delay, so 7 to 30 days is typical.",
            "default": 7
          },
          "dateMode": {
            "title": "Which awards",
            "enum": [
              "newAwardsOnly",
              "anyActivity"
            ],
            "type": "string",
            "description": "New awards only = awards first obligated in the period. Any activity = also awards that were modified in the period (adds, option exercises, funding changes).",
            "default": "newAwardsOnly"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Match words in the award description, e.g. cybersecurity, drones, janitorial. Any keyword matches.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier agency names as shown on USAspending, e.g. Department of Homeland Security, National Aeronautics and Space Administration. Empty = all agencies.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes (contracts and IDVs). A prefix matches the whole branch, e.g. 5415 for computer services.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "Product/service codes (PSC)",
            "type": "array",
            "description": "Contracts and IDVs, e.g. D302, R425, 1560.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "placeStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state codes, e.g. TX, VA.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "recipientSearch": {
            "title": "Recipient name contains",
            "type": "string",
            "description": "Company or organisation name text, e.g. Lockheed, Booz Allen."
          },
          "setAsideCodes": {
            "title": "Set-aside codes",
            "type": "array",
            "description": "Contracts and IDVs only, e.g. SBA (small business), 8A, HZC (HUBZone), SDVOSBC (service-disabled veteran-owned), WOSB.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep awards of at least this size."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Keep awards up to this size. Leave empty for no limit."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "amount",
              "lastModified",
              "startDate"
            ],
            "type": "string",
            "description": "Largest awards first, most recently modified first, or newest start date first.",
            "default": "amount"
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper bound on rows (and on cost).",
            "default": 25
          },
          "onlyNewSinceLastRun": {
            "title": "Delta mode (only new or changed since last run)",
            "type": "boolean",
            "description": "Skip awards returned by an earlier run with the same state name unless they were modified since. The first run returns everything and sets the baseline.",
            "default": false
          },
          "stateKey": {
            "title": "State name (delta mode)",
            "type": "string",
            "description": "Use different names to keep separate watchlists.",
            "default": "default"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}