{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper – US Federal Contract & Grant Awards",
    "description": "Search US federal contract, grant and loan awards from USAspending.gov's official API. Filter by keyword, company, NAICS, PSC, agency, state, set-aside and amount. Get recipient, UEI, award value, dates and links. No API key.",
    "version": "1.0",
    "x-build-id": "q3oqiXEvzTuMAycxv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/iamshytv~usaspending-awards/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-iamshytv-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/iamshytv~usaspending-awards/runs": {
      "post": {
        "operationId": "runs-sync-iamshytv-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/iamshytv~usaspending-awards/run-sync": {
      "post": {
        "operationId": "run-sync-iamshytv-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": {
          "awardTypes": {
            "title": "Award types",
            "type": "array",
            "description": "Which kinds of federal awards to search. Each type is searched separately and results are combined. Default: contracts.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants",
                "direct_payments",
                "loans",
                "other"
              ],
              "enumTitles": [
                "Contracts (definitive contracts, purchase/delivery orders)",
                "Contract vehicles / IDVs (GWACs, IDIQs, BPAs)",
                "Grants (block, formula, project, cooperative agreements)",
                "Direct payments",
                "Loans",
                "Other financial assistance"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Full-text search across award descriptions, recipient names and IDs. An award matches if it contains any keyword (min 3 characters). Leave empty for all awards.",
            "default": [
              "software"
            ],
            "items": {
              "type": "string"
            }
          },
          "recipientNames": {
            "title": "Recipient (company) names or UEIs",
            "type": "array",
            "description": "Only awards to recipients whose name or UEI contains one of these, e.g. 'Palantir' or 'Booz Allen'. Great for competitor and customer research.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Contracts only. 2 to 6 digit NAICS codes, e.g. 541511 (custom programming) or 5415.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Contracts only. Product and Service Codes, e.g. DA10 (SaaS) or R499.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "assistanceListings": {
            "title": "Assistance Listing (ALN/CFDA) numbers",
            "type": "array",
            "description": "Grants and assistance only, e.g. 47.084 or 93.855.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Exact top-tier agency names as shown on USAspending, e.g. 'Department of Defense', 'National Science Foundation', 'Department of Veterans Affairs'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "Place of performance states",
            "type": "array",
            "description": "Two-letter US state codes, e.g. VA, CA, TX.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "recipientTypes": {
            "title": "Recipient types",
            "type": "array",
            "description": "Optional business-type filters using USAspending codes, e.g. small_business, other_than_small_business, woman_owned_business, veteran_owned_business, minority_owned_business, nonprofit, higher_education, government.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "setAsideTypes": {
            "title": "Set-aside type codes",
            "type": "array",
            "description": "Contracts only. FPDS set-aside codes, e.g. SBA (small business), 8A, HZC (HUBZone), SDVOSBC, WOSB.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "lookbackDays": {
            "title": "Awards with activity in the last N days",
            "minimum": 0,
            "maximum": 7000,
            "type": "integer",
            "description": "Time window ending today (ignored if a start date is set). 0 = since Oct 2007. Grants and other assistance are reported with a lag of several weeks, so use 90+ days for them.",
            "default": 30
          },
          "startDate": {
            "title": "Start date (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional fixed window start. Earliest supported: 2007-10-01.",
            "default": ""
          },
          "endDate": {
            "title": "End date (YYYY-MM-DD)",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Optional fixed window end. Default: today.",
            "default": ""
          },
          "dateType": {
            "title": "Date the window applies to",
            "enum": [
              "action_date",
              "date_signed",
              "last_modified_date",
              "new_awards_only"
            ],
            "type": "string",
            "description": "How the time window is matched. 'New awards only' returns awards first made inside the window.",
            "default": "action_date"
          },
          "minAmount": {
            "title": "Minimum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no minimum.",
            "default": 0
          },
          "maxAmount": {
            "title": "Maximum award amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no maximum.",
            "default": 0
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "Award Amount",
              "Last Modified Date",
              "Start Date",
              "End Date",
              "Base Obligation Date",
              "Recipient Name"
            ],
            "type": "string",
            "description": "Sort order of results within each award type (loans sort by loan value).",
            "default": "Award Amount"
          },
          "order": {
            "title": "Order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Sort direction.",
            "default": "desc"
          },
          "maxResults": {
            "title": "Max awards per award type",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many awards for each selected award type. You pay per award returned.",
            "default": 100
          },
          "onlyNewSinceLastRun": {
            "title": "Only new awards since last run",
            "type": "boolean",
            "description": "Remember awards returned by earlier runs (in a named key-value store) and skip them. Use with a schedule for alerts.",
            "default": false
          },
          "descriptionMaxChars": {
            "title": "Max description length",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Trim award descriptions to this many characters. 0 = full text.",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}