{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper: Federal Contracts & Grants Awards",
    "description": "Government contracts and federal grants award data from the official USAspending.gov API: obligated amount, recipient UEI, agency, NAICS, PSC, state, dates. Only new or modified awards each run for award alerts, free Excel report, no API key. Unofficial tool.",
    "version": "0.1",
    "x-build-id": "3UdIhUsCmFo1aUQVY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dafei-data~usaspending-awards-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dafei-data-usaspending-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/dafei-data~usaspending-awards-scraper/runs": {
      "post": {
        "operationId": "runs-sync-dafei-data-usaspending-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/dafei-data~usaspending-awards-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-dafei-data-usaspending-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Full-text keywords (OR-combined) searched across award description, recipient and other text.",
            "items": {
              "type": "string"
            }
          },
          "awardGroups": {
            "title": "Award groups",
            "type": "array",
            "description": "'contracts' (A-D), 'idvs' (IDV contract vehicles), 'grants' (02-05). Direct payments, loans, insurance and other assistance are not offered (they are mostly payments to individuals). maxItems is split evenly across groups.",
            "default": [
              "contracts"
            ],
            "items": {
              "type": "string"
            }
          },
          "agencies": {
            "title": "Awarding agencies (top-tier)",
            "type": "array",
            "description": "Exact names, e.g. \"Department of Defense\", \"Department of Homeland Security\".",
            "items": {
              "type": "string"
            }
          },
          "subAgencies": {
            "title": "Awarding sub-agencies",
            "type": "array",
            "description": "Exact names, e.g. \"Department of the Army\".",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Contracts/IDVs only. 2-6 digit prefixes, e.g. 541512.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Contracts/IDVs only. Product/Service Codes, e.g. DA10, R425.",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "2-letter US state codes, e.g. VA, MD, CA.",
            "items": {
              "type": "string"
            }
          },
          "recipients": {
            "title": "Recipient search",
            "type": "array",
            "description": "Company name or UEI text.",
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "Date from",
            "type": "string",
            "description": "YYYY-MM-DD. Default: 7 days ago. Earliest 2007-10-01. Note: grant data is typically published weeks later than contracts."
          },
          "dateTo": {
            "title": "Date to",
            "type": "string",
            "description": "YYYY-MM-DD. Default: today."
          },
          "dateType": {
            "title": "Date type",
            "enum": [
              "action_date",
              "last_modified_date",
              "date_signed"
            ],
            "type": "string",
            "description": "Which award date the range applies to. Use last_modified_date for daily monitoring.",
            "default": "action_date"
          },
          "minAmount": {
            "title": "Min award amount (USD)",
            "type": "integer",
            "description": "Optional."
          },
          "maxAmount": {
            "title": "Max award amount (USD)",
            "type": "integer",
            "description": "Optional."
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Maximum awards to output per run (each is one billable result).",
            "default": 100
          },
          "incremental": {
            "title": "Only new / modified awards",
            "type": "boolean",
            "description": "Remember delivered awards (award + last-modified date) in a named key-value store and skip them next run.",
            "default": true
          },
          "stateStoreName": {
            "title": "State store name",
            "type": "string",
            "description": "Use different names for different saved searches.",
            "default": "usaspending-seen-ids"
          },
          "includeRecipientName": {
            "title": "Include recipient name",
            "type": "boolean",
            "description": "Output the recipient (company) name. Names are only output for awards whose base obligation / start date is on or after 2022-04-04 (UEI transition: names come from SAM.gov registrations). For older awards the name may be D&B Open Data, so it is left empty (UEI is still given). Set false to output UEI only.",
            "default": true
          },
          "excelReport": {
            "title": "Formatted Excel report",
            "type": "boolean",
            "description": "Also save a ready-to-share Excel file (REPORT.xlsx) to the run's default key-value store: styled header, frozen first row, filters, clickable links and number-formatted amount and date columns. Free: it does not add any charge and does not change the dataset.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}