{
  "openapi": "3.0.1",
  "info": {
    "title": "PPP Loan Data Scraper - Small Business Leads & Firmographics",
    "description": "Scrape U.S. SBA PPP loan data: business name and address, NAICS industry, loan and forgiveness amounts, jobs, lender, and woman, veteran and minority ownership. Filter by state, industry and size for B2B leads. Independent tool, not affiliated with any government agency.",
    "version": "0.1",
    "x-build-id": "sk0JlzgE8VCV6mS0v"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapesage~ppp-loan-data-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapesage-ppp-loan-data-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~ppp-loan-data-scraper/runs": {
      "post": {
        "operationId": "runs-sync-scrapesage-ppp-loan-data-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~ppp-loan-data-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-scrapesage-ppp-loan-data-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": {
          "states": {
            "title": "States",
            "uniqueItems": true,
            "type": "array",
            "description": "Borrower state or territory. Adding states makes a run much faster: the SBA files are sorted by state, so the actor downloads only the part that holds your states. Pick from the list, or type 2-letter codes or names (\"TX\", \"Texas\"). Leave empty for the whole country.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "AL",
                "AK",
                "AS",
                "AZ",
                "AR",
                "AE",
                "AP",
                "CA",
                "CO",
                "CT",
                "DE",
                "DC",
                "FL",
                "GA",
                "GU",
                "HI",
                "ID",
                "IL",
                "IN",
                "IA",
                "KS",
                "KY",
                "LA",
                "ME",
                "MD",
                "MA",
                "MI",
                "MN",
                "MS",
                "MO",
                "MT",
                "NE",
                "NV",
                "NH",
                "NJ",
                "NM",
                "NY",
                "NC",
                "ND",
                "MP",
                "OH",
                "OK",
                "OR",
                "PA",
                "PR",
                "RI",
                "SC",
                "SD",
                "TN",
                "TX",
                "VI",
                "UT",
                "VT",
                "VA",
                "WA",
                "WV",
                "WI",
                "WY"
              ],
              "enumTitles": [
                "Alabama (AL)",
                "Alaska (AK)",
                "American Samoa (AS)",
                "Arizona (AZ)",
                "Arkansas (AR)",
                "Armed Forces Europe (AE)",
                "Armed Forces Pacific (AP)",
                "California (CA)",
                "Colorado (CO)",
                "Connecticut (CT)",
                "Delaware (DE)",
                "District of Columbia (DC)",
                "Florida (FL)",
                "Georgia (GA)",
                "Guam (GU)",
                "Hawaii (HI)",
                "Idaho (ID)",
                "Illinois (IL)",
                "Indiana (IN)",
                "Iowa (IA)",
                "Kansas (KS)",
                "Kentucky (KY)",
                "Louisiana (LA)",
                "Maine (ME)",
                "Maryland (MD)",
                "Massachusetts (MA)",
                "Michigan (MI)",
                "Minnesota (MN)",
                "Mississippi (MS)",
                "Missouri (MO)",
                "Montana (MT)",
                "Nebraska (NE)",
                "Nevada (NV)",
                "New Hampshire (NH)",
                "New Jersey (NJ)",
                "New Mexico (NM)",
                "New York (NY)",
                "North Carolina (NC)",
                "North Dakota (ND)",
                "Northern Mariana Islands (MP)",
                "Ohio (OH)",
                "Oklahoma (OK)",
                "Oregon (OR)",
                "Pennsylvania (PA)",
                "Puerto Rico (PR)",
                "Rhode Island (RI)",
                "South Carolina (SC)",
                "South Dakota (SD)",
                "Tennessee (TN)",
                "Texas (TX)",
                "U.S. Virgin Islands (VI)",
                "Utah (UT)",
                "Vermont (VT)",
                "Virginia (VA)",
                "Washington (WA)",
                "West Virginia (WV)",
                "Wisconsin (WI)",
                "Wyoming (WY)"
              ]
            }
          },
          "cities": {
            "title": "Cities",
            "uniqueItems": true,
            "type": "array",
            "description": "Borrower city, exact name (for example \"Austin\" or \"Miami\"). Add the state as well for a fast run. Leave empty for all cities.",
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes",
            "uniqueItems": true,
            "type": "array",
            "description": "Borrower ZIP code, full or prefix (\"787\" matches every 787xx ZIP). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties",
            "uniqueItems": true,
            "type": "array",
            "description": "County of the business location (for example \"Los Angeles\" or \"Cook\"). Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "naicsCodes": {
            "title": "NAICS industry codes",
            "uniqueItems": true,
            "type": "array",
            "description": "Industry by NAICS code prefix, 2 to 6 digits: 722 = restaurants and food service, 23 = construction, 621 = health care practices, 6212 = dentists, 54 = professional services, 8121 = personal care. Each record also carries the official industry title (naicsTitle). Leave empty for all industries.",
            "items": {
              "type": "string"
            }
          },
          "businessNameQuery": {
            "title": "Business name contains",
            "type": "string",
            "description": "Only borrowers whose business name contains this text (not case-sensitive)."
          },
          "businessTypes": {
            "title": "Business / entity types",
            "uniqueItems": true,
            "type": "array",
            "description": "Entity type as SBA recorded it. Pick one or more. Leave empty for all.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "Corporation",
                "Limited Liability Company(LLC)",
                "Subchapter S Corporation",
                "Sole Proprietorship",
                "Self-Employed Individuals",
                "Independent Contractors",
                "Non-Profit Organization",
                "Partnership",
                "Single Member LLC",
                "Limited Liability Partnership",
                "Professional Association",
                "Cooperative",
                "501(c)3 - Non Profit",
                "501(c)6 - Non Profit Membership",
                "501(c)19 - Non Profit Veterans",
                "501(c) - Non Profit except 3,4,6,19",
                "Non-Profit Childcare Center",
                "Trust",
                "Joint Venture",
                "Tenant in Common",
                "Qualified Joint-Venture (spouses)",
                "Employee Stock Ownership Plan(ESOP)",
                "Tribal Concerns",
                "Housing Co-op",
                "Rollover as Business Start-Ups (ROB"
              ],
              "enumTitles": [
                "Corporation",
                "Limited Liability Company(LLC)",
                "Subchapter S Corporation",
                "Sole Proprietorship",
                "Self-Employed Individuals",
                "Independent Contractors",
                "Non-Profit Organization",
                "Partnership",
                "Single Member LLC",
                "Limited Liability Partnership",
                "Professional Association",
                "Cooperative",
                "501(c)3 - Non Profit",
                "501(c)6 - Non Profit Membership",
                "501(c)19 - Non Profit Veterans",
                "501(c) - Non Profit except 3,4,6,19",
                "Non-Profit Childcare Center",
                "Trust",
                "Joint Venture",
                "Tenant in Common",
                "Qualified Joint-Venture (spouses)",
                "Employee Stock Ownership Plan(ESOP)",
                "Tribal Concerns",
                "Housing Co-op",
                "Rollover as Business Start-Ups (ROBS)"
              ]
            }
          },
          "jobsMin": {
            "title": "Min jobs reported",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum jobs reported on the loan application (a proxy for employee count). For example 10 skips sole proprietors and very small businesses."
          },
          "jobsMax": {
            "title": "Max jobs reported",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum jobs reported. Combine with \"Min jobs reported\" for a company-size band such as 10 to 50 employees."
          },
          "franchisesOnly": {
            "title": "Franchises only",
            "type": "boolean",
            "description": "Only loans to franchise businesses (a named franchise brand). About 4% of loans of $150K and more, and about 1% of smaller loans, name a franchise.",
            "default": false
          },
          "nonProfitFilter": {
            "title": "Non-profit filter",
            "enum": [
              "any",
              "nonProfitOnly",
              "forProfitOnly"
            ],
            "type": "string",
            "description": "All businesses, only non-profits, or only for-profits.",
            "default": "any"
          },
          "loanAmountMin": {
            "title": "Min loan amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum current approved loan amount. Loans of $150K and more are in the default file; for smaller loans turn on \"Include loans under $150K\"."
          },
          "loanAmountMax": {
            "title": "Max loan amount (USD)",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum current approved loan amount. A value below 150000 automatically searches the loans under $150K."
          },
          "approvalDateFrom": {
            "title": "Approved on/after",
            "type": "string",
            "description": "Only loans approved on or after this date (YYYY-MM-DD). PPP loans were approved from April 2020 to mid 2021."
          },
          "approvalDateTo": {
            "title": "Approved on/before",
            "type": "string",
            "description": "Only loans approved on or before this date (YYYY-MM-DD)."
          },
          "drawType": {
            "title": "Loan draw",
            "enum": [
              "any",
              "first",
              "second"
            ],
            "type": "string",
            "description": "First Draw (2020) or Second Draw (2021). A Second Draw loan means the business was still operating in 2021, a stronger lead.",
            "default": "any"
          },
          "forgivenessStatus": {
            "title": "Forgiveness status",
            "enum": [
              "any",
              "forgiven",
              "notForgiven"
            ],
            "type": "string",
            "description": "Whether the loan was forgiven (forgiveness means the business met the payroll rules).",
            "default": "any"
          },
          "loanStatuses": {
            "title": "Loan statuses",
            "uniqueItems": true,
            "type": "array",
            "description": "Loan status in the current SBA release. Leave empty for all.",
            "items": {
              "type": "string",
              "enumSuggestedValues": [
                "paidInFull",
                "chargedOff",
                "exemption4"
              ],
              "enumTitles": [
                "Paid in full (paidInFull)",
                "Charged off (chargedOff)",
                "Status withheld under FOIA exemption 4 (exemption4)"
              ]
            }
          },
          "lenderNameQuery": {
            "title": "Lender name contains",
            "type": "string",
            "description": "Only loans whose originating or servicing lender name contains this text (for example \"JPMorgan\", \"Cross River\" or \"Kabbage\")."
          },
          "womanOwnedOnly": {
            "title": "Woman-owned only",
            "type": "boolean",
            "description": "Only businesses that reported female ownership.",
            "default": false
          },
          "veteranOwnedOnly": {
            "title": "Veteran-owned only",
            "type": "boolean",
            "description": "Only businesses that reported veteran ownership.",
            "default": false
          },
          "minorityOwnedOnly": {
            "title": "Minority-owned only",
            "type": "boolean",
            "description": "Only businesses whose owner reported a race other than White, or Hispanic or Latino ethnicity.",
            "default": false
          },
          "hispanicOwnedOnly": {
            "title": "Hispanic/Latino-owned only",
            "type": "boolean",
            "description": "Only businesses whose owner reported Hispanic or Latino ethnicity.",
            "default": false
          },
          "ruralUrban": {
            "title": "Rural / urban",
            "enum": [
              "any",
              "rural",
              "urban"
            ],
            "type": "string",
            "description": "SBA rural or urban classification of the business location.",
            "default": "any"
          },
          "hubzoneOnly": {
            "title": "HUBZone only",
            "type": "boolean",
            "description": "Only businesses in a HUBZone (Historically Underutilized Business Zone).",
            "default": false
          },
          "lowToModerateIncomeOnly": {
            "title": "Low-to-moderate income area only",
            "type": "boolean",
            "description": "Only businesses in a low-to-moderate income (LMI) area.",
            "default": false
          },
          "includeUnder150k": {
            "title": "Include loans under $150K",
            "type": "boolean",
            "description": "Off (default): search the ~969,000 loans of $150K and more, the businesses with the biggest payrolls. On: also search the ~10.5 million smaller loans (about 5 GB of SBA files). With states set, only those states are read, so it stays fast.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum number of loan records to return (and pay for).",
            "default": 1000
          },
          "sortNewestFirst": {
            "title": "Sort newest first",
            "type": "boolean",
            "description": "Return the most recently approved loans first (Second Draw 2021 loans come first). Sorting reads every matching row; turn it off to stop as soon as \"Max results\" loans are found.",
            "default": true
          },
          "deduplicateResults": {
            "title": "Deduplicate results",
            "type": "boolean",
            "description": "Drop duplicate loan records within a run (by loan number).",
            "default": true
          },
          "monitorMode": {
            "title": "Monitor mode (only new records)",
            "type": "boolean",
            "description": "Return only loans that earlier runs with the same monitor key did not deliver. Use it to harvest a large segment in batches on a schedule without paying twice for the same loan.",
            "default": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "A label for this monitored search (for example \"ca-restaurants\"). Use a different key for each saved search so their delivered lists do not mix.",
            "default": "default"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. SBA open data downloads without a proxy (the default).",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}