{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards Scraper (Contracts & Grants)",
    "description": "Extract US federal award records from the official USAspending.gov Treasury API — contracts, grants, loans and direct payments with recipient, amount, agency, NAICS/PSC/CFDA, and dates. Filter by keyword, recipient, agency, code, state, amount, and date. Pay per award record.",
    "version": "0.1",
    "x-build-id": "gL9Qi0ycSyGdLEcPF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cblu~usaspending-federal-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cblu-usaspending-federal-awards-scraper",
        "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/cblu~usaspending-federal-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cblu-usaspending-federal-awards-scraper",
        "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/cblu~usaspending-federal-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cblu-usaspending-federal-awards-scraper",
        "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 categories of federal award to search. Contract and assistance types are queried separately and merged.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "contract-idvs",
                "grants",
                "direct-payments",
                "loans",
                "other"
              ],
              "enumTitles": [
                "Contracts",
                "Contract IDVs",
                "Grants",
                "Direct payments",
                "Loans",
                "Other financial assistance"
              ]
            },
            "default": [
              "contracts",
              "grants"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text keywords matched against award descriptions and recipients, e.g. <code>cybersecurity</code>, <code>solar</code>.",
            "items": {
              "type": "string"
            }
          },
          "recipientSearchText": {
            "title": "Recipient name",
            "type": "array",
            "description": "Recipient (awardee) name search, e.g. <code>Lockheed</code>, <code>University of Texas</code>.",
            "items": {
              "type": "string"
            }
          },
          "awardingAgency": {
            "title": "Awarding agency",
            "type": "string",
            "description": "Top-tier awarding agency name, e.g. <code>Department of Defense</code>, <code>Department of Health and Human Services</code>."
          },
          "naicsCodes": {
            "title": "NAICS codes (contracts)",
            "type": "array",
            "description": "Industry NAICS codes (contracts only), e.g. <code>236220</code> (commercial building construction).",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes (contracts)",
            "type": "array",
            "description": "Product/Service codes (contracts only), e.g. <code>D307</code> (IT services).",
            "items": {
              "type": "string"
            }
          },
          "cfdaNumbers": {
            "title": "CFDA / Assistance Listing numbers (grants)",
            "type": "array",
            "description": "Assistance Listing (CFDA) program numbers for grants/assistance, e.g. <code>93.778</code> (Medicaid).",
            "items": {
              "type": "string"
            }
          },
          "recipientStates": {
            "title": "Recipient states",
            "type": "array",
            "description": "Two-letter state codes of the recipient's location, e.g. <code>TX</code>.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Two-letter state codes where the work is performed.",
            "items": {
              "type": "string"
            }
          },
          "timePeriodStart": {
            "title": "Awarded on/after",
            "type": "string",
            "description": "Only awards with an action date on or after this date (YYYY-MM-DD). Defaults to 365 days ago."
          },
          "timePeriodEnd": {
            "title": "Awarded on/before",
            "type": "string",
            "description": "Only awards with an action date on or before this date (YYYY-MM-DD). Defaults to today."
          },
          "minAwardAmount": {
            "title": "Minimum award amount (USD)",
            "type": "integer",
            "description": "Only awards at or above this dollar amount."
          },
          "maxAwardAmount": {
            "title": "Maximum award amount (USD)",
            "type": "integer",
            "description": "Only awards at or below this dollar amount."
          },
          "includeRecipientAddress": {
            "title": "Include recipient mailing address",
            "type": "boolean",
            "description": "Enrich every award with the recipient's mailing address and business categories (one extra API call per award — slower).",
            "default": false
          },
          "includeRawData": {
            "title": "Include raw award record",
            "type": "boolean",
            "description": "Attach the complete raw USAspending search result to every record under <code>raw</code>.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Maximum number of award records to return. You are only charged for records actually returned.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}