{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards Feed + Changes",
    "description": "Clean, flat federal award records from the official USAspending.gov API, filtered by date, award type, agency, recipient, place, and amount, with a what-changed-since-last-run mode. Billed only per delivered award, no start fee.",
    "version": "0.0",
    "x-build-id": "K9HgwcniWsAqxQipb"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/thoob~federal-spending-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-thoob-federal-spending-feed",
        "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/thoob~federal-spending-feed/runs": {
      "post": {
        "operationId": "runs-sync-thoob-federal-spending-feed",
        "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/thoob~federal-spending-feed/run-sync": {
      "post": {
        "operationId": "run-sync-thoob-federal-spending-feed",
        "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": {
          "startDate": {
            "title": "Start date",
            "type": "string",
            "description": "Award action date window start, YYYY-MM-DD. The API accepts dates back to 2007-10-01; earlier values are clamped. Leave empty to use the last 365 days."
          },
          "endDate": {
            "title": "End date",
            "type": "string",
            "description": "Award action date window end, YYYY-MM-DD. Leave empty to use today."
          },
          "awardTypes": {
            "title": "Award type groups",
            "type": "array",
            "description": "Friendly award groups to include: contracts, idvs, grants, loans, direct_payments, other_financial_assistance, all_contracts, all_assistance. Combined with any raw codes below. Leave both empty to default to contracts.",
            "items": {
              "type": "string"
            }
          },
          "awardTypeCodes": {
            "title": "Raw award type codes",
            "type": "array",
            "description": "Optional. Exact USAspending award type codes (for example A, B, C, D for contracts; 02, 03, 04, 05 for grants; IDV_A..IDV_E for IDVs). Use this for precise control instead of the groups above.",
            "items": {
              "type": "string"
            }
          },
          "recipientSearch": {
            "title": "Recipient name contains",
            "type": "array",
            "description": "Optional. Keep only awards whose recipient matches these terms (for example Lockheed, Johns Hopkins). Matched server-side by USAspending.",
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Optional. Top-tier awarding agency names to keep (for example Department of Defense, Department of Health and Human Services). Each entry is matched as an awarding top-tier agency.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Optional. Two-letter US state codes for the place of performance (for example CA, TX, NY). Leave empty for anywhere.",
            "items": {
              "type": "string"
            }
          },
          "keyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Optional. A free-text term matched by USAspending across the award, and re-checked here against recipient name and description."
          },
          "awardAmountMin": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Keep only awards at or above this dollar amount."
          },
          "awardAmountMax": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Keep only awards at or below this dollar amount."
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "full",
              "changes"
            ],
            "type": "string",
            "description": "full returns every award matching your filter. changes returns only awards that are new, have a newer last-modified date, or have a changed amount since this account's last run, tracked per account. The first changes run has no baseline, so it returns everything matching once, then tracks deltas.",
            "default": "full"
          },
          "maxRecords": {
            "title": "Max delivered records",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety cap on how many awards this run delivers and bills. 0 means no cap. In changes mode, awards beyond the cap are not dropped: they are delivered on a later run, never billed twice. The platform spend cap (ACTOR_MAX_TOTAL_CHARGE_USD) is honored regardless.",
            "default": 0
          },
          "pageSize": {
            "title": "API page size",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many awards to request per API page (1 to 100). The default is the API maximum.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}