{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards",
    "description": "Search US federal contracts and awards from the official USAspending API and save flat rows to a dataset. A Standby MCP server lets agents search awards, open one award, and total spending by agency or recipient.",
    "version": "0.1",
    "x-build-id": "1k2yoggxAuwezOehI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nichedata-lab~usaspending-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nichedata-lab-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/nichedata-lab~usaspending-awards/runs": {
      "post": {
        "operationId": "runs-sync-nichedata-lab-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/nichedata-lab~usaspending-awards/run-sync": {
      "post": {
        "operationId": "run-sync-nichedata-lab-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Words matched against award descriptions and related text. All keywords are sent together. Leave empty to skip keyword filtering.",
            "items": {
              "type": "string"
            }
          },
          "awardTypeCodes": {
            "title": "Award types",
            "type": "array",
            "description": "USAspending award type codes. The default is contract awards A–D. IDV codes are vehicles such as GWACs and BPAs. Codes 02–11 are legacy assistance types. Codes F001–F010 are the current assistance types the search API also accepts.",
            "items": {
              "type": "string",
              "enum": [
                "A",
                "B",
                "C",
                "D",
                "IDV_A",
                "IDV_B",
                "IDV_B_A",
                "IDV_B_B",
                "IDV_B_C",
                "IDV_C",
                "IDV_D",
                "IDV_E",
                "02",
                "03",
                "04",
                "05",
                "06",
                "07",
                "08",
                "09",
                "10",
                "11",
                "-1",
                "F001",
                "F002",
                "F003",
                "F004",
                "F005",
                "F006",
                "F007",
                "F008",
                "F009",
                "F010"
              ],
              "enumTitles": [
                "BPA Call (A)",
                "Purchase Order (B)",
                "Delivery Order (C)",
                "Definitive Contract (D)",
                "GWAC (IDV_A)",
                "IDC Multi-Agency / Other IDC (IDV_B)",
                "IDC Requirements (IDV_B_A)",
                "IDC Indefinite Quantity (IDV_B_B)",
                "IDC Definite Quantity (IDV_B_C)",
                "Federal Supply Schedule (IDV_C)",
                "Basic Ordering Agreement (IDV_D)",
                "Blanket Purchase Agreement (IDV_E)",
                "Block Grant, legacy (02)",
                "Formula Grant, legacy (03)",
                "Project Grant, legacy (04)",
                "Cooperative Agreement, legacy (05)",
                "Direct Payment for Specified Use, legacy (06)",
                "Direct Loan, legacy (07)",
                "Guaranteed/Insured Loan, legacy (08)",
                "Insurance, legacy (09)",
                "Direct Payment with Unrestricted Use, legacy (10)",
                "Other Financial Assistance, legacy (11)",
                "Not Specified (-1)",
                "Grant (F001)",
                "Cooperative Agreement (F002)",
                "Direct Loan (F003)",
                "Loan Guarantee (F004)",
                "Indemnity / Insurance, non-loan (F005)",
                "Direct Payment for Specified Use (F006)",
                "Direct Payment with Unrestricted Use (F007)",
                "Asset Forfeiture / Equitable Sharing (F008)",
                "Sale, Exchange, or Donation of Property and Goods (F009)",
                "Other Financial Assistance (F010)"
              ]
            },
            "default": [
              "A",
              "B",
              "C",
              "D"
            ]
          },
          "awardingAgency": {
            "title": "Awarding agency",
            "type": "string",
            "description": "Exact top-tier awarding agency name as published by USAspending, for example Department of Homeland Security. Leave empty to include every agency."
          },
          "fundingAgency": {
            "title": "Funding agency",
            "type": "string",
            "description": "Exact top-tier funding agency name. Leave empty to include every funding agency."
          },
          "recipient": {
            "title": "Recipient",
            "type": "string",
            "description": "One recipient name or UEI. USAspending matches this text against the recipient name and UEI. A legacy DUNS number also matches on the API, but this Actor never returns DUNS numbers."
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "NAICS codes or prefixes. A row matches when its NAICS code starts with one of these values. Example: 541512 for computer systems design services.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Product and Service Codes. Example: J069.",
            "items": {
              "type": "string"
            }
          },
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "First action date to include, YYYY-MM-DD. The search API's earliest date is 2007-10-01. The date is the latest transaction date on the award (action_date).",
            "default": "2025-10-01"
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Last action date to include, YYYY-MM-DD.",
            "default": "2026-09-30"
          },
          "minAmount": {
            "title": "Minimum award amount",
            "minimum": 0,
            "type": "number",
            "description": "Smallest award amount, in US dollars. Leave empty for no minimum."
          },
          "maxAmount": {
            "title": "Maximum award amount",
            "minimum": 0,
            "type": "number",
            "description": "Largest award amount, in US dollars. Leave empty for no maximum."
          },
          "popCountry": {
            "title": "Place of performance country",
            "type": "string",
            "description": "3-letter country code. Use USA, or FOREIGN for every non-US place. If you set a state, city, or ZIP and leave this empty, the Actor uses USA."
          },
          "popState": {
            "title": "Place of performance state",
            "type": "string",
            "description": "2-letter US state or territory code, for example VA."
          },
          "popCity": {
            "title": "Place of performance city",
            "type": "string",
            "description": "City name. Without a state, this matches that city name in every state."
          },
          "popZip": {
            "title": "Place of performance ZIP",
            "type": "string",
            "description": "5-digit US ZIP code."
          },
          "maxItems": {
            "title": "Maximum awards",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many award rows to save. The Actor requests one page at a time and stops at this number. Minimum 1, maximum 200.",
            "default": 10
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "awardAmount",
              "startDate",
              "endDate",
              "lastModifiedDate"
            ],
            "type": "string",
            "description": "Field used to order the awards before the maximum is applied.",
            "default": "awardAmount"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "desc puts the largest or newest values first, depending on the sort field.",
            "default": "desc"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}