{
  "openapi": "3.0.1",
  "info": {
    "title": "US FINRA BrokerCheck & SEC IAPD RIA Financial Advisers KYB",
    "description": "Screen & extract US FINRA Broker-Dealers, SEC Registered Investment Advisers (RIAs), ERAs & individual brokers with CRD/SEC numbers, direct owners, Series exams, Form ADV dates, branches & regulatory disclosure counts.",
    "version": "1.0",
    "x-build-id": "MxjwOUnzQoVGD4fFp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/regpulse-data~us-finra-brokercheck-sec-iapd-ria-adviser-kyb/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-regpulse-data-us-finra-brokercheck-sec-iapd-ria-adviser-kyb",
        "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/regpulse-data~us-finra-brokercheck-sec-iapd-ria-adviser-kyb/runs": {
      "post": {
        "operationId": "runs-sync-regpulse-data-us-finra-brokercheck-sec-iapd-ria-adviser-kyb",
        "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/regpulse-data~us-finra-brokercheck-sec-iapd-ria-adviser-kyb/run-sync": {
      "post": {
        "operationId": "run-sync-regpulse-data-us-finra-brokercheck-sec-iapd-ria-adviser-kyb",
        "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": "Operation Mode",
            "enum": [
              "firm_search",
              "individual_search",
              "kyb_screen",
              "watchlist_diff"
            ],
            "type": "string",
            "description": "Select 'firm_search' for Broker-Dealers & SEC/State RIAs, 'individual_search' for FINRA Brokers & Investment Adviser Representatives (IARs), 'kyb_screen' for single or batch counterparty/advisor KYB screening by name or CRD #, or 'watchlist_diff' for persistent compliance change monitoring.",
            "default": "firm_search"
          },
          "query": {
            "title": "Search Query (Firm Name, Advisor Name, or CRD #)",
            "type": "string",
            "description": "Name or CRD number to search (e.g., 'Goldman Sachs', 'Vanguard', 'Fisher Investments', 'Capital', '361'). Leave empty in 'firm_search' to default automatically to 'Capital' for immediate zero-config runs."
          },
          "queries": {
            "title": "Batch Search / Counterparty Queries",
            "type": "array",
            "description": "Optional list of firm names, individual names, or CRD numbers for batch KYB screening (especially in 'kyb_screen' or multi-query 'firm_search'/'individual_search').",
            "items": {
              "type": "string"
            }
          },
          "crdNumbers": {
            "title": "Exact CRD Numbers",
            "type": "array",
            "description": "Optional list of exact FINRA/SEC CRD numbers (e.g., ['361', '107342', '106715']) for direct profile lookup, batch KYB verification, or portfolio watchlist monitoring.",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "title": "Official Regulatory Data Source",
            "enum": [
              "BOTH",
              "FINRA_BROKERCHECK",
              "SEC_IAPD"
            ],
            "type": "string",
            "description": "Query and enrich from BOTH FINRA BrokerCheck & SEC IAPD (recommended), FINRA BrokerCheck only, or SEC IAPD only.",
            "default": "BOTH"
          },
          "states": {
            "title": "US State Filter (2-Letter Codes)",
            "type": "array",
            "description": "Optional list of 2-letter US state codes (e.g., ['NY', 'CA', 'TX', 'FL']) to filter firms by main office state or individuals by active branch office state.",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "US City Filter (Optional)",
            "type": "string",
            "description": "Optional city name filter (e.g., 'New York', 'Chicago', 'San Francisco', 'Miami')."
          },
          "activeOnly": {
            "title": "Active Registrations Only",
            "type": "boolean",
            "description": "When enabled (default), returns only currently active Broker-Dealers, RIAs, Brokers, or IARs. Disable to include inactive, deregistered, expelled, or barred entities.",
            "default": true
          },
          "onlyWithDisclosures": {
            "title": "Only Entities/Individuals With Regulatory Disclosures",
            "type": "boolean",
            "description": "When enabled, filters specifically for firms or individuals with regulatory, civil, arbitration, customer dispute, or disciplinary disclosures.",
            "default": false
          },
          "onlySecRegisteredRia": {
            "title": "Only SEC-Registered Investment Advisers (801- SEC #)",
            "type": "boolean",
            "description": "When enabled, restricts firm results strictly to SEC-Registered Investment Advisers (SEC # prefix '801-' / isSECRegistered='Y'), excluding state-only RIAs and broker-only firms.",
            "default": false
          },
          "onlyFinraBrokerDealer": {
            "title": "Only FINRA-Registered Broker-Dealers (8- SEC #)",
            "type": "boolean",
            "description": "When enabled, restricts results strictly to FINRA-registered Broker-Dealers (firm_search) or FINRA-registered Brokers (individual_search).",
            "default": false
          },
          "enrichProfiles": {
            "title": "Enrich Full Profiles via Detail APIs",
            "type": "boolean",
            "description": "Fetches full BrokerCheck & SEC IAPD detail JSON per CRD (bounded concurrency = 5) to populate exact disclosure counts/categories, full street address, phone, Form ADV filing date, direct owners, state registrations, and individual Series exams.",
            "default": true
          },
          "maxResults": {
            "title": "Maximum Records to Return",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Maximum number of billed records delivered to the dataset (1 to 2000).",
            "default": 50
          },
          "stateStoreName": {
            "title": "Watchlist State Store Name (for watchlist_diff Mode)",
            "type": "string",
            "description": "Named Apify Key-Value Store used to persist baseline snapshots across runs in 'watchlist_diff' mode.",
            "default": "us-finra-sec-watchlist-state"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}