{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards Tracker (Contracts & Grants)",
    "description": "Federal contract and grant awards from the official USAspending.gov API: recipient, amount, agency, NAICS/PSC, CFDA, dates and award links.",
    "version": "0.3",
    "x-build-id": "aoR7dtbF6XjNxZNko"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nominal_holmium~usaspending-awards-tracker/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nominal_holmium-usaspending-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/nominal_holmium~usaspending-awards-tracker/runs": {
      "post": {
        "operationId": "runs-sync-nominal_holmium-usaspending-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/nominal_holmium~usaspending-awards-tracker/run-sync": {
      "post": {
        "operationId": "run-sync-nominal_holmium-usaspending-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": {
          "awardCategories": {
            "title": "Award categories",
            "type": "array",
            "description": "Which kinds of awards to fetch: contracts, idvs (indefinite-delivery vehicles), grants, loans, direct_payments, other.",
            "default": [
              "contracts"
            ],
            "items": {
              "type": "string"
            }
          },
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "Awards in the last N days (ignored when a start date is given). Contracts show up within days. Grants and other assistance are reported weeks late, so use 60-90 for them.",
            "default": 7
          },
          "startDate": {
            "title": "Start date (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional. Overrides Days back. Earliest supported is 2007-10-01."
          },
          "endDate": {
            "title": "End date (YYYY-MM-DD)",
            "type": "string",
            "description": "Optional. Defaults to today."
          },
          "dateType": {
            "title": "Date filter applies to",
            "enum": [
              "action_date",
              "last_modified_date",
              "date_signed",
              "new_awards_only"
            ],
            "type": "string",
            "description": "Which date the period filters on. 'New awards only' gives a feed of awards whose first action falls in the period.",
            "default": "new_awards_only"
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Top-tier agency names exactly as USAspending writes them, e.g. \"Department of Defense\", \"Department of Health and Human Services\".",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms matched across award descriptions and other text, e.g. \"cybersecurity\".",
            "items": {
              "type": "string"
            }
          },
          "recipients": {
            "title": "Recipient names or UEIs",
            "type": "array",
            "description": "Track specific companies or organisations.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter state codes, e.g. VA, TX.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (contracts)",
            "type": "array",
            "description": "e.g. 541512. Applies to contracts and IDVs.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (contracts)",
            "type": "array",
            "description": "Product/service codes, e.g. D310. Applies to contracts and IDVs.",
            "items": {
              "type": "string"
            }
          },
          "cfdaNumbers": {
            "title": "Assistance listing (CFDA) numbers (grants)",
            "type": "array",
            "description": "e.g. 93.837. Applies to grants, loans and other assistance.",
            "items": {
              "type": "string"
            }
          },
          "minAmount": {
            "title": "Minimum award amount ($)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip awards below this amount. 0 = no minimum.",
            "default": 0
          },
          "maxAmount": {
            "title": "Maximum award amount ($), 0 = no limit",
            "minimum": 0,
            "type": "integer",
            "description": "Skip awards above this amount.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "Award Amount",
              "Start Date",
              "Last Modified Date"
            ],
            "type": "string",
            "description": "Order of results within each category. Last Modified Date (default) shows the most recently updated awards first; Start Date can put awards that start next year at the top.",
            "default": "Last Modified Date"
          },
          "sortOrder": {
            "title": "Sort order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "desc = newest or largest first.",
            "default": "desc"
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Cap per award category.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}