{
  "openapi": "3.0.1",
  "info": {
    "title": "SBA Loan Leads Scraper - 7(a) & 504 Borrowers & Lenders",
    "description": "Scrape U.S. SBA 7(a) & 504 loan data: borrower name & address, NAICS industry, loan amount & date, lender/CDC, jobs, business age & status. Filter by state, industry, amount & date. B2B leads + lender intelligence + monitoring. Official SBA open data, no browser.",
    "version": "0.1",
    "x-build-id": "wkshqAz1asXVl4koF"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~sba-loan-leads-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-sba-loan-leads-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~sba-loan-leads-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-sba-loan-leads-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~sba-loan-leads-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-sba-loan-leads-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": {
          "program": {
            "title": "Loan program",
            "enum": [
              "7a",
              "504",
              "both"
            ],
            "type": "string",
            "description": "Which SBA loan program(s) to pull. <b>7(a)</b> = the flagship general small-business loan (working capital, expansion, acquisition) — the biggest, broadest source of borrower leads. <b>504</b> = real-estate & heavy-equipment loans via Certified Development Companies (CDCs). <b>Both</b> downloads and merges the two (larger run).",
            "default": "7a"
          },
          "fiscalYearFrom": {
            "title": "Fiscal year from",
            "minimum": 1991,
            "maximum": 2030,
            "type": "integer",
            "description": "Earliest SBA fiscal year to include (a loan's fiscal year is the federal FY of its approval date). Lower values pull older history and download more source files. SBA data goes back to FY1991. Default 2022 keeps runs fast and focused on fresh, recently-financed businesses.",
            "default": 2022
          },
          "fiscalYearTo": {
            "title": "Fiscal year to (optional)",
            "minimum": 1991,
            "maximum": 2030,
            "type": "integer",
            "description": "Latest SBA fiscal year to include. Leave blank for the most recent available year."
          },
          "states": {
            "title": "Borrower states",
            "type": "array",
            "description": "Filter by borrower state — two-letter USPS codes, e.g. <code>CA</code>, <code>TX</code>, <code>NY</code>, <code>FL</code>. Leave empty for all states & territories.",
            "items": {
              "type": "string"
            }
          },
          "cities": {
            "title": "Borrower cities",
            "type": "array",
            "description": "Filter by borrower city (case-insensitive, exact city name), e.g. <code>Los Angeles</code>, <code>Austin</code>.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "Borrower ZIP codes (prefix)",
            "type": "array",
            "description": "Filter by borrower ZIP — full ZIP (<code>90012</code>) or a prefix (<code>900</code> matches all 900xx). The 5-digit ZIP is used for matching.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Project counties",
            "type": "array",
            "description": "Filter by the project county (case-insensitive), e.g. <code>Los Angeles</code>, <code>Cook</code>, <code>Harris</code>.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS codes (prefix)",
            "type": "array",
            "description": "Filter by industry NAICS code — full 6-digit code or a prefix. e.g. <code>722</code> = restaurants & food services, <code>23</code> = construction, <code>621</code> = ambulatory health care, <code>54</code> = professional services.",
            "items": {
              "type": "string"
            }
          },
          "industryKeywords": {
            "title": "Industry keywords",
            "type": "array",
            "description": "Filter by keywords matched against the NAICS industry description (case-insensitive, any match), e.g. <code>restaurant</code>, <code>dental</code>, <code>trucking</code>, <code>landscaping</code>, <code>salon</code>.",
            "items": {
              "type": "string"
            }
          },
          "businessNameQuery": {
            "title": "Business name contains",
            "type": "string",
            "description": "Only return borrowers whose business name contains this text (case-insensitive)."
          },
          "lenderNameQuery": {
            "title": "Lender / CDC name contains",
            "type": "string",
            "description": "Only return loans whose lending bank (7a) or CDC (504) name contains this text — great for tracking a specific lender's originations."
          },
          "loanAmountMin": {
            "title": "Min loan amount ($)",
            "type": "integer",
            "description": "Minimum gross approval amount in USD."
          },
          "loanAmountMax": {
            "title": "Max loan amount ($)",
            "type": "integer",
            "description": "Maximum gross approval amount in USD."
          },
          "approvalDateFrom": {
            "title": "Approved on/after (optional)",
            "type": "string",
            "description": "Only loans approved on or after this date, <code>YYYY-MM-DD</code>. Finer than fiscal year. Note: the actor still only downloads the fiscal-year files selected above."
          },
          "approvalDateTo": {
            "title": "Approved on/before (optional)",
            "type": "string",
            "description": "Only loans approved on or before this date, <code>YYYY-MM-DD</code>."
          },
          "businessAge": {
            "title": "Business age",
            "enum": [
              "any",
              "startup",
              "new",
              "existing",
              "changeOfOwnership"
            ],
            "type": "string",
            "description": "Filter by the borrower's business age at approval. <b>Startups</b> and <b>new businesses</b> are high-intent (just launched, actively buying); <b>existing</b> businesses are more established.",
            "default": "any"
          },
          "businessTypes": {
            "title": "Business types",
            "type": "array",
            "description": "Filter by legal entity type of the borrower.",
            "items": {
              "type": "string",
              "enum": [
                "CORPORATION",
                "INDIVIDUAL",
                "PARTNERSHIP"
              ],
              "enumTitles": [
                "Corporation / LLC",
                "Individual / sole proprietor",
                "Partnership"
              ]
            }
          },
          "loanStatuses": {
            "title": "Loan statuses",
            "type": "array",
            "description": "Filter by current loan status (normalized across both programs). For active, operating businesses pick <b>Current</b>, <b>Paid in full</b> and <b>Committed</b>. Leave empty for all.",
            "items": {
              "type": "string",
              "enum": [
                "current",
                "paidInFull",
                "committed",
                "exempt",
                "inLiquidation",
                "delinquent",
                "pastDue",
                "deferred",
                "purchased",
                "chargedOff",
                "cancelled"
              ],
              "enumTitles": [
                "Current",
                "Paid in full",
                "Committed (approved)",
                "Exempt",
                "In liquidation",
                "Delinquent",
                "Past due",
                "Deferred",
                "Purchased",
                "Charged off",
                "Cancelled"
              ]
            }
          },
          "franchisesOnly": {
            "title": "Franchise borrowers only",
            "type": "boolean",
            "description": "Only return loans to franchise businesses (a franchise name/code is present).",
            "default": false
          },
          "minJobsSupported": {
            "title": "Min jobs supported",
            "type": "integer",
            "description": "Only loans reporting at least this many jobs supported — a useful proxy for business size."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of loan records to return in this run.",
            "default": 1000
          },
          "sortNewestFirst": {
            "title": "Newest approvals first",
            "type": "boolean",
            "description": "Return the most recently approved loans first (best for fresh leads). When off, records stream in source order and the run can finish faster on very large limits.",
            "default": true
          },
          "deduplicateResults": {
            "title": "Deduplicate within a run",
            "type": "boolean",
            "description": "Skip duplicate loan records within this run (recommended).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitoring mode — only new loans",
            "type": "boolean",
            "description": "Remember which loans were already returned (in a named key-value store) and emit ONLY loans that are new since the last run — each tagged <code>monitorEvent: \"new\"</code>. SBA refreshes this data periodically; run on a Schedule to capture newly-approved borrowers as fresh leads. Works alongside Apify Schedules (the schedule starts the run; monitoring decides what's new).",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Names the memory used by monitoring mode. Use a distinct key per saved watch (e.g. per state/industry) so different monitors don't share state.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy. SBA open data is downloaded directly and needs no proxy — leave this off for the fastest downloads. Enable Apify Proxy only if your network requires it.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}