{
  "openapi": "3.0.1",
  "info": {
    "title": "USAspending Scraper - Federal Awards, Contractors & Leads",
    "description": "Scrape USAspending.gov: search federal awards (contracts, grants, loans), pull full award detail (recipient, executives, place of performance, NAICS/PSC), and build US-government contractor & vendor leads with addresses and business types. Monitoring mode. No API key, no browser.",
    "version": "0.1",
    "x-build-id": "1v38D0ebbONAWh1i2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~usaspending-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-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/scrapesage~usaspending-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-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/scrapesage~usaspending-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-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": {
          "mode": {
            "title": "Mode",
            "enum": [
              "awards",
              "recipients"
            ],
            "type": "string",
            "description": "<code>awards</code> = search federal awards (contracts, grants, loans…). <code>recipients</code> = search government contractors/recipients for lead generation.",
            "default": "awards"
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Free-text keywords to match award descriptions, recipients and identifiers, e.g. <code>cybersecurity</code>, <code>cloud migration</code>. Awards mode only.",
            "items": {
              "type": "string"
            }
          },
          "awardCategories": {
            "title": "Award categories",
            "type": "array",
            "description": "Which award groups to search (each is queried separately): <code>contracts</code>, <code>idvs</code>, <code>grants</code>, <code>direct_payments</code>, <code>loans</code>, <code>other</code>. Awards mode only.",
            "default": [
              "contracts"
            ],
            "items": {
              "type": "string"
            }
          },
          "timePeriodStart": {
            "title": "Action date from",
            "type": "string",
            "description": "Only awards with action on/after this date (YYYY-MM-DD). Defaults to FY2008 start."
          },
          "timePeriodEnd": {
            "title": "Action date to",
            "type": "string",
            "description": "Only awards with action on/before this date (YYYY-MM-DD). Defaults to today."
          },
          "awardingAgencies": {
            "title": "Awarding agencies",
            "type": "array",
            "description": "Filter by top-tier awarding agency name exactly as USAspending lists it, e.g. <code>Department of Defense</code>, <code>Department of Health and Human Services</code>. Awards mode only.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes",
            "type": "array",
            "description": "Filter contracts/IDVs by NAICS industry code(s), e.g. <code>541512</code>. Awards mode only.",
            "items": {
              "type": "string"
            }
          },
          "pscCodes": {
            "title": "PSC codes",
            "type": "array",
            "description": "Filter contracts/IDVs by Product/Service Code(s), e.g. <code>D310</code>. Awards mode only.",
            "items": {
              "type": "string"
            }
          },
          "recipientSearchText": {
            "title": "Recipient name contains",
            "type": "array",
            "description": "Limit awards to recipients whose name matches, e.g. <code>lockheed</code>. Awards mode only.",
            "items": {
              "type": "string"
            }
          },
          "recipientLocationStates": {
            "title": "Recipient states",
            "type": "array",
            "description": "Two-letter US state codes for the recipient's location, e.g. <code>CA</code>, <code>VA</code>. Awards mode only.",
            "items": {
              "type": "string"
            }
          },
          "placeOfPerformanceStates": {
            "title": "Place-of-performance states",
            "type": "array",
            "description": "Two-letter US state codes for where the work is performed, e.g. <code>TX</code>. Awards mode only.",
            "items": {
              "type": "string"
            }
          },
          "awardAmountMin": {
            "title": "Min award amount (USD)",
            "type": "integer",
            "description": "Only awards at or above this dollar amount. Awards mode only."
          },
          "awardAmountMax": {
            "title": "Max award amount (USD)",
            "type": "integer",
            "description": "Only awards at or below this dollar amount. Awards mode only."
          },
          "sortAwardsBy": {
            "title": "Sort awards by",
            "enum": [
              "Award Amount",
              "Start Date",
              "End Date"
            ],
            "type": "string",
            "description": "Field to sort awards by (descending).",
            "default": "Award Amount"
          },
          "includeAwardDetails": {
            "title": "Include full award detail",
            "type": "boolean",
            "description": "For every award, fetch the full detail record: recipient UEI/address & business categories, named executives & compensation, place & period of performance, NAICS/PSC descriptions, obligations and sub-award totals. One extra request per award.",
            "default": false
          },
          "recipientKeywords": {
            "title": "Recipient keywords",
            "type": "array",
            "description": "Names to search government recipients/contractors by, e.g. <code>lockheed</code>, <code>palantir</code>. Leave empty to list the top recipients by federal dollars. Recipients mode only.",
            "items": {
              "type": "string"
            }
          },
          "recipientAwardType": {
            "title": "Recipient award type",
            "enum": [
              "all",
              "contracts",
              "grants",
              "direct_payments",
              "loans",
              "other"
            ],
            "type": "string",
            "description": "Which spending to rank recipients by. Recipients mode only.",
            "default": "all"
          },
          "includeRecipientDetails": {
            "title": "Include recipient detail (address, business types)",
            "type": "boolean",
            "description": "For every recipient, fetch its full profile: registered address, UEI/DUNS, parent company, alternate names/subsidiaries, business types (small business, woman/veteran-owned, 8(a), HUBZone…) and total federal transactions. One extra request per recipient.",
            "default": true
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of award or recipient records to return.",
            "default": 100
          },
          "monitorMode": {
            "title": "Monitoring mode — only new records",
            "type": "boolean",
            "description": "Remember awards/recipients already returned in previous runs (in a named key-value store) and emit only NEW ones each run. Works alongside Apify Schedules — schedule the run, this dedupes the output.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Name for the monitoring memory. Use a distinct key per saved search so their 'seen' histories stay separate.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Parallel detail requests. USAspending rate-limits heavy use — keep this modest.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. The default Apify Proxy is enough — USAspending.gov is open government data with no anti-bot.",
            "default": {
              "useApifyProxy": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}