{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards - Contracts, Grants, Loans",
    "description": "U.S. federal spending awards from the official USAspending.gov API: recipient (companies and organizations only), UEI, agency, award type, obligated/outlayed amounts, dates, NAICS, PSC, Assistance Listing, county/city of performance. No API key. Unofficial; not affiliated with the U.S. Treasury.",
    "version": "0.1",
    "x-build-id": "3vFmrB1eHJMLSen1P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~us-federal-spending/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-us-federal-spending",
        "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/jpopendata~us-federal-spending/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-us-federal-spending",
        "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/jpopendata~us-federal-spending/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-us-federal-spending",
        "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 awards: contracts, idvs (contract vehicles such as IDIQs and BPAs), grants, direct_payments, loans, other (insurance and other assistance), assistance (= grants + direct payments + loans + other) or all. Single USAspending codes work too, e.g. \"A\" (BPA call), \"D\" (definitive contract), \"04\" (project grant), \"07\" (direct loan). Empty = contracts and grants.",
            "default": [
              "contracts",
              "grants"
            ],
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Optional. Words searched by USAspending across the award (description, award ID, recipient, programme...), at least 3 characters each, e.g. \"cybersecurity\", \"wildfire\", \"broadband\". An award matches if it contains ANY of them. Note: with a keyword search, awards whose recipient may be a person are left out entirely.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "recipientName": {
            "title": "Recipient (company or organisation)",
            "type": "string",
            "description": "Optional. Part of the recipient's name or its UEI, e.g. \"Lockheed Martin\", \"Johns Hopkins\" or \"LUJEPCRRT377\". Only companies and organisations are named in the output.",
            "default": ""
          },
          "agencies": {
            "title": "Agencies",
            "type": "array",
            "description": "Optional. Federal agencies or sub-agencies, by name or abbreviation, e.g. \"Department of Defense\", \"DoD\", \"NASA\", \"VA\", \"HHS\", \"National Institutes of Health\", \"Department of the Army\", \"FEMA\". Any of them counts. Unknown names stop the run with the closest matches.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agencyRole": {
            "title": "Agency role",
            "enum": [
              "awarding",
              "funding"
            ],
            "type": "string",
            "description": "Whether the agencies above must be the awarding agency (the one that signed the award) or the funding agency (the one whose money it is).",
            "default": "awarding"
          },
          "states": {
            "title": "Place of performance: states",
            "type": "array",
            "description": "Optional. U.S. states or territories where the work is done, as codes or names, e.g. \"VA\", \"Texas\", \"DC\", \"Puerto Rico\". Any of them counts.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (contracts and IDVs)",
            "type": "array",
            "description": "Optional. 2 to 6 digit NAICS codes or prefixes, e.g. \"541512\" (computer systems design) or \"54\" (all professional services). Applies to contracts and IDVs; assistance awards have no NAICS.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (contracts and IDVs)",
            "type": "array",
            "description": "Optional. 4-character Product and Service Codes, e.g. \"D302\" (IT systems development), \"R425\" (engineering support), \"7030\" (software).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "assistanceListings": {
            "title": "Assistance Listings (CFDA numbers)",
            "type": "array",
            "description": "Optional. Assistance Listing numbers for grants, loans and other assistance, e.g. \"93.778\" (Medicaid), \"20.205\" (highway planning and construction), \"10.551\" (SNAP).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "awardIds": {
            "title": "Award IDs",
            "type": "array",
            "description": "Optional. Contract numbers (PIID), grant numbers (FAIN) or URIs, e.g. \"DENA0003525\" or \"UM1AI068619\", matched by USAspending's award ID search.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "type": "integer",
            "description": "Optional. Smallest award amount in whole dollars, e.g. 1000000 (obligated amount; face value for loans)."
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "type": "integer",
            "description": "Optional. Largest award amount in dollars, e.g. 25000000."
          },
          "daysBack": {
            "title": "Days back",
            "type": "integer",
            "description": "Window length in days ending today (or on Date to). Ignored when Date from is set.",
            "default": 30
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "Optional. First day of the window, YYYY-MM-DD, e.g. \"2025-10-01\". MM/DD/YYYY, \"today\", \"yesterday\" and fiscal years (\"FY2025\" = 2024-10-01) work too. The earliest date USAspending searches is 2007-10-01.",
            "default": ""
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "Optional. Last day of the window, YYYY-MM-DD (\"FY2025\" = 2025-09-30). Empty = today.",
            "default": ""
          },
          "dateType": {
            "title": "What the dates mean",
            "enum": [
              "active",
              "new",
              "modified"
            ],
            "type": "string",
            "description": "active: awards with any activity (an obligation or modification) in the window - USAspending's own default. new: only awards first signed in the window. modified: awards whose record changed in the window.",
            "default": "active"
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "amount",
              "newest",
              "lastModified"
            ],
            "type": "string",
            "description": "Order of the rows (the run returns the first maxItems in this order): largest amount first (obligated amount; face value for loans), newest award first (base obligation date) or most recently modified first.",
            "default": "amount"
          },
          "maxItems": {
            "title": "Maximum awards",
            "type": "integer",
            "description": "Maximum number of award rows to return (1..100000). Pages are read 100 awards at a time, at least 1.5 seconds apart.",
            "default": 100
          },
          "verifyRecipients": {
            "title": "Verify unclear recipients",
            "type": "boolean",
            "description": "When a recipient name does not show whether it is a company or a person (e.g. \"THE BOEING COMPANY\", \"SMITH CONTRACTING\"), look up its business type on USAspending once per recipient: companies and organisations are named, sole proprietors and people are withheld. Off = unclear recipients are withheld.",
            "default": true
          },
          "maxRecipientLookups": {
            "title": "Maximum recipient lookups",
            "type": "integer",
            "description": "Upper limit on business-type lookups per run (0..5000). Each lookup is one extra request. Recipients beyond the limit are withheld.",
            "default": 200
          },
          "maxApiRequests": {
            "title": "Request budget",
            "type": "integer",
            "description": "Hard cap on requests to the USAspending API in this run. 0 = automatic (enough for maxItems plus lookups).",
            "default": 0
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: the USAspending API answers Apify datacenter IPs directly. Leave off.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}