{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards 🏛️ (new contract & grant alerts)",
    "description": "Pull every US federal contract, grant, loan or direct payment on the official USAspending.gov API, filtered by agency, recipient, NAICS, keyword or state. Monitor mode returns only awards that are new since your last run. No SAM.gov login, no API key. From $2 per 1,000 awards.",
    "version": "0.1",
    "x-build-id": "0c1XfBDIINcUaW87C"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tagadanar~usaspending-federal-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tagadanar-usaspending-federal-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/tagadanar~usaspending-federal-awards/runs": {
      "post": {
        "operationId": "runs-sync-tagadanar-usaspending-federal-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/tagadanar~usaspending-federal-awards/run-sync": {
      "post": {
        "operationId": "run-sync-tagadanar-usaspending-federal-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": {
          "awardTypes": {
            "title": "Award types",
            "type": "array",
            "description": "Which kinds of federal awards to pull. <code>Contracts</code> = A/B/C/D, <code>Grants</code> = 02/03/04/05, <code>Loans</code> = 07/08, <code>Direct payments</code> = 06/10, <code>Other</code> = 09/11. Pick one or more. Defaults to Contracts.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "grants",
                "loans",
                "direct_payments",
                "other"
              ],
              "enumTitles": [
                "Contracts",
                "Grants",
                "Loans",
                "Direct payments",
                "Other"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier awarding agency names, exactly as USAspending spells them, e.g. <code>Department of Defense</code>, <code>Department of Health and Human Services</code>, <code>National Aeronautics and Space Administration</code>. Multiple entries broaden the search (OR).",
            "items": {
              "type": "string"
            }
          },
          "recipientSearch": {
            "title": "Recipient name search",
            "type": "array",
            "description": "Company or organization name terms to match on the recipient, e.g. <code>Boeing</code>, <code>Leidos</code>. Matches the recipient name text on the award.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Industry codes to filter by, e.g. <code>541511</code> (custom computer programming), <code>541330</code> (engineering services). Contracts only; grants and loans carry no NAICS.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text keywords matched across the award, e.g. <code>cybersecurity</code>, <code>satellite</code>. Combined as the API's keyword filter.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state codes where the work is performed, e.g. <code>VA</code>, <code>CA</code>, <code>TX</code>. Leave empty for all states.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lastNDays": {
            "title": "Last N days",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Look back this many days from today (by award action date window). Ignored when a fiscal year is set. Use a small window for a scheduled monitor.",
            "default": 30
          },
          "fiscalYear": {
            "title": "Fiscal year (optional)",
            "minimum": 2008,
            "maximum": 2030,
            "type": "integer",
            "description": "US federal fiscal year to pull instead of the last-N-days window, e.g. <code>2025</code> covers 2024-10-01 through 2025-09-30. Leave empty to use Last N days."
          },
          "maxResults": {
            "title": "Max results per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after collecting this many awards. Caps cost and runtime on broad queries. Results come sorted by award amount, largest first.",
            "default": 200
          },
          "monitorMode": {
            "title": "Monitor mode (alert on new awards only)",
            "type": "boolean",
            "description": "Remember award IDs already seen across runs and return only awards that are new since last time. Built for a scheduled run: the first run establishes the baseline, later runs report and charge for new awards only.",
            "default": false
          },
          "webhookUrl": {
            "title": "Webhook URL (Slack-compatible)",
            "type": "string",
            "description": "When monitor mode finds new awards, post a text digest here (Slack incoming webhook or any endpoint accepting <code>{\"text\": \"...\"}</code> JSON)."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}