{
  "openapi": "3.0.1",
  "info": {
    "title": "NMLS Consumer Access Scraper",
    "description": "Scrape NMLS Consumer Access for mortgage companies, MLOs, and branches — state licenses with statuses and dates, regulatory disclosures with PDF links, trade names, and sponsor/branch relationships. Search by name, NMLS ID, or state; CAPTCHA solved automatically. Clean JSON/CSV output.",
    "version": "0.0",
    "x-build-id": "0Q2pWb0yudcV1FhGO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/memo23~nmls-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-memo23-nmls-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/memo23~nmls-scraper/runs": {
      "post": {
        "operationId": "runs-sync-memo23-nmls-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/memo23~nmls-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-memo23-nmls-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": "Search mode",
            "enum": [
              "by_name",
              "by_id",
              "by_state",
              "by_url"
            ],
            "type": "string",
            "description": "How the crawl is seeded. `By name` searches NMLS for each query. `By NMLS ID` fetches specific IDs directly. `By state` searches a whole state (pair with entity type). `By URL` crawls exact detail/search URLs you paste below.",
            "default": "by_name"
          },
          "names": {
            "title": "Names / search queries",
            "type": "array",
            "description": "Company or person names to search (mode = By name). Add a city, state, or ZIP to narrow — NMLS rejects overly broad searches. Example: `Rocket Mortgage Detroit MI`.",
            "items": {
              "type": "string"
            }
          },
          "nmlsIds": {
            "title": "NMLS IDs",
            "type": "array",
            "description": "Exact NMLS ID numbers to fetch directly (mode = By NMLS ID). Each is tried as a company, individual, then branch (or restricted by the Entity type below).",
            "items": {
              "type": "string"
            }
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Two-letter US state codes (e.g. `TX`, `CA`). Used as the query in By-state mode, or as a filter in other modes.",
            "items": {
              "type": "string"
            }
          },
          "entityType": {
            "title": "Entity type filter",
            "enum": [
              "",
              "COMPANY",
              "INDIVIDUAL"
            ],
            "type": "string",
            "description": "Restrict results to companies or individuals (MLOs). Leave as `Any` to include both.",
            "default": ""
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Exact nmlsconsumeraccess.org URLs (mode = By URL) — detail pages like `/EntityDetails.aspx/COMPANY/3030` or search URLs `/Home.aspx/SubSearch?searchText=...`.",
            "items": {
              "type": "string"
            }
          },
          "includeDisclosures": {
            "title": "Include disclosures",
            "type": "boolean",
            "description": "Include the disclosures section (regulatory action documents) in each row.",
            "default": true
          },
          "maxSeedDepth": {
            "title": "Relationship expansion depth",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Follow relationships out from each seed entity: an individual's sponsoring companies and a company's branches. 0 = seeds only, 1 = seeds + their direct relations, etc.",
            "default": 0
          },
          "maxSeedExpansions": {
            "title": "Max related entities",
            "minimum": 0,
            "type": "integer",
            "description": "Hard cap on how many related entities the expansion may add, so a broad seed can't balloon the run.",
            "default": 100
          },
          "maxItems": {
            "title": "Maximum items to scrape",
            "minimum": 1,
            "type": "integer",
            "description": "Hard cap on the number of entities collected (controls billing).",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of detail pages fetched in parallel over the shared session.",
            "default": 5
          },
          "proxy": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "NMLS is behind Cloudflare and blocks datacenter IPs — residential proxies are required. Defaults to Apify RESIDENTIAL.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}