{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Federal Awards Scraper",
    "description": "Extract US federal contracts, grants, loans, and IDV awards from USAspending — with recipient UEI, business categories, full addresses, NAICS, executive compensation, set-aside type, and awarding agency. 8M+ awards. No API key.",
    "version": "0.0",
    "x-build-id": "KjQ844pWYUMzGPS7P"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/haketa~usaspending-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-haketa-usaspending-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/haketa~usaspending-scraper/runs": {
      "post": {
        "operationId": "runs-sync-haketa-usaspending-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/haketa~usaspending-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-haketa-usaspending-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": {
          "awardTypeCategories": {
            "title": "Award Type Categories",
            "type": "array",
            "description": "Which categories of federal spending to pull. Pick one or more: 'contracts', 'idvs' (indefinite delivery vehicles), 'grants', 'loans', 'other_financial_assistance', 'direct_payments'.",
            "items": {
              "type": "string",
              "enum": [
                "contracts",
                "idvs",
                "grants",
                "loans",
                "other_financial_assistance",
                "direct_payments"
              ],
              "enumTitles": [
                "Contracts",
                "IDVs (Indefinite Delivery)",
                "Grants",
                "Loans",
                "Other Financial Assistance",
                "Direct Payments"
              ]
            },
            "default": [
              "contracts"
            ]
          },
          "timePeriodStart": {
            "title": "Time Period — Start Date",
            "type": "string",
            "description": "Restrict to awards signed/active on/after this date (YYYY-MM-DD). Leave empty for default last fiscal year.",
            "default": ""
          },
          "timePeriodEnd": {
            "title": "Time Period — End Date",
            "type": "string",
            "description": "Restrict to awards signed/active on/before this date (YYYY-MM-DD). Leave empty for today.",
            "default": ""
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text keyword search across award descriptions. Useful for finding specific contract topics (e.g. 'cybersecurity', 'cloud migration', 'AI', 'logistics').",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "agencyNames": {
            "title": "Awarding Agency Names",
            "type": "array",
            "description": "Filter by top-tier awarding agencies. Examples: 'Department of Defense', 'Department of Health and Human Services', 'National Aeronautics and Space Administration', 'Department of Energy', 'General Services Administration'.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "recipientSearchText": {
            "title": "Recipient Name Search",
            "type": "string",
            "description": "Substring match against recipient company names (e.g. 'Lockheed', 'Booz Allen', 'Microsoft').",
            "default": ""
          },
          "naicsCodes": {
            "title": "NAICS Codes",
            "type": "array",
            "description": "Filter by NAICS industry codes (2 / 4 / 6 digit). Examples: '541512' (Computer Systems Design), '541330' (Engineering Services), '336411' (Aircraft Manufacturing), '236220' (Commercial Building Construction).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "recipientLocationStates": {
            "title": "Recipient Location — US States",
            "type": "array",
            "description": "Filter to contractors headquartered in these US state codes (2-letter, e.g. 'VA', 'CA', 'TX', 'NY', 'DC', 'MD').",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place of Performance — US States",
            "type": "array",
            "description": "Filter to awards performed in these US state codes (2-letter).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "setAsideTypes": {
            "title": "Set-Aside Types",
            "type": "array",
            "description": "Filter by small-business set-aside codes. Examples: 'SBA' (Small Business), '8A' (8(a) Program), 'WOSB' (Women-Owned), 'EDWOSB', 'HUBZ' (HUBZone), 'SDVOSBC' (Service-Disabled Veteran-Owned), 'VSA' (Veteran-Owned), 'IEE' (Indian Economic Enterprise).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minAwardAmount": {
            "title": "Minimum Award Amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter to awards >= this dollar value. 0 = no minimum.",
            "default": 0
          },
          "maxAwardAmount": {
            "title": "Maximum Award Amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Filter to awards <= this dollar value. 0 = no maximum.",
            "default": 0
          },
          "scrapeAwardDetails": {
            "title": "Scrape Full Award Details",
            "type": "boolean",
            "description": "Pull the full award record for each result — adds recipient UEI, full address, NAICS hierarchy, set-aside type, executive compensation, place of performance, subaward stats. Turn OFF for ultra-fast bulk discovery.",
            "default": true
          },
          "sortBy": {
            "title": "Sort By",
            "enum": [
              "Award Amount",
              "Start Date",
              "End Date",
              "Recipient Name",
              "Award ID"
            ],
            "type": "string",
            "description": "How to order results.",
            "default": "Award Amount"
          },
          "sortOrder": {
            "title": "Sort Order",
            "enum": [
              "desc",
              "asc"
            ],
            "type": "string",
            "description": "Ascending or descending.",
            "default": "desc"
          },
          "maxRecords": {
            "title": "Max Records",
            "minimum": 0,
            "type": "integer",
            "description": "Total cap on records to push. 0 = unlimited (warning: tens of millions of awards exist).",
            "default": 100
          },
          "requestDelay": {
            "title": "Request Delay (ms)",
            "minimum": 0,
            "type": "integer",
            "description": "Politeness delay between requests.",
            "default": 250
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel detail-fetch concurrency. The source is rate-limited per IP.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Default: no proxy. The data source is fast and reliable from direct connections — only enable a proxy if you're running enormous volumes and hitting per-IP rate limits."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}