sec-api.ioSEC API by D2V
FilingsPricingSandboxDocs
Log inGet Free API Key
API Documentation
Introduction

Filing Query API
Full-Text Search API
Stream API
Download & PDF Generator API
XBRL-to-JSON Converter 
Extractor API 

Form ADV API - Investment Advisers
Overview
Example: Python

Form 3/4/5 API - Insider Trading
Form 144 API - Restricted Sales
Form 13F API - Institut. Holdings
Form 13D/13G API - Activist Invst.
Form N-PORT API - Mutual Funds

Form N-CEN API - Annual Reports
Form N-PX API - Proxy Voting

Form S-1/424B4 API - IPOs, Notes
Form C API - Crowdfunding
Form D API - Private Sec. Offerings
Form 1-A/1-K/1-Z - Reg A Offerings

Form 8-K API - Item 4.01
Form 8-K API - Item 4.02
Form 8-K API - Item 5.02

Executive Compensation API
Directors & Board Members
Company Subsidiaries
Outstanding Shares & Public Float

SEC Enforcement Actions
SEC Litigation Releases
SEC Administrative Proceedings
AAER Database API
SRO Filings Database

CIK, CUSIP, Ticker Mapping API
EDGAR Entities Database

Financial Statements

Search Form ADV Filings with Python

Open In Colab   Download Notebook

On this page:
  • Quick Start
    • Find SEC and State Registered Firm Advisers
      • List CRDs of Firm Advisers with Recently Updated Form ADVs
        • Find Advisers by Advisory Activity
          • Find Advisers by Business Activity
            • Find Advisers by Compensation Arrangements
              • Sort Advisers by Assets Under Mangement
                • Sort Advisers by Number of Accounts
                • Find Individual Advisers
                  • Find Individual Advisers by CRD
                  • Get Brochures from Part 2 of an ADV Filing
                    • Access Private Funds Data in Schedule D
                      • List CRDs of Advisers disclosing Private Funds Data
                        • List Prime Brokers of Private Funds
                          • List Custodians of Private Funds
                          • Access Schedule D (Private Funds) from Thousands of Advisers
                            • Map CRD to LEI and LEI to CRD
                              • Map CRD to LEI
                                • Map LEI to CRD

                                In this guide, we will explore how to utilize the Form ADV API with Python to access and search the Form ADV database. The database contains various sections, including Part 1A, 1B, and Schedules A, B, and D, as well as brochures, all available in JSON format.

                                Here are some of the functionalities we will cover:

                                • Finding an ADV filing by CRD number
                                • Retrieving the most recently filed and updated ADV filings
                                • Searching for ADV filings based on advisory activity, such as financial planning services
                                • Filtering ADV filings for large advisory firms with assets under management of $90+ million
                                • Identifying ADV filings for advisory firms with more than $500 million in assets under management
                                • Locating ADV filings for individual advisers
                                • Accessing brochures by CRD number
                                • Mapping CRD to LEI and vice versa
                                • Conducting searches for investment advisers based on various categories, such as portfolio management for businesses or pension consulting services, high net worth individual clients, and compensation arrangements
                                • Finding CRDs of investment advisers based on specific criteria, such as assets under management
                                • Obtaining information on the number of accounts and employees per adviser
                                • Creating a top list of advisers sorted by assets under management, starting with the highest AUM
                                • Exploring private funds data disclosed in Schedule D
                                • Accessing private funds data, including custodians and prime brokers

                                All Form ADV data is already converted to JSON format and indexed in our databases, making it easily accessible through the Form ADV API.

                                Quick Start

                                To begin, you will need to install the sec-api Python package and initialize the FormAdvApi class by providing your API key. The FormAdvApi class offers three methods that enable you to search and access the Form ADV database, allowing you to retrieve filings in JSON format.

                                The available methods are:

                                • .get_firms(search_query): This method allows you to search for ADV filings related to advisory firms based on a search query.
                                • .get_individuals(search_query): Use this method to search for ADV filings related to individual advisers based on a search query.
                                • .get_brochures(crd): This method retrieves brochures associated with a specific CRD (Central Registration Depository) number.

                                By utilizing these methods, you can easily access the desired information from the Form ADV database.

                                API_KEY = 'YOUR_API_KEY'
                                !pip install -q sec-api
                                from sec_api import FormAdvApi

                                formAdvApi = FormAdvApi(API_KEY)

                                search_query_firms = {
                                    "query": "Info.FirmCrdNb:361",
                                    "from": "0",
                                    "size": "50"
                                }

                                search_query_individuals = {
                                    "query": "Info.indvlPK:7696734",
                                    "from": "0",
                                    "size": "50"
                                }

                                response_firms = formAdvApi.get_firms(search_query_firms)
                                response_individuals = formAdvApi.get_individuals(search_query_individuals)
                                response_brochures = formAdvApi.get_brochures(149777)

                                response_firms['filings']
                                response_individuals['filings']
                                response_brochures['brochures']

                                Find SEC and State Registered Firm Advisers

                                In our first example, we demonstrate how to retrieve a JSON-formatted ADV filing filed by the firm adviser with the CRD number 361 (Goldman Sachs) by first defining our search_query. The .get_firms(search_query) method sends our query to the Form ADV API, and returns a response that includes the filing matching our search criteria.

                                The return value of the .get_firms() method is a dictionary with two keys: total and filings. The total key informs us of the number of filings that matched our search criteria, while the filings key contains a list of all the matched filings. Each filing is represented as a dictionary and follows the same structure as the ADV API response, which is detailed in the documentation here.

                                The query Info.FirmCrdNb:361 used in our example is written in Lucene syntax. Lucene query syntax provides a flexible way to construct complex search queries. For an introduction to the syntax, you can refer to the Lucene query syntax overview here.

                                firm_advisers_query = {
                                    "query": "Info.FirmCrdNb:361",
                                    "from": "0",
                                    "size": "1",
                                    "sort": [{"Info.FirmCrdNb": {"order": "desc"}}],
                                }

                                response_firms_1 = formAdvApi.get_firms(firm_advisers_query)

                                print('Total matches found:', response_firms_1['total']['value'])
                                print('Filing')
                                print('------')
                                response_firms_1['filings']
                                Total matches found: 1
                                Filing
                                ------
                                Out[4]:
                                [{'Info': {'SECRgnCD': 'NYRO',
                                   'FirmCrdNb': 361,
                                   'SECNb': '801-16048',
                                   'BusNm': 'GOLDMAN SACHS & CO. LLC',
                                   'LegalNm': 'GOLDMAN SACHS & CO. LLC',
                                   'UmbrRgstn': 'N'},
                                  'MainAddr': {'Strt1': '200 WEST STREET',
                                   'City': 'NEW YORK',
                                   'State': 'NY',
                                   'Cntry': 'United States',
                                   'PostlCd': '10282',
                                   'PhNb': '212-902-1000'},
                                  'MailingAddr': {},
                                  'Rgstn': [{'FirmType': 'Registered', 'St': 'APPROVED', 'Dt': '1981-05-13'}],
                                  'NoticeFiled': {'States': [{'RgltrCd': 'AL',
                                     'St': 'FILED',
                                     'Dt': '1992-10-28'},
                                    {'RgltrCd': 'AK', 'St': 'FILED', 'Dt': '1997-11-21'},
                                    {'RgltrCd': 'AZ', 'St': 'FILED', 'Dt': '1997-11-26'},
                                    {'RgltrCd': 'AR', 'St': 'FILED', 'Dt': '1988-10-19'},
                                    {'RgltrCd': 'CA', 'St': 'FILED', 'Dt': '1997-07-08'},
                                    {'RgltrCd': 'CT', 'St': 'FILED', 'Dt': '1997-09-26'},
                                    {'RgltrCd': 'DE', 'St': 'FILED', 'Dt': '2011-01-24'},
                                    {'RgltrCd': 'GA', 'St': 'FILED', 'Dt': '2003-02-27'},
                                    {'RgltrCd': 'HI', 'St': 'FILED', 'Dt': '1997-11-14'},
                                    {'RgltrCd': 'ID', 'St': 'FILED', 'Dt': '1997-11-14'},
                                    {'RgltrCd': 'IL', 'St': 'FILED', 'Dt': '1988-12-12'},
                                    {'RgltrCd': 'IN', 'St': 'FILED', 'Dt': '1988-09-06'},
                                    {'RgltrCd': 'IA', 'St': 'FILED', 'Dt': '1999-01-01'},
                                    {'RgltrCd': 'KS', 'St': 'FILED', 'Dt': '1997-11-18'},
                                    {'RgltrCd': 'KY', 'St': 'FILED', 'Dt': '1997-11-24'},
                                    {'RgltrCd': 'LA', 'St': 'FILED', 'Dt': '2001-10-08'},
                                    {'RgltrCd': 'ME', 'St': 'FILED', 'Dt': '1989-01-20'},
                                    {'RgltrCd': 'MD', 'St': 'FILED', 'Dt': '1992-01-01'},
                                    {'RgltrCd': 'MA', 'St': 'FILED', 'Dt': '2001-04-30'},
                                    {'RgltrCd': 'CO', 'St': 'FILED', 'Dt': '2001-04-30'},
                                    {'RgltrCd': 'DC', 'St': 'FILED', 'Dt': '2001-04-30'},
                                    {'RgltrCd': 'FL', 'St': 'FILED', 'Dt': '1993-06-14'},
                                    {'RgltrCd': 'MI', 'St': 'FILED', 'Dt': '2001-04-30'},
                                    {'RgltrCd': 'MN', 'St': 'FILED', 'Dt': '1998-01-02'},
                                    {'RgltrCd': 'MS', 'St': 'FILED', 'Dt': '1997-11-17'},
                                    {'RgltrCd': 'MO', 'St': 'FILED', 'Dt': '1997-11-19'},
                                    {'RgltrCd': 'MT', 'St': 'FILED', 'Dt': '1997-11-26'},
                                    {'RgltrCd': 'NE', 'St': 'FILED', 'Dt': '1999-11-24'},
                                    {'RgltrCd': 'NV', 'St': 'FILED', 'Dt': '1991-01-02'},
                                    {'RgltrCd': 'NH', 'St': 'FILED', 'Dt': '1988-10-26'},
                                    {'RgltrCd': 'NJ', 'St': 'FILED', 'Dt': '1988-09-15'},
                                    {'RgltrCd': 'NM', 'St': 'FILED', 'Dt': '1989-01-25'},
                                    {'RgltrCd': 'NY', 'St': 'FILED', 'Dt': '1988-10-26'},
                                    {'RgltrCd': 'NC', 'St': 'FILED', 'Dt': '2001-04-03'},
                                    {'RgltrCd': 'ND', 'St': 'FILED', 'Dt': '1988-10-18'},
                                    {'RgltrCd': 'OH', 'St': 'FILED', 'Dt': '1999-11-19'},
                                    {'RgltrCd': 'OK', 'St': 'FILED', 'Dt': '1998-01-01'},
                                    {'RgltrCd': 'OR', 'St': 'FILED', 'Dt': '1988-11-18'},
                                    {'RgltrCd': 'PA', 'St': 'FILED', 'Dt': '1998-01-01'},
                                    {'RgltrCd': 'PR', 'St': 'FILED', 'Dt': '1996-11-01'},
                                    {'RgltrCd': 'RI', 'St': 'FILED', 'Dt': '1997-11-17'},
                                    {'RgltrCd': 'SC', 'St': 'FILED', 'Dt': '1988-10-24'},
                                    {'RgltrCd': 'SD', 'St': 'FILED', 'Dt': '1988-10-21'},
                                    {'RgltrCd': 'TN', 'St': 'FILED', 'Dt': '1997-09-19'},
                                    {'RgltrCd': 'TX', 'St': 'FILED', 'Dt': '2001-04-30'},
                                    {'RgltrCd': 'UT', 'St': 'FILED', 'Dt': '1997-10-09'},
                                    {'RgltrCd': 'VT', 'St': 'FILED', 'Dt': '1997-11-24'},
                                    {'RgltrCd': 'VA', 'St': 'FILED', 'Dt': '1998-02-03'},
                                    {'RgltrCd': 'WA', 'St': 'FILED', 'Dt': '1998-12-29'},
                                    {'RgltrCd': 'WV', 'St': 'FILED', 'Dt': '1988-09-06'},
                                    {'RgltrCd': 'WI', 'St': 'FILED', 'Dt': '1997-11-17'},
                                    {'RgltrCd': 'WY', 'St': 'FILED', 'Dt': '2018-01-16'},
                                    {'RgltrCd': 'VI', 'St': 'FILED', 'Dt': '2008-02-28'}]},
                                  'Filing': [{'Dt': '2023-04-13', 'FormVrsn': '10/2021'}],
                                  'FormInfo': {'Part1A': {'Item1': {'WebAddrs': {'WebAddr': 'https://www.linkedin.com/showcase/marcus-by-go'},
                                     'Q1F5': 20,
                                     'Q1I': 'Y',
                                     'Q1M': 'Y',
                                     'Q1N': 'N',
                                     'Q1O': 'Y',
                                     'Q1ODesc': 'More than $50 billion',
                                     'Q1P': 'FOR8UP27PHTHYVLBNG30'},
                                    'Item2A': {'Q2A1': 'Y',
                                     'Q2A2': 'N',
                                     'Q2A4': 'N',
                                     'Q2A5': 'N',
                                     'Q2A6': 'N',
                                     'Q2A7': 'N',
                                     'Q2A8': 'N',
                                     'Q2A9': 'N',
                                     'Q2A10': 'N',
                                     'Q2A11': 'N',
                                     'Q2A12': 'N',
                                     'Q2A13': 'N'},
                                    'Item2B': {},
                                    'Item3A': {'OrgFormNm': 'Limited Liability Company'},
                                    'Item3B': {'Q3B': 'DECEMBER'},
                                    'Item3C': {'StateCD': 'NY', 'CntryNm': 'United States'},
                                    'Item5A': {'TtlEmp': 3932},
                                    'Item5B': {'Q5B1': 2260,
                                     'Q5B2': 1827,
                                     'Q5B3': 1,
                                     'Q5B4': 4,
                                     'Q5B5': 37,
                                     'Q5B6': 2},
                                    'Item5C': {'Q5C1': '1627', 'Q5C2': 1},
                                    'Item5D': {'Q5DA1': 37898,
                                     'Q5DA3': 597854066,
                                     'Q5DB1': 21314,
                                     'Q5DB3': 32954583407,
                                     'Q5DC2': 'Fewer than 5 clients',
                                     'Q5DD1': 0,
                                     'Q5DE1': 0,
                                     'Q5DF1': 320,
                                     'Q5DF3': 72199970074,
                                     'Q5DG2': 'Fewer than 5 clients',
                                     'Q5DG3': 596081,
                                     'Q5DH1': 987,
                                     'Q5DH3': 9687176630,
                                     'Q5DI2': 'Fewer than 5 clients',
                                     'Q5DI3': 3450357,
                                     'Q5DJ2': 'Fewer than 5 clients',
                                     'Q5DJ3': 0,
                                     'Q5DK1': 22,
                                     'Q5DK3': 757657076,
                                     'Q5DL2': 'Fewer than 5 clients',
                                     'Q5DL3': 8704730,
                                     'Q5DM1': 401,
                                     'Q5DM3': 8049384948,
                                     'Q5DN1': 12183,
                                     'Q5DN3': 87159172841,
                                     'Q5DN3Oth': 'GS TRUST COMPANY, INDIAN TRIBES'},
                                    'Item5E': {'Q5E1': 'Y',
                                     'Q5E2': 'N',
                                     'Q5E3': 'N',
                                     'Q5E4': 'Y',
                                     'Q5E5': 'Y',
                                     'Q5E6': 'Y',
                                     'Q5E7': 'Y',
                                     'Q5E7Oth': 'EXECUTION CHARGES, CUSTODY, MANAGEMENT FEE'},
                                    'Item5F': {'Q5F1': 'Y',
                                     'Q5F2A': 206878508638,
                                     'Q5F2B': 4540041572,
                                     'Q5F2C': 211418550210,
                                     'Q5F2D': 71180,
                                     'Q5F2E': 19,
                                     'Q5F2F': 71199,
                                     'Q5F3': 69638102925},
                                    'Item5G': {'Q5G1': 'Y',
                                     'Q5G2': 'Y',
                                     'Q5G3': 'N',
                                     'Q5G4': 'Y',
                                     'Q5G5': 'Y',
                                     'Q5G6': 'N',
                                     'Q5G7': 'Y',
                                     'Q5G8': 'Y',
                                     'Q5G9': 'N',
                                     'Q5G10': 'N',
                                     'Q5G11': 'Y',
                                     'Q5G12': 'N'},
                                    'Item5H': {'Q5H': '1-10'},
                                    'Item5I': {'Q5I1': 'Y', 'Q5I2A': 0, 'Q5I2B': 0, 'Q5I2C': 620639145},
                                    'Item5J': {'Q5J1': 'Y', 'Q5J2': 'Y'},
                                    'Item5K': {'Q5K1': 'Y', 'Q5K2': 'Y', 'Q5K3': 'Y', 'Q5K4': 'Y'},
                                    'Item5L': {'Q5L1A': 'Y',
                                     'Q5L1B': 'Y',
                                     'Q5L1C': 'Y',
                                     'Q5L1D': 'N',
                                     'Q5L1E': 'Y',
                                     'Q5L2': 'Y',
                                     'Q5L3': 'Y',
                                     'Q5L4': 'N'},
                                    'Item6A': {'Q6A1': 'Y',
                                     'Q6A2': 'N',
                                     'Q6A3': 'Y',
                                     'Q6A4': 'Y',
                                     'Q6A5': 'N',
                                     'Q6A6': 'N',
                                     'Q6A7': 'N',
                                     'Q6A8': 'N',
                                     'Q6A9': 'Y',
                                     'Q6A10': 'Y',
                                     'Q6A11': 'N',
                                     'Q6A12': 'N',
                                     'Q6A13': 'N',
                                     'Q6A14': 'N'},
                                    'Item6B': {'Q6B1': 'Y', 'Q6B2': 'N', 'Q6B3': 'Y'},
                                    'Item7A': {'Q7A1': 'Y',
                                     'Q7A2': 'Y',
                                     'Q7A3': 'N',
                                     'Q7A4': 'Y',
                                     'Q7A5': 'N',
                                     'Q7A6': 'Y',
                                     'Q7A7': 'Y',
                                     'Q7A8': 'Y',
                                     'Q7A9': 'Y',
                                     'Q7A10': 'N',
                                     'Q7A11': 'N',
                                     'Q7A12': 'Y',
                                     'Q7A13': 'Y',
                                     'Q7A14': 'N',
                                     'Q7A15': 'N',
                                     'Q7A16': 'Y'},
                                    'Item7B': {'Q7B': 'Y'},
                                    'Item8A': {'Q8A1': 'Y', 'Q8A2': 'Y', 'Q8A3': 'Y'},
                                    'Item8B': {'Q8B1': 'Y', 'Q8B2': 'Y', 'Q8B3': 'Y'},
                                    'Item8C': {'Q8C1': 'Y', 'Q8C2': 'Y', 'Q8C3': 'Y', 'Q8C4': 'Y'},
                                    'Item8D': {'Q8D': 'Y'},
                                    'Item8E': {'Q8E': 'Y'},
                                    'Item8F': {'Q8F': 'Y'},
                                    'Item8G': {'Q8G1': 'Y', 'Q8G2': 'Y'},
                                    'Item8H': {'Q8H1': 'Y', 'Q8H2': 'Y'},
                                    'Item8I': {'Q8I': 'N'},
                                    'Item9A': {'Q9A1A': 'Y',
                                     'Q9A1B': 'Y',
                                     'Q9A2A': 118298241959,
                                     'Q9A2B': 35087},
                                    'Item9B': {'Q9B1A': 'Y', 'Q9B1B': 'Y', 'Q9B2A': 1215029045, 'Q9B2B': 152},
                                    'Item9C': {'Q9C1': 'Y', 'Q9C2': 'Y', 'Q9C3': 'Y', 'Q9C4': 'Y'},
                                    'Item9D': {'Q9D1': 'Y', 'Q9D2': 'Y'},
                                    'Item9E': {'Q9E': '2022-10'},
                                    'Item9F': {'Q9F': 100},
                                    'Item10A': {'Q10A': 'N'},
                                    'Item11': {'Q11': 'Y'},
                                    'Item11A': {'Q11A1': 'Y', 'Q11A2': 'Y'},
                                    'Item11B': {'Q11B1': 'Y', 'Q11B2': 'Y'},
                                    'Item11C': {'Q11C1': 'Y',
                                     'Q11C2': 'Y',
                                     'Q11C3': 'N',
                                     'Q11C4': 'Y',
                                     'Q11C5': 'Y'},
                                    'Item11D': {'Q11D1': 'Y',
                                     'Q11D2': 'Y',
                                     'Q11D3': 'N',
                                     'Q11D4': 'Y',
                                     'Q11D5': 'Y'},
                                    'Item11E': {'Q11E1': 'Y', 'Q11E2': 'Y', 'Q11E3': 'N', 'Q11E4': 'N'},
                                    'Item11F': {'Q11F': 'Y'},
                                    'Item11G': {'Q11G': 'Y'},
                                    'Item11H': {'Q11H1A': 'Y', 'Q11H1B': 'Y', 'Q11H1C': 'Y', 'Q11H2': 'Y'}}},
                                  'id': 361}]

                                List CRDs of Firm Advisers with Recently Updated Form ADVs

                                In this section, we will demonstrate how to find and list all CRDs of firm advisers who have published or updated their Form ADVs within a specific date range.

                                Here are two sample queries for this scenario:

                                # Date range search
                                "query": "Filing.Dt:[2023-05-10 TO 2023-05-14]"

                                # Wildcard search to match any CRD
                                "query": "Info.FirmCrdNb:*"

                                Understanding Pagination

                                Pagination is a technique used to retrieve a large number of results by splitting them into smaller, manageable chunks. In our case, we will use pagination to retrieve all filings by incrementing the from parameter in our query.

                                To simplify this process, we define a function called get_filings(query) that handles the pagination logic for us. The function retrieves filings by repeatedly calling the API with different from and size parameters until all filings have been retrieved. The size_param determines the number of filings to be fetched in each request.

                                Here is an example of the get_filings() function:

                                import pandas as pd

                                def get_filings(query):
                                  from_param = 0
                                  size_param = 50
                                  all_filings = []

                                  while True:
                                    query['from'] = from_param
                                    query['size'] = size_param
                                    
                                    response = formAdvApi.get_firms(query)
                                    filings = response['filings']

                                    if len(filings) == 0:
                                      break

                                    all_filings.extend(filings)

                                    from_param += size_param

                                  return pd.json_normalize(all_filings)

                                With the get_filings() function, we can easily retrieve all filings by passing the query as a parameter. In this case, we will use the recently_updated_query as an example:

                                recently_updated_query = {
                                    "query": "Filing.Dt:[2023-05-10 TO 2023-05-14]",
                                    "from": "0",
                                    "size": "50",
                                    "sort": [{ "Filing.Dt": { "order": "desc" }}]
                                }

                                filings = get_filings(recently_updated_query)

                                By executing this code, we will retrieve the JSON-formatted ADV filings for the recently updated Form ADVs of firm advisers within the specified date range.

                                print('Form ADVs updated between 10-14 May 2023')
                                print('----------------------------------------')
                                print('Number of Form ADVs found:', len(filings))
                                filings.sort_values('Info.FirmCrdNb')
                                Form ADVs updated between 10-14 May 2023
                                ----------------------------------------
                                Number of Form ADVs found: 620
                                Out[7]:
                                RgstnFilingidInfo.SECRgnCDInfo.FirmCrdNbInfo.SECNbInfo.BusNmInfo.LegalNmMainAddr.Strt1MainAddr.City...MailingAddr.CntryMailingAddr.PostlCdFormInfo.Part1A.Item1.Q1ODescFormInfo.Part1A.Item5H.Q5HMT500FormInfo.Part1B.ItemH.Q1B2HNScrtsNvsmtAmFormInfo.Part1B.ItemJ.Q1BJ1AFormInfo.Part1B.ItemJ.Q1BJ1BFormInfo.Part1B.ItemJ.Q1BJ2AFormInfo.Part1B.ItemI.Q1B2I2AiiOthTxFormInfo.Part1A.Item6A.Q6A14Oth
                                49[{'FirmType': 'Registered', 'St': 'APPROVED', ...[{'Dt': '2023-05-12', 'FormVrsn': '10/2021'}]421CHRO421801-54905WOODBURY FINANCIAL SERVICES, INC.WOODBURY FINANCIAL SERVICES, INC.7755 3RD STREET NORTHOAKDALE...United States55164-0284NaN1000.0NaNNaNNaNNaNNaNNaN
                                116[{'FirmType': 'Registered', 'St': 'APPROVED', ...[{'Dt': '2023-05-12', 'FormVrsn': '10/2021'}]7461ARO7461801-42017FSC SECURITIES CORPORATIONFSC SECURITIES CORPORATION2300 WINDY RIDGE PKWYATLANTA...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                323[{'FirmType': 'Registered', 'St': 'APPROVED', ...[{'Dt': '2023-05-11', 'FormVrsn': '10/2021'}]12963MIRO12963801-39736MONEY CONCEPTS ADVISORY SERVICEMONEY CONCEPTS CAPITAL CORP11440 NORTH JOG ROADPALM BEACH GARDENS...NaNNaNNaN1000.0NaNNaNNaNNaNNaNNaN
                                405NaN[{'Dt': '2023-05-11', 'FormVrsn': '10/2021'}]12963NaN12963801-39736MONEY CONCEPTS ADVISORY SERVICEMONEY CONCEPTS CAPITAL CORP11440 NORTH JOG ROADPALM BEACH GARDENS...NaNNaNNaN1000.0NaNNaNNaNNaNNaNNaN
                                496[{'FirmType': 'Registered', 'St': 'APPROVED', ...[{'Dt': '2023-05-10', 'FormVrsn': '10/2021'}]14762CHRO14762801-111070COORDINATED CAPITAL SECURITIES, INC.COORDINATED CAPITAL SECURITIES, INC.704 RIVERPLACE COMMERCE CENTER IIIMADISON...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                ..................................................................
                                581NaN[{'Dt': '2023-05-10', 'FormVrsn': '10/2021'}]326416NaN326416802-128136LEAP FORWARD VENTURES, LLCLEAP FORWARD VENTURES, LLC700 LARKSPUR LANDING CIRCLELARKSPUR...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                302[{'FirmType': 'ERA', 'St': 'ACTIVE', 'Dt': '20...[{'Dt': '2023-05-11', 'FormVrsn': '10/2021'}]326659NYRO326659802-128142MATERIALMATERIAL LLCNaNNaN...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                165NaN[{'Dt': '2023-05-12', 'FormVrsn': '10/2021'}]326772NaN326772NaNWESTERN RESERVE WEALTH MANAGEMENT LLCWESTERN RESERVE WEALTH MANAGEMENT LLCNaNNaN...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                431[{'FirmType': 'ERA', 'St': 'ACTIVE', 'Dt': '20...[{'Dt': '2023-05-10', 'FormVrsn': '10/2021'}]326807NYRO326807802-128130ROUND2 INVESTMENT PARTNERS LLCROUND2 INVESTMENT PARTNERS LLC410 PARK AVENUE, SUITE 510NEW YORK...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                549NaN[{'Dt': '2023-05-10', 'FormVrsn': '10/2021'}]326866NaN326866NaNSEAPLANE VENTURES, LLCSEAPLANE VENTURES, LLCNaNNaN...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN

                                620 rows × 293 columns

                                Extracting the CRDs from the retrieved filings is a straightforward process.

                                crds = filings['Info.FirmCrdNb'].to_list()
                                crds[:15]
                                Out[8]:
                                [324295,
                                 166547,
                                 281976,
                                 308992,
                                 132095,
                                 218518,
                                 311686,
                                 300571,
                                 306209,
                                 305255,
                                 314985,
                                 277137,
                                 299742,
                                 165124,
                                 316961]

                                Find Advisers by Advisory Activity

                                Form ADV includes information about an advisor's advisory activities in Item 5.G. The Form ADV API returns this information in JSON format. The structure of the JSON data is as follows:

                                "FormInfo": {
                                "Part1A": {
                                // ...
                                "Item5G": {
                                "Q5G1": "N",
                                "Q5G2": "N",
                                "Q5G3": "Y",
                                "Q5G4": "Y",
                                "Q5G5": "Y",
                                "Q5G6": "N",
                                "Q5G7": "Y",
                                "Q5G8": "Y",
                                "Q5G9": "N",
                                "Q5G10": "N",
                                "Q5G11": "N",
                                "Q5G12": "N"
                                }
                                // ... more fields here
                                }
                                }

                                The advisory activities in Item 5.G. are represented by the keys Q5G1 to Q5G12. Each key corresponds to a specific advisory activity, and the values Y and N indicate whether the advisor performs that particular activity or not.

                                To facilitate understanding and mapping between the advisory activities and the corresponding keys, the table below provides the complete mapping:

                                IDKeyAdvisory Activity
                                1Q5G1Financial planning services
                                2Q5G2Portfolio management (PM) for individuals and/or small businesses
                                3Q5G3PM for investment companies and "business development companies"
                                4Q5G4PM for pooled investment vehicles (other than investment companies)
                                5Q5G5PM for businesses (other than small businesses) or institutional clients
                                6Q5G6Pension consulting services
                                7Q5G7Selection of other advisers (including private fund managers)
                                8Q5G8Publication of periodicals or newsletters
                                9Q5G9Security ratings or pricing services
                                10Q5G10Market timing services
                                11Q5G11Educational seminars/workshops
                                12Q5G12Other

                                For example, to search for advisers that perform security ratings or pricing services (Q5G9:Y), you can use the search query as shown below:

                                ratings_query = {
                                    "query": "FormInfo.Part1A.Item5G.Q5G9:Y",
                                    "sort": [{ "Filing.Dt": { "order": "desc" }}]
                                }

                                form_advs_ratings = get_filings(ratings_query)
                                print('Form ADVs filtered by security ratings or pricing services')
                                print('----------------------------------------------------------')
                                print('Number of Form ADVs found:', len(form_advs_ratings))
                                form_advs_ratings.sort_values('Info.FirmCrdNb').head()
                                Form ADVs filtered by security ratings or pricing services
                                ----------------------------------------------------------
                                Number of Form ADVs found: 91
                                Out[10]:
                                RgstnFilingidInfo.SECRgnCDInfo.FirmCrdNbInfo.SECNbInfo.BusNmInfo.LegalNmInfo.UmbrRgstnMainAddr.Strt1...FormInfo.Part1A.Item5D.Q5D2EFormInfo.Part1A.Item5D.Q5D2FFormInfo.Part1A.Item5D.Q5D2GFormInfo.Part1A.Item5D.Q5D2HFormInfo.Part1A.Item5D.Q5D2IFormInfo.Part1A.Item5D.Q5D2JFormInfo.Part1A.Item5D.Q5D2KFormInfo.Part1A.Item5D.Q5D2LFormInfo.Part1A.Item5D.Q5D2MFormInfo.Part1A.Item8H.Q8H
                                9[{'FirmType': 'Registered', 'St': 'APPROVED', ...[{'Dt': '2023-04-07', 'FormVrsn': '10/2021'}]2525NYRO2525801-9638DEUTSCHE BANK SECURITIES INC.DEUTSCHE BANK SECURITIES INC.N1 COLUMBUS CIRCLE...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                5[{'FirmType': 'Registered', 'St': 'APPROVED', ...[{'Dt': '2023-04-25', 'FormVrsn': '10/2021'}]7059NYRO7059801-3387CITIGROUP GLOBAL MARKETS INC.CITIGROUP GLOBAL MARKETS INC.N388 GREENWICH STREET...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                54[{'FirmType': 'Registered', 'St': 'APPROVED', ...[{'Dt': '2023-01-18', 'FormVrsn': '10/2021'}]7524CHRO7524801-67742FIRST KENTUCKY SECURITIES CORPFIRST KENTUCKY SECURITIES CORPORATIONN4360 BROWNSBORO ROAD...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                10[{'FirmType': 'Registered', 'St': 'APPROVED', ...[{'Dt': '2023-04-06', 'FormVrsn': '10/2021'}]8174NYRO8174801-7163UBS FINANCIAL SERVICES INC.UBS FINANCIAL SERVICES INC.N1200 HARBOR BOULEVARD...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN
                                84NaN[{'Dt': '2018-03-18', 'FormVrsn': '10/2017'}]36105NaN36105NaNUNIVEST SECURITIESUNIVEST SECURITIES, LLCN3687 MEADOW LANE...NaNNaNNaNNaNNaNNaNNaNNaNNaNNaN

                                5 rows × 311 columns

                                The following format_item_5g function renames the columns to make them more readable and removes the common prefix "FormInfo.Part1A.Item5G.". It also includes additional columns for "Adviser" and "CRD". The resulting dataframe will have the updated column names and the relevant columns for the Item 5.G. advisory activities.

                                def format_item_5g(filings):
                                  filtered_columns = filings.filter(like='FormInfo.Part1A.Item5G')
                                  additional_columns = filings[['Info.BusNm', 'Info.FirmCrdNb']]
                                  additional_columns = additional_columns.rename(columns={'Info.BusNm': 'Adviser', 'Info.FirmCrdNb': 'CRD'})
                                  selected_columns = pd.concat([additional_columns, filtered_columns], axis=1)
                                  selected_columns.columns = selected_columns.columns.str.replace(r'^FormInfo\.Part1A\.Item5G\.', '', regex=True)
                                  return selected_columns


                                format_item_5g(form_advs_ratings)
                                Out[11]:
                                AdviserCRDQ5G1Q5G2Q5G3Q5G4Q5G5Q5G6Q5G7Q5G8Q5G9Q5G10Q5G11Q5G12Q5G12Oth
                                0GILLILAND JETER WEALTH MANAGEMENT, LLC324403YYNNYYYNYNNNNaN
                                1SNIDER ADVISORS120943NYNNNNNYYNYYINVESTMENT-RELATED CONSULTING
                                2LANGFORD INVESTMENT COMPANY116472NYNNYYYNYYNNNaN
                                3ONEAMERICA ASSET MANAGEMENT, LLC165929NNNYNNYYYNYYTHIRD PARTY INVESTMENT ADVISER SERVICES AND PR...
                                4WITTFIT FINANCIAL LLC321961YYNNNNNYYYYNNaN
                                ................................................
                                86RECONDITE CAPITAL LLC281268YYNNYNNYYNNNNaN
                                87DEER ISLE RESEARCH & MANAGEMENT, LLC156636NNNNNNNNYNNYINVESTMENT RESEARCH
                                88HARRISON SECURITIES, INC.144685NNNNNNNNYNNYFISCAL AGENT TO POLITICAL SUBDIVISIONS
                                89INTELLIVEST SECURITIES RESEARCH, INC147288YNNNNNNYYNNNNaN
                                90INTELLIVEST SECURITIES, INC.145022YNNNNNNYYNNNNaN

                                91 rows × 15 columns

                                If we want to find advisers offering pension consulting services (Q5G6:Y) in addition to our previous search query for "security ratings or pricing services", we can apply a filter mask to our dataframe using the following code:

                                filter_mask = form_advs_ratings['FormInfo.Part1A.Item5G.Q5G6'] == 'Y'
                                ratings_and_pension = form_advs_ratings[filter_mask]
                                print('Form ADVs filtered by ratings/pricing and pension consulting services')
                                print('---------------------------------------------------------------------')
                                print('Number of Form ADVs found:', len(ratings_and_pension))
                                format_item_5g(ratings_and_pension)
                                Form ADVs filtered by ratings/pricing and pension consulting services
                                ---------------------------------------------------------------------
                                Number of Form ADVs found: 22
                                Out[13]:
                                AdviserCRDQ5G1Q5G2Q5G3Q5G4Q5G5Q5G6Q5G7Q5G8Q5G9Q5G10Q5G11Q5G12Q5G12Oth
                                0GILLILAND JETER WEALTH MANAGEMENT, LLC324403YYNNYYYNYNNNNaN
                                2LANGFORD INVESTMENT COMPANY116472NYNNYYYNYYNNNaN
                                5CITIGROUP GLOBAL MARKETS INC.7059YYNNYYYYYNNYASSET ALLOCATION ADVICE
                                10UBS FINANCIAL SERVICES INC.8174YYNNYYYYYNYNNaN
                                16INSTITUTIONAL SHAREHOLDER SERVICES INC.111940NNNNNYNYYNNYPROXY ANALYSIS, PROXY VOTING RECOMMENDATIONS, ...
                                17BEST LIFE INFINITY, LLC319232YYNNNYNYYNYNNaN
                                19NETHERBY ADVISORS LLC148827YYNNYYNYYNYNNaN
                                23MANAGED ASSET PORTFOLIOS, LLC109574NYYYYYNNYNNYPORTFOLIO MANAGEMENT FOR TRUSTS AND OFFSHORE V...
                                26JRM CAPITAL MANAGEMENT INC.142039YYNYYYNYYNYNNaN
                                28STERLING FINANCIAL ADVISORS, LLC107783NYNNNYNNYNNNNaN
                                32BLUE ARIS314727YYNNNYYYYYYNNaN
                                33THE BALANCE OF TRADE291982YNNNNYNYYYYNNaN
                                53MODERN MONEY MANAGEMENT LLC311307YYNNNYNNYNNNNaN
                                58SKYY FINANCIAL GROUP, LLC282593NYNYYYYNYYYYINVESTMENT PLANNING
                                59NED DAVIS RESEARCH, INC.112260NNNNNYNYYYYYISSUES CHARTS, GRAPHS, ETC & CRS, MODEL PORTFO...
                                62LIGHTHOUSE FINANCIAL142481YYNNNYNNYYNNNaN
                                64FINELY CAPITAL315270YNNYYYYYYYYNNaN
                                65PAUL M. WENDEE & ASSOCIATES299188YYNYYYYYYYYNNaN
                                68WILSON, CLARK ALLEN121925NYNYYYNYYYYNNaN
                                74P3 CAPITAL310229YYNYYYYNYNYNNaN
                                80BETTER OPTIONS LLC308312NYNYYYYYYYYNNaN
                                82SAVYON ADVISORY, LLC298256YYYNNYYNYYYNNaN

                                Find Advisers by Business Activity

                                The following example demonstrates how to find Form ADVs and advisers by filtering the Form ADV database based on the business activity of advisers.

                                Business activities are disclosed in Item 6A of Part 1A in Form ADVs. The image below provides an example of the business activity section:

                                example of a business activity section

                                The same Form ADV section is represented as JSON data in the response from the Form ADV API, as shown below:

                                "FormInfo": {
                                "Part1A": {
                                "Item6A": {
                                "Q6A1": "N",
                                "Q6A2": "N",
                                "Q6A3": "Y",
                                "Q6A4": "N",
                                "Q6A5": "N",
                                "Q6A6": "N",
                                "Q6A7": "N",
                                "Q6A8": "N",
                                "Q6A9": "N",
                                "Q6A10": "N",
                                "Q6A11": "N",
                                "Q6A12": "N",
                                "Q6A13": "N",
                                "Q6A14": "N"
                                },
                                // ... more fields here
                                }
                                }

                                The next code snippet demonstrates how to filter Form ADVs based on the business activity of commodity pool operators.

                                First, we define the commodity_pool_query which searches for Form ADVs where the business activity of commodity pool operators (Item 6A, Q6A3) is marked as "Y" (indicating "Yes"). This query is used to retrieve the relevant filings from the Form ADV database.

                                The form_advs_commodity_pool variable stores the result of calling the get_filings(commodity_pool_query) function. This retrieves the Form ADVs matching the specified business activity filter.

                                The format_item_6a(filings) function takes the retrieved filings and formats them to include only the relevant columns related to Item 6A. It filters the columns based on the "FormInfo.Part1A.Item6A" prefix, renames the additional columns for clarity, and returns the selected columns in a formatted dataframe.

                                Finally, the filtered Form ADVs are printed along with the number of filings found.

                                commodity_pool_query = {
                                    "query": "FormInfo.Part1A.Item6A.Q6A3:Y",
                                    "sort": [{ "Filing.Dt": { "order": "desc" }}]
                                }

                                form_advs_commodity_pool = get_filings(commodity_pool_query)
                                def format_item_6a(filings):
                                  filtered_columns = filings.filter(like='FormInfo.Part1A.Item6A')
                                  additional_columns = filings[['Info.BusNm', 'Info.FirmCrdNb']]
                                  additional_columns = additional_columns.rename(columns={'Info.BusNm': 'Adviser', 'Info.FirmCrdNb': 'CRD'})
                                  selected_columns = pd.concat([additional_columns, filtered_columns], axis=1)
                                  selected_columns.columns = selected_columns.columns.str.replace(r'^FormInfo\.Part1A\.Item6A\.', '', regex=True)
                                  return selected_columns


                                print('Form ADVs filtered by commodity pool operators')
                                print('----------------------------------------------')
                                print('Number of Form ADVs found:', len(form_advs_commodity_pool))
                                format_item_6a(form_advs_commodity_pool)
                                Form ADVs filtered by commodity pool operators
                                ----------------------------------------------
                                Number of Form ADVs found: 3539
                                Out[15]:
                                AdviserCRDQ6A1Q6A2Q6A3Q6A4Q6A5Q6A6Q6A7Q6A8Q6A9Q6A10Q6A11Q6A12Q6A13Q6A14Q6A14Oth
                                0MORGAN STANLEY PRIVATE EQUITY ASIA, INC.134366NNYNNNNNNNNNNNNaN
                                1NXG INVESTMENT MANAGEMENT131517NNYNNNNNNNNNNNNaN
                                2LIDO269866NNYNNNNNNNNNNNNaN
                                3FIERA CAPITAL INC.113638NNYNNNNNNNNNNNNaN
                                4ALPHA WAVE GLOBAL, LP160894NNYNNNNNNNNNNNNaN
                                ......................................................
                                3534NEOWAVE EQUITY FUND, LLC171767NNYNNNNNNNNNNNNaN
                                3535SIRI CAPITAL ADVISORS LLC170778NNYNNNNNNNNNNNNaN
                                3536IRON LION CAPITAL157946NNYNNNNNNNNNNNNaN
                                3537VICUNA ADVISORS165705NNYNNNNNNNNNNNNaN
                                3538SENTINEL ALTERNATIVE ASSET MANAGEMENT, LLC162233NNYNNNNNNNNNNNNaN

                                3539 rows × 17 columns

                                Find Advisers by Compensation Arrangements

                                Similar to the previous section, the following example demonstrates how to filter advisers by their compensation arrangements.

                                The compensation arrangements section in Item 5E of Part 1A of a Form ADV provides information about how advisers are compensated. The following image represents an example of Item 5E.

                                compensation arrangements

                                Here is the representation of the same compensation arrangements section in JSON format as returned by the Form ADV API:

                                "FormInfo": {
                                "Part1A": {
                                "Item5E": {
                                "Q5E1": "Y",
                                "Q5E2": "N",
                                "Q5E3": "N",
                                "Q5E4": "N",
                                "Q5E5": "N",
                                "Q5E6": "Y",
                                "Q5E7": "Y",
                                "Q5E7Oth": "PERCENTAGE OF REVENUE FROM AFFILIATES"
                                },
                                // ... more fields here
                                }
                                }

                                In the JSON response, "Y" indicates that the adviser is compensated according to the respective type of arrangement. For example, Q5E1:Y indicates that the adviser is compensated by a percentage of assets under management.

                                The table below maps the compensation arrangements to the keys in the JSON response:

                                IDJSON KeyCompensation Arrangement
                                1Q5E1A percentage of assets under your management
                                2Q5E2Hourly charges
                                3Q5E3Subscription fees (for a newsletter or periodical)
                                4Q5E4Fixed fees (other than subscription fees)
                                5Q5E5Commissions
                                6Q5E6Performance-based fees
                                7Q5E7Other (specify)
                                7Q5E7OthDescription for Q5E7

                                To filter advisers based on their compensation arrangements, you can adjust your search query accordingly. For example, to find advisers who are compensated by a percentage of assets under management (Q5E1:Y), have performance-based fees (Q5E6:Y) and other arrangements (Q5E7), you define the following query:

                                compensation_query = {
                                    "query": "FormInfo.Part1A.Item5E.Q5E1:Y AND FormInfo.Part1A.Item5E.Q5E6:Y AND FormInfo.Part1A.Item5E.Q5E7:Y",
                                    "sort": [{ "Filing.Dt": { "order": "desc" }}]
                                }

                                form_advs_filtered_by_compensation = get_filings(compensation_query)
                                def format_item_5e(filings):
                                  filtered_columns = filings.filter(like='FormInfo.Part1A.Item5E')
                                  additional_columns = filings[['Info.BusNm', 'Info.FirmCrdNb']]
                                  additional_columns = additional_columns.rename(columns={'Info.BusNm': 'Adviser', 'Info.FirmCrdNb': 'CRD'})
                                  selected_columns = pd.concat([additional_columns, filtered_columns], axis=1)
                                  selected_columns.columns = selected_columns.columns.str.replace(r'^FormInfo\.Part1A\.Item5E\.', '', regex=True)
                                  return selected_columns


                                print('Form ADVs filtered by compensation arrangements')
                                print('-----------------------------------------------')
                                print('Number of Form ADVs found:', len(form_advs_filtered_by_compensation))
                                format_item_5e(form_advs_filtered_by_compensation)
                                Form ADVs filtered by compensation arrangements
                                -----------------------------------------------
                                Number of Form ADVs found: 902
                                Out[17]:
                                AdviserCRDQ5E1Q5E2Q5E3Q5E4Q5E5Q5E6Q5E7Q5E7Oth
                                0MORGAN STANLEY INFRASTRUCTURE INC.142824YNNNNYYACQUISITION FEES
                                1NCH CAPITAL INC.157288YNNNNYYCERTAIN FUNDS PAY FOR OVERHEAD EXPENSES. SEE ...
                                2KKR CREDIT ADVISORS (US) LLC146629YNNNNYYMANAGEMENT FEES
                                3OWNER RESOURCE GROUP, LLC164028YNNNNYYCONSULTING FEES
                                4EATON VANCE MANAGEMENT104859YNNNNYYPERCENTAGE OF PORTFOLIO INCOME
                                .................................
                                897TCA FUND MANAGEMENT GROUP169163YNNNNYYCLIENTS REIMBURSE CERTAIN INVESTMENT MANAGEMEN...
                                898RHYTHMIC CAPITAL MANAGEMENT LLC154165YYNNNYYPERCENTAGE OF ASSETS REVIEWED
                                899COASTAL PARTNERS LTD.140584YNNNNYYSOLICITORS FEES PAID BY 3RD PARTY ADVISERS
                                900FISHER FINANCIAL, P.A.139088YYNYNYYA % OF ASSETS MANAGED BY OTHERS
                                901SINTRA CAPITAL CORP113059YNNNNYYDETERMINED BY AGREEMENT

                                902 rows × 10 columns

                                Sort Advisers by Assets Under Mangement

                                The next example illustrates how to sort and filter advisers based on their assets under management (AUM).

                                The AUM information of firm advisers is disclosed in Item 5.F of the Form ADV. Here is an example section of Fidelity's Form ADV:

                                Item 5.F

                                The same information is provided in JSON format by the Form ADV API as follows:

                                "FormInfo": {
                                "Part1A": {
                                // ...
                                "Item5F": {
                                "Q5F1": "Y",
                                "Q5F2A": 3148421739247,
                                "Q5F2B": 0,
                                "Q5F2C": 3148421739247,
                                "Q5F2D": 23333,
                                "Q5F2E": 0,
                                "Q5F2F": 23333,
                                "Q5F3": 93001157963
                                }
                                // ...
                                }
                                }

                                There are three fields that provide information about assets under management:

                                • Q5F2A represents the discretionary AUM in US dollars.
                                • Q5F2C holds the total AUM in US dollars.
                                • Q5F3 represents the amount of assets attributable to non-US clients.

                                For this example, we will filter advisers based on the total AUM (Q5F2C). To demonstrate how to filter by AUM, we will use a range query syntax:

                                Q5F2C:[min_value TO max_value]

                                In this syntax, min_value represents the lower boundary, indicating that an adviser must have at least min_value AUM to be included in the response. The max_value is set as a wildcard * to indicate that there is no upper limit on the AUM.

                                To sort and filter advisers with at least $1bn AUM, we can use the following code snippet:

                                aum_query = {
                                  "query": "FormInfo.Part1A.Item5F.Q5F2C:[1000000000 TO *]",
                                  "sort": [{ "Info.FirmCrdNb": { "order": "desc" }}]
                                }

                                aum_filings = get_filings(aum_query)
                                print('Advisers with $1bn+ AUM:', len(aum_filings))
                                Advisers with $1bn+ AUM: 4605
                                sort_column = 'FormInfo.Part1A.Item5F.Q5F2C'

                                sorted_by_aum = aum_filings.sort_values(sort_column, ascending=False)

                                sorted_by_aum = sorted_by_aum[[sort_column,
                                                              'Info.BusNm',
                                                              'Info.FirmCrdNb',
                                                              'FormInfo.Part1A.Item5F.Q5F2F',
                                                              'FormInfo.Part1A.Item5A.TtlEmp']]

                                sorted_by_aum = sorted_by_aum.rename(columns={
                                                                'FormInfo.Part1A.Item5F.Q5F2C': 'AUM ($)',
                                                                'Info.FirmCrdNb': 'CRD',
                                                                'Info.BusNm': 'Name',
                                                                'FormInfo.Part1A.Item5F.Q5F2F': 'Accounts',
                                                                'FormInfo.Part1A.Item5A.TtlEmp': 'Employees'
                                                                })

                                sorted_by_aum['AUM per Account'] = sorted_by_aum['AUM ($)'].astype(int) / sorted_by_aum['Accounts'].astype(int)

                                columns_to_convert = ['AUM per Account', 'AUM ($)', 'Accounts', 'Employees']
                                sorted_by_aum[columns_to_convert] = sorted_by_aum[columns_to_convert].applymap(lambda x: '{:,.0f}'.format(x))

                                # drop incorrect 1st row
                                # 11,491,898,634,658 VISTA FINANCIAL ADVISORS, LLC 316306 32
                                sorted_by_aum = sorted_by_aum.drop(sorted_by_aum.index[0]).reset_index(drop=True)

                                top_20 = sorted_by_aum[:20]

                                print('Top 20 Firm Advisers by AUM')
                                print('---------------------------')
                                top_20
                                Top 20 Firm Advisers by AUM
                                ---------------------------
                                Out[20]:
                                AUM ($)NameCRDAccountsEmployeesAUM per Account
                                06,649,219,111,273VANGUARD GROUP INC10595820867531,967,399,573
                                13,148,421,739,247FIDELITY MANAGEMENT & RESEARCH COMPANY LLC10828123,3331,108134,934,288
                                22,750,178,273,164CAPITAL RESEARCH AND MANAGEMENT COMPANY11088516,8761,391162,963,870
                                32,406,691,634,676BLACKROCK FUND ADVISORS1052474817545,003,516,912
                                42,248,547,388,863PACIFIC INVESTMENT MANAGEMENT COMPANY LLC1045592,7823,177808,248,522
                                52,011,986,210,191J.P. MORGAN INVESTMENT MANAGEMENT INC.10703852,1573,11638,575,574
                                61,577,579,815,722GOLDMAN SACHS ASSET MANAGEMENT, L.P.107738171,3411,3519,207,252
                                71,506,538,334,571T. ROWE PRICE ASSOCIATES, INC.1054963,7833,722398,239,052
                                81,204,691,064,459WELLINGTON MANAGEMENT COMPANY LLP1065951,3382,139900,367,014
                                91,185,061,196,999MORGAN STANLEY1497772,233,18828,000530,659
                                101,163,046,943,604BLACKROCK FINANCIAL MANAGEMENT, INC1071052,2206,491523,895,020
                                111,093,689,238,206MERRILL LYNCH, PIERCE, FENNER & SMITH INCORPOR...76912,864,23436,687381,844
                                12983,853,862,895PGIM, INC.1056768741,6581,125,690,919
                                13902,656,985,580NORTHERN TRUST INVESTMENTS, INCORPORATED10578041,21972621,899,051
                                14901,548,041,456HAMILTON LANE1078763045062,965,618,557
                                15841,529,842,790SSGA FUNDS MANAGEMENT, INC.1112422472503,407,003,412
                                16803,470,618,544GEODE CAPITAL MANAGEMENT, LLC1155041741564,617,647,233
                                17782,620,910,160CHARLES SCHWAB INVESTMENT MANAGEMENT, INC106753242,0411,0073,233,423
                                18745,826,453,479BLACKROCK ADVISORS, LLC1066143222562,316,231,222
                                19738,307,405,774INVESCO ADVISERS, INC.10536032,9113,06022,433,454
                                aggregated_aum = sorted_by_aum['AUM ($)'].str.replace(',', '').astype(int).sum()

                                print('Aggregated AUM of adviers: ${:,.0f}'.format(aggregated_aum))
                                Aggregated AUM of adviers: $112,492,234,622,227

                                Sort Advisers by Number of Accounts

                                The total number of accounts is also disclosed in Item 5F of the Form ADV. Building on the example from the previous section, we can modify the code to sort the advisers based on the number of accounts (FormInfo.Part1A.Item5F.Q5F2F). This will allow us to create a top 20 list of firm advisers sorted by the total number of accounts they have.

                                Here's an updated code snippet to achieve this:

                                sort_column = 'FormInfo.Part1A.Item5F.Q5F2F' # Number of accounts, total

                                sorted_by_accounts = aum_filings.sort_values(sort_column, ascending=False)

                                # drop: 5,435,607,326 MARINER INVESTMENT GROUP, LLC 124744 180,493,766,178
                                sorted_by_accounts = sorted_by_accounts.drop(sorted_by_accounts.index[0]) \
                                                                       .reset_index(drop=True)

                                top_20_by_accounts = sorted_by_accounts[[sort_column,
                                                                        'Info.BusNm',
                                                                        'Info.FirmCrdNb',
                                                                        'FormInfo.Part1A.Item5F.Q5F2C',
                                                                        'FormInfo.Part1A.Item5A.TtlEmp' ]][:20]

                                top_20_by_accounts = top_20_by_accounts.rename(columns={
                                                                                    'FormInfo.Part1A.Item5F.Q5F2C': 'AUM ($)',
                                                                                    'Info.FirmCrdNb': 'CRD',
                                                                                    'Info.BusNm': 'Name',
                                                                                    'FormInfo.Part1A.Item5F.Q5F2F': 'Accounts',
                                                                                    'FormInfo.Part1A.Item5A.TtlEmp': 'Employees'
                                                                                })

                                columns_to_convert = ['AUM ($)', 'Accounts', 'Employees']
                                top_20_by_accounts[columns_to_convert] = top_20_by_accounts[columns_to_convert].applymap(lambda x: '{:,.0f}'.format(x))

                                print('Top 20 Firm Advisers by Accounts')
                                print('--------------------------------')
                                top_20_by_accounts
                                Top 20 Firm Advisers by Accounts
                                --------------------------------
                                Out[22]:
                                AccountsNameCRDAUM ($)Employees
                                04,558,331EDWARD JONES250593,126,816,82828,607
                                13,374,948STASH INVEST2265502,610,411,753420
                                22,864,234MERRILL LYNCH, PIERCE, FENNER & SMITH INCORPOR...76911,093,689,238,20636,687
                                32,233,188MORGAN STANLEY1497771,185,061,196,99928,000
                                41,953,584AMERIPRISE FINANCIAL SERVICES, LLC6363414,380,098,35514,187
                                51,736,317MANAGED ACCOUNT ADVISORS LLC142558576,264,919,53964
                                61,713,518ENVESTNET PMC111694346,833,814,021479
                                71,712,300STRATEGIC ADVISERS LLC104555659,550,224,982219
                                81,712,247FIDELITY PERSONAL AND WORKPLACE ADVISORS288590652,548,367,85313,507
                                91,688,501LPL FINANCIAL LLC6413368,018,536,94631,366
                                101,594,707FINANCIAL ENGINES ADVISORS L.L.C.104510241,970,176,7431,514
                                111,428,999WELLS FARGO CLEARING SERVICES, LLC19616524,940,620,14120,587
                                121,077,471UBS FINANCIAL SERVICES INC.8174600,808,847,01213,059
                                131,028,431BETTERMENT14911736,630,802,858449
                                14982,795J.P. MORGAN SECURITIES LLC79212,928,874,8407,098
                                15950,978RAYMOND JAMES & ASSOCIATES, INC.705306,121,310,12011,789
                                16932,793RAYMOND JAMES FINANCIAL SERVICES ADVISORS, INC149018245,249,234,0836,517
                                17871,626J.P. MORGAN PRIVATE INVESTMENTS INC.110186238,864,704,749709
                                18634,470VANGUARD ADVISERS, INC.106715299,191,714,6492,124
                                19591,801WILSHIRE ADVISORS LLC621095,554,572,990273

                                Find Individual Advisers

                                This section demonstrates how to access and search individual investment advisers using the .get_individuals(query) function of the Form ADV Search API. This function allows you to send a search query to the individual adviser lookup endpoint and retrieve all matching filings.

                                The return value of the .get_individuals() function follows the structure outlined in the Individual Adviser Lookup API response, as documented here.

                                In the following example, we illustrate how to list and find the JSON formatted Form ADVs of all advisers working for Morgan Stanley with CRD 149777. Please note that this is just an illustration, and the response will only include 50 ADV filings per request. We are performing a single request with "from": 0 and "size": 50. If you need to fetch all forms, you would need to implement a pagination function.

                                individual_adviser_search_query = {
                                  "query": "CrntEmps.CrntEmp.orgPK:149777",
                                  "from": "0",
                                  "size": "50",
                                  "sort": [{"id": {"order": "desc"}}]
                                }

                                individuals_response = formAdvApi.get_individuals(individual_adviser_search_query)

                                indiviual_advisers = pd.json_normalize(individuals_response['filings'])

                                print('Advisers working for Morgan Stanley')
                                print('-----------------------------------')
                                indiviual_advisers.head()
                                Advisers working for Morgan Stanley
                                -----------------------------------
                                Out[23]:
                                idInfo.lastNmInfo.firstNmInfo.midNmInfo.indvlPKInfo.actvAGRegInfo.linkCrntEmps.CrntEmpExms.ExmEmpHss.EmpHsOthrNms.OthrNmOthrBuss.OthrBus.descDRPs.DRPInfo.sufNm
                                07696734BloomCaitlinE7696734Yhttps://adviserinfo.sec.gov/individual/summary...[{'CrntRgstns': {'CrntRgstn': [{'regAuth': 'CA...[{'exmCd': 'S65', 'exmNm': 'Uniform Investment...[{'fromDt': '02/2023', 'orgNm': 'MORGAN STANLE...NaNNaNNaNNaN
                                17686461KrollScottMartin7686461Yhttps://adviserinfo.sec.gov/individual/summary...[{'CrntRgstns': {'CrntRgstn': [{'regAuth': 'IL...[{'exmCd': 'S66', 'exmNm': 'Uniform Combined S...[{'fromDt': '01/2023', 'orgNm': 'Morgan Stanle...[{'lastNm': 'Kroll', 'firstNm': 'Scott', 'midN...NaNNaNNaN
                                27685226ReyesEddieNaN7685226Yhttps://adviserinfo.sec.gov/individual/summary...[{'CrntRgstns': {'CrntRgstn': [{'regAuth': 'FL...[{'exmCd': 'S66', 'exmNm': 'Uniform Combined S...[{'fromDt': '02/2023', 'orgNm': 'MORGAN STANLE...NaNNaNNaNNaN
                                37684543KimAnnM7684543Yhttps://adviserinfo.sec.gov/individual/summary...[{'CrntRgstns': {'CrntRgstn': [{'regAuth': 'IL...[{'exmCd': 'S66', 'exmNm': 'Uniform Combined S...[{'fromDt': '02/2023', 'orgNm': 'MORGAN STANLE...[{'lastNm': 'Hommer', 'firstNm': 'Ann', 'midNm...*542870 - Rental Properties and Investment P...NaNNaN
                                47682781NelsonRachelTheresa7682781Yhttps://adviserinfo.sec.gov/individual/summary...[{'CrntRgstns': {'CrntRgstn': [{'regAuth': 'AZ...[{'exmCd': 'S66', 'exmNm': 'Uniform Combined S...[{'fromDt': '03/2023', 'orgNm': 'MORGAN STANLE...NaNNaNNaNNaN

                                In the code snippet above, we define the search query to filter advisers based on their current employer's CRD number (CrntEmps.CrntEmp.orgPK). We set the value to "149777", which corresponds to Morgan Stanley. The JSON response is then converted into a pandas dataframe using pd.json_normalize() for further analysis.

                                Find Individual Advisers by CRD

                                The following example demonstrates how to find the Form ADV filing of an adviser by their CRD number.

                                In the code snippet below, we define the search query to filter advisers based on their CRD number (Info.indvlPK). We set the value to "7696734", which corresponds to the specific CRD number of the adviser you are searching for. The response will include the JSON formatted ADV filing associated with that CRD number.

                                search_by_crd_query = {
                                  "query": "Info.indvlPK:7696734",
                                  "from": "0",
                                  "size": "1",
                                  "sort": [{"id": {"order": "desc"}}],
                                }

                                crd_response = formAdvApi.get_individuals(search_by_crd_query)

                                crd_response['filings']
                                Out[24]:
                                [{'Info': {'lastNm': 'Bloom',
                                   'firstNm': 'Caitlin',
                                   'midNm': 'E',
                                   'indvlPK': 7696734,
                                   'actvAGReg': 'Y',
                                   'link': 'https://adviserinfo.sec.gov/individual/summary/7696734'},
                                  'OthrNms': {},
                                  'CrntEmps': {'CrntEmp': [{'CrntRgstns': {'CrntRgstn': [{'regAuth': 'CA',
                                        'regCat': 'RA',
                                        'st': 'APPROVED',
                                        'stDt': '2023-04-10'},
                                       {'regAuth': 'TX',
                                        'regCat': 'RA',
                                        'st': 'APPROVED',
                                        'stDt': '2023-04-28'}]},
                                     'BrnchOfLocs': {'BrnchOfLoc': [{'str1': '15260 Ventura Boulevard',
                                        'str2': 'Suite 1900',
                                        'city': 'Sherman Oaks',
                                        'state': 'CA',
                                        'cntry': 'United States',
                                        'postlCd': '91403'}]},
                                     'orgNm': 'MORGAN STANLEY',
                                     'orgPK': 149777,
                                     'str1': '2000 WESTCHESTER AVENUE',
                                     'city': 'PURCHASE',
                                     'state': 'NY',
                                     'cntry': 'United States',
                                     'postlCd': '10577-2530'}]},
                                  'Exms': {'Exm': [{'exmCd': 'S65',
                                     'exmNm': 'Uniform Investment Adviser Law Examination',
                                     'exmDt': '2022-10-10'},
                                    {'exmCd': 'S63',
                                     'exmNm': 'Uniform Securities Agent State Law Examination',
                                     'exmDt': '2022-09-30'}]},
                                  'Dsgntns': {},
                                  'PrevRgstns': {},
                                  'EmpHss': {'EmpHs': [{'fromDt': '02/2023',
                                     'orgNm': 'MORGAN STANLEY',
                                     'city': 'Sherman Oaks',
                                     'state': 'CA'},
                                    {'fromDt': '12/2020',
                                     'toDt': '02/2023',
                                     'orgNm': 'Mitchell D. Becker MD',
                                     'city': 'Santa Monica',
                                     'state': 'CA'},
                                    {'fromDt': '02/2021',
                                     'toDt': '12/2022',
                                     'orgNm': 'Nomi Health',
                                     'city': 'Orem',
                                     'state': 'UT'},
                                    {'fromDt': '06/2019',
                                     'toDt': '08/2019',
                                     'orgNm': 'DaVita',
                                     'city': 'Denver',
                                     'state': 'CO'},
                                    {'fromDt': '07/2017',
                                     'toDt': '06/2018',
                                     'orgNm': 'Chandler Chicco Agency / Syneos Health',
                                     'city': 'Santa Monica',
                                     'state': 'CA'},
                                    {'fromDt': '07/2013',
                                     'toDt': '06/2017',
                                     'orgNm': 'Edelman',
                                     'city': 'Los Angeles',
                                     'state': 'CA'},
                                    {'fromDt': '08/2018',
                                     'toDt': '06/2019',
                                     'orgNm': 'UCLA Anderson School of Management',
                                     'city': 'Los Angeles',
                                     'state': 'CA'},
                                    {'fromDt': '09/2019',
                                     'toDt': '06/2020',
                                     'orgNm': 'UCLA Anderson School of Management',
                                     'city': 'Los Angeles',
                                     'state': 'CA'},
                                    {'fromDt': '09/2020',
                                     'toDt': '01/2021',
                                     'orgNm': 'Freelance',
                                     'city': 'Los Angeles',
                                     'state': 'CA'},
                                    {'fromDt': '10/2012',
                                     'toDt': '06/2013',
                                     'orgNm': 'Felker Toczek Gellman Suddleson LLP',
                                     'city': 'Los Angeles',
                                     'state': 'CA'}]},
                                  'OthrBuss': {},
                                  'DRPs': {},
                                  'id': 7696734}]

                                Get Brochures from Part 2 of an ADV Filing

                                The following example demonstrates how to retrieve all brochures attached to an ADV filing using the .get_brochures(crd) function. This function accepts the CRD number of the firm as an argument and returns a list of all brochures filed by the adviser.

                                The structure of the return value adheres to the response of the Brochures API as documented here.

                                response = formAdvApi.get_brochures(149777)

                                response['brochures']
                                Out[25]:
                                [{'versionId': 844803,
                                  'name': 'SELECT UMA PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-04-14',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=844803'},
                                 {'versionId': 836480,
                                  'name': 'PORTFOLIO MANAGEMENT AND INSTITUTIONAL CASH ADVISORY PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836480'},
                                 {'versionId': 836481,
                                  'name': 'ALTERNATIVE INVESTMENTS WRAP PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836481'},
                                 {'versionId': 836482,
                                  'name': 'OUTSOURCED CHIEF INVESTMENT OFFICE (OCIO)',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836482'},
                                 {'versionId': 836483,
                                  'name': 'FINANCIAL PLANNING SERVICES PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836483'},
                                 {'versionId': 836484,
                                  'name': 'GLOBAL INVESTMENT SOLUTIONS PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836484'},
                                 {'versionId': 836492,
                                  'name': 'MORGAN STANLEY CORE PORTFOLIOS',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836492'},
                                 {'versionId': 836486,
                                  'name': 'GRAYSTONE CONSULTING PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836486'},
                                 {'versionId': 836487,
                                  'name': 'SEPARATE MANAGED ACCOUNT WRAP PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836487'},
                                 {'versionId': 836488,
                                  'name': 'INSTITUTIONAL SERVICES PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836488'},
                                 {'versionId': 836489,
                                  'name': 'SEPARATE MANAGED ACCOUNT COMMISSION-BASED PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836489'},
                                 {'versionId': 836491,
                                  'name': 'ACCESS INVESTING PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836491'},
                                 {'versionId': 836479,
                                  'name': 'CONSULTING GROUP ADVISOR PROGRAM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836479'},
                                 {'versionId': 836485,
                                  'name': 'PRIVATE WEALTH MANAGEMENT FIRM BROCHURE',
                                  'dateSubmitted': '2023-03-30',
                                  'url': 'https://files.adviserinfo.sec.gov/IAPD/Content/Common/crd_iapd_Brochure.aspx?BRCHR_VRSN_ID=836485'}]

                                Access Private Funds Data in Schedule D

                                Investment advisers publish information about their private fund clients in Item 7.B.1 of Schedule D in Form ADV filings.

                                The following examples explore how to utilize the Private Funds API to access all data points disclosed in Item 7.B.1:

                                • Information about the private fund
                                • Ownership
                                • Advisory services
                                • Private offering
                                • Auditors
                                • Prime brokers
                                • Custodians
                                • Administrators
                                • Marketers

                                Let's start with a simple example and list all information of private funds advised by Goldman Sachs with CRD 107738.

                                import pandas as pd
                                import requests
                                import time

                                def get_private_funds(crd):
                                  url = f"https://api.sec-api.io/form-adv/schedule-d-7-b-1/{crd}?token={API_KEY}"
                                  response_json = {}

                                  for x in range(3):
                                    response = requests.get(url)
                                    if response.status_code == 200:
                                      response_json = response.json()
                                    elif response.status_code == 429:
                                      time.sleep(0.5 * (x + 1))
                                    else:
                                      raise Exception("API error: {} - {}".format(response.status_code, response.text))
                                  
                                  if isinstance(response_json, list):
                                    funds = pd.json_normalize(response_json)
                                    return funds
                                  return []
                                gs_private_funds = get_private_funds('107738')

                                print('Private fund clients of Goldman Sachs (CRD 107738)')
                                print('--------------------------------------------------')
                                print('Number of funds:', len(gs_private_funds))
                                gs_private_funds
                                Private fund clients of Goldman Sachs (CRD 107738)
                                --------------------------------------------------
                                Number of funds: 677
                                Out[27]:
                                1a-nameOfFund1b-fundIdentificationNumber3a-namesOfGeneralPartnerManagerTrusteeDirector3b-filingAdvisers4-1-exclusionUnder3c14-2-exclusionUnder3c75-nameCountryOfForeignFinancialRegAuthority6a-isMasterFundInMasterFeederArrangement6b-nameIdOfFeederFunds6c-isFeederFundInMasterFeederAgreement...25b-g-custodians26a-fundUsesAdministrators26b-f-administrators27-percentageOfAssetsValuedNotByRelatedPerson28a-fundUsesMarketers28b-g-marketers2-lawOrganizedUnder.state2-lawOrganizedUnder.country10-typeOfFund.selectedTypes10-typeOfFund.otherFundType
                                08VC OPPORTUNITIES ACCESS LLC805-2131830807[8VC OPPORTUNITIES ACCESS ADVISORS LLC]No Information FiledFalseTrue[]False[]False...[{'25b-legalName': 'STATE STREET BANK AND TRUS...True[{'26b-name': 'STATE STREET BANK AND TRUST COM...100True[{'28b-isRelatedPerson': True, '28c-name': 'GO...DelawareUnited States[other private fund]FUND OF PRIVATE EQUITY FUNDS
                                18VC OPPORTUNITIES ACCESS OFFSHORE HOLDINGS LP805-7612837154[8VC OPPORTUNITIES ACCESS ADVISORS LLC]No Information FiledFalseTrue[Cayman Islands - Cayman Islands Monetary Auth...True[{'name': '8VC OPPORTUNITIES ACCESS OFFSHORE L...False...[{'25b-legalName': 'STATE STREET BANK AND TRUS...True[{'26b-name': 'STATE STREET BANK AND TRUST COM...100True[{'28b-isRelatedPerson': True, '28c-name': 'GO...Cayman Islands[other private fund]FUND OF PRIVATE EQUITY FUNDS
                                28VC OPPORTUNITIES ACCESS OFFSHORE LP805-4369838486[8VC OPPORTUNITIES ACCESS ADVISORS LLC]No Information FiledFalseTrue[Cayman Islands - Cayman Islands Monetary Auth...False[]True...[{'25b-legalName': 'STATE STREET BANK AND TRUS...True[{'26b-name': 'STATE STREET BANK AND TRUST COM...100True[{'28b-isRelatedPerson': True, '28c-name': 'GO...Cayman Islands[other private fund]FUND OF PRIVATE EQUITY FUNDS
                                3AC VREP OFFSHORE LP805-2107060269[AC RES ADVISORS, L.L.C.]No Information FiledFalseTrue[Cayman Islands - Cayman Islands Monetary Auth...False[]False...[{'25b-legalName': 'STATE STREET BANK & TRUST ...True[{'26b-name': 'STATE STREET BANK AND TRUST COM...98True[{'28b-isRelatedPerson': True, '28c-name': 'GO...Cayman Islands[private equity fund]NaN
                                4AEA INVESTORS VIII ACCESS LLC805-1469991967[AEA INVESTORS VIII ACCESS ADVISORS LLC]No Information FiledFalseTrue[]False[]False...[{'25b-legalName': 'STATE STREET BANK & TRUST ...True[{'26b-name': 'STATE STREET BANK AND TRUST COM...100True[{'28b-isRelatedPerson': True, '28c-name': 'GO...DelawareUnited States[other private fund]FUND OF PRIVATE EQUITY FUNDS
                                ..................................................................
                                672ZALICO VARIABLE SERIES I CORE FIXED INCOME805-1816229353[ZURICH AMERICAN LIFE INSURANCE COMPANY]No Information FiledFalseTrue[]False[]False...[{'25b-legalName': 'BNY MELLON', '25c-business...True[{'26b-name': 'BENEFIT FINANCE PARTNERS', '26c...100False[]IllinoisUnited States[other private fund]MANAGED SEPARATE ACCOUNT OF A LIFE INSURANCE C...
                                673ZALICO VARIABLE SERIES I MORTGAGE BACKED SECUR...805-8234185769[ZURICH AMERICAN LIFE INSURANCE COMPANY]No Information FiledFalseTrue[]False[]False...[{'25b-legalName': 'BNY MELLON', '25c-business...True[{'26b-name': 'BENEFIT FINANCE PARTNERS', '26c...100False[]IllinoisUnited States[other private fund]MANAGED SEPARATE ACCOUNT OF A LIFE INSURANCE C...
                                674ZALICO VL SERIES ACCOUNT 1 DIVERSIFIED FIXED I...805-1431062510[]No Information FiledFalseTrue[]False[]False...[{'25b-legalName': 'BNY MELLON', '25c-business...True[{'26b-name': 'BENEFIT FINANCE PARTNERS', '26c...100False[]IllinoisUnited States[other private fund]MANAGED SEPARATE ACCOUNT OF A LIFE INSURANCE C...
                                675ZALICO VL SERIES ACCOUNT - 2 MORTGAGE BACKED S...805-3454739900[ZURICH AMERICAN LIFE INSURANCE COMPANY]No Information FiledFalseTrue[]False[]False...[{'25b-legalName': 'BNY MELLON', '25c-business...True[{'26b-name': 'BENEFIT FINANCE PARTNERS', '26c...1False[]IllinoisUnited States[other private fund]MANAGED SEPARATE ACCOUNT OF A LIFE INSURANCE C...
                                676ZC RESOURCE INVESTMENT TRUST MORTGAGE BACKED S...805-2961545268[ZC RESOURCE INVESTMENT TRUST]No Information FiledFalseTrue[]False[]False...[{'25b-legalName': 'STATE STREET', '25c-busine...True[{'26b-name': 'BENEFIT FINANCE PARTNERS', '26c...100False[]DelawareUnited States[other private fund]MANAGED SEPARATE ACCOUNT OF A LIFE INSURANCE C...

                                677 rows × 48 columns

                                List CRDs of Advisers disclosing Private Funds Data

                                To filter and identify advisers who disclose private funds data in their Form ADV filings, we can utilize the search query functionality of the Form ADV API. By querying the answer to Item 7.B, "Are you an adviser to any private fund?", we can identify advisers who answered "Yes" to this question.

                                The search syntax for filtering advisers who answered "Yes" to Item 7.B is as follows:

                                FormInfo.Part1A.Item7B.Q7B:Y

                                By applying this query, we can retrieve a list of advisers who advise private funds and disclose relevant data in Schedule D, Item 7.B of their Form ADV filings. It's important to note that this query would yield a large number of advisers, potentially more than 10,000.

                                To narrow down the search and focus on advisers with $5 billion or more in assets under management (AUM), we can combine the query with an additional search parameter:

                                FormInfo.Part1A.Item7B.Q7B:Y AND FormInfo.Part1A.Item5F.Q5F2C:[5000000000 TO *]

                                This combined query filters for advisers who disclose private funds data (Item 7.B, Q7B) and have assets under management of $5 billion or more (Item 5.F, Q5F2C). By adding this criterion, we can refine the search universe and target advisers who meet both criteria.

                                private_funds_query = {
                                  "query": "FormInfo.Part1A.Item7B.Q7B:Y AND FormInfo.Part1A.Item5F.Q5F2C:[5000000000 TO *]",
                                  "sort": [{ "Info.FirmCrdNb": { "order": "desc" }}]
                                }

                                form_advs_with_private_funds = get_filings(private_funds_query)
                                print('Advisers with $5bn+ AUM that advise private funds:', len(form_advs_with_private_funds))
                                Advisers with $5bn+ AUM that advise private funds: 1216
                                crds = list(form_advs_with_private_funds['Info.FirmCrdNb'])

                                print('CRDs of advisers advising private funds')
                                print('---------------------------------------')
                                crds[:10]
                                CRDs of advisers advising private funds
                                ---------------------------------------
                                Out[30]:
                                [325281,
                                 324457,
                                 324015,
                                 323617,
                                 322923,
                                 322260,
                                 321999,
                                 321116,
                                 317952,
                                 317825]

                                List Prime Brokers of Private Funds

                                To extract information about prime brokers of private funds, we can utilize the Private Funds endpoint of the Form ADV API. The example below demonstrates how to retrieve and format the prime broker data of private funds advised by Goldman Sachs (CRD 107738).

                                gs_private_funds = get_private_funds('107738')

                                prime_brokers = pd.json_normalize(list(gs_private_funds['24b-e-primeBrokers'].explode()))
                                prime_brokers = prime_brokers.dropna() \
                                                             .drop_duplicates() \
                                                             .sort_values('24b-name') \
                                                             .reset_index(drop=True)


                                print('Prime brokers of private funds advised by Goldman Sachs (CRD 107738)')
                                print('--------------------------------------------------------------------')
                                print('Number of prime brokers:', len(prime_brokers))
                                prime_brokers
                                Prime brokers of private funds advised by Goldman Sachs (CRD 107738)
                                --------------------------------------------------------------------
                                Number of prime brokers: 6
                                Out[31]:
                                24b-name24c-1-secRegistrationNumber24c-2-crdNumber24e-actsAsCustodian24d-location.city24d-location.state24d-location.country
                                0ABN AMRO SECURITIES (USA) LLC8 - 68398151796TrueNEW YORKNew YorkUnited States
                                1BNP PARIBAS-TruePARISFrance
                                2CITIGROUP GLOBAL MARKETS INC.8 - 81777059TrueNEW YORKNew YorkUnited States
                                3CREDIT SUISSE SECURITIES (USA) LLC8 - 422816TrueNEW YORKNew YorkUnited States
                                4MORGAN STANLEY-TrueNEW YORKNew YorkUnited States
                                5MORGAN STANLEY & CO. LLC8 - 158698209TrueNEW YORKNew YorkUnited States

                                In this example, the function get_private_funds('107738') retrieves the private fund data for Goldman Sachs using their CRD number (107738). The resulting data includes information about prime brokers of the private funds.

                                The pd.json_normalize() function is used to flatten the nested JSON data structure, specifically the 24b-e-primeBrokers field. This field contains the prime broker information for each private fund. The resulting dataframe, prime_brokers, is then processed to remove any missing values, eliminate duplicates, sort the data by the prime broker name, and reset the index.

                                Please note that the actual number of prime brokers and the specific information displayed may vary based on the data available for the private funds advised by Goldman Sachs.

                                List Custodians of Private Funds

                                For each private fund, we can extract and create a list of custodians with information such as the custodian's name, SEC registration number, CRD, LEI, and location details. Here is an example of how to achieve this:

                                custodians = pd.json_normalize(list(gs_private_funds['25b-g-custodians'].explode()))
                                custodians = custodians.dropna() \
                                                       .drop_duplicates(subset=['25g-legalEntityIdentifier']) \
                                                       .sort_values('25b-legalName') \
                                                       .reset_index(drop=True)


                                print('Custodians of private funds advised by Goldman Sachs (CRD 107738)')
                                print('-----------------------------------------------------------------')
                                print('Number of custodians:', len(custodians))
                                custodians
                                Custodians of private funds advised by Goldman Sachs (CRD 107738)
                                -----------------------------------------------------------------
                                Number of custodians: 14
                                Out[32]:
                                25b-legalName25c-businessName25e-isRelatedPerson25f-1-secRegistrationNumber25f-2-crdNumber25g-legalEntityIdentifier25d-location.city25d-location.state25d-location.country
                                0ABN AMRO BANK N.VABN AMRO BANK N.VFalse-GUSTAV MAHLERLAANNetherlands
                                1BANK OF NEW YORK MELLONBANK OF NEW YORK MELLONFalse-HPFHU0OQ28E4N0NFVK49NEW YORKNew YorkUnited States
                                2BNY MELLONBNY MELLONFalse-WFLLPEPC7FZXENRZV188NEW YORKNew YorkUnited States
                                3BROWN BROTHERS HARRIMAN & CO.BROWN BROTHERS HARRIMAN & CO.False-5493006KMX1VFTPYPW14BOSTONMassachusettsUnited States
                                4CITIBANK, N.A.CITIBANK, N.A.False-E57ODZWZ7FF32TWEFA76NEW YORKNew YorkUnited States
                                5CREDIT SUISSE SECURITIES (USA) LLCCREDIT SUISSE SECURITIES (USA) LLCFalse8 - 4228161V8Y6QCX6YMJ2OELII46NEW YORKNew YorkUnited States
                                6GOLDMAN SACHS & CO. LLCGOLDMAN SACHS & CO. LLCTrue-FOR8UP27PHTHYVLBNG30NEW YORKNew YorkUnited States
                                7GOLDMAN SACHS BANK ZURICHGOLDMAN SACHS BANK ZURICHTrue-S81F8KH474EY7PUWI149ZURICHSwitzerland
                                8GOLDMAN SACHS INTERNATIONALGOLDMAN SACHS INTERNATIONALTrue-W22LROWP2IHZNBB6K528LONDONUnited Kingdom
                                9JP MORGAN CHASE BANK, NATIONAL ASSOCIATIONJP MORGAN CHASE BANK, NATIONAL ASSOCIATIONFalse-7H6GLXDRUGQFU57RNE97NEW YORKNew YorkUnited States
                                10STATE STREET BANK AND TRUST COMPANYSTATE STREET BANK AND TRUST COMPANYFalse-571474TGEMMWANRLN572BOSTONMassachusettsUnited States
                                11STATE STREET BANK INTERNATIONAL GMBH (LUXEMBOU...STATE STREET BANK INTERNATIONAL GMBH (LUXEMBOU...False-549300NTJWXBTICDZY51LUXEMBOURGLuxembourg
                                12U.S. BANKU.S. BANKFalse-6BYL5QZYBDK8S7L73M02CINCINNATIOhioUnited States
                                13WELLS FARGO N/AWELLS FARGO N/AFalse-KB1H1DSPRFMYMCUFXT09PHOENIXArizonaUnited States

                                Access Schedule D (Private Funds) from Thousands of Advisers

                                Accessing and parsing private funds data at scale can be challenging, especially when dealing with large volumes of data that can quickly exceed multiple gigabytes. In this section, we will explore a solution to speed up the process by leveraging parallel processing to download and access private funds data more efficiently.

                                As an example application, we will create a list of the top 10 most used prime brokers by private funds advised by firms with assets under management (AUM) of $5 billion or more. This will give us insights into the prime brokers used by more than 10,000 private funds.

                                private_funds_query = {
                                  "query": "FormInfo.Part1A.Item7B.Q7B:Y AND FormInfo.Part1A.Item5F.Q5F2C:[5000000000 TO *]",
                                  "sort": [{ "Info.FirmCrdNb": { "order": "desc" }}]
                                }

                                form_advs_with_private_funds = get_filings(private_funds_query)
                                def private_funds_to_prime_stats(private_funds):
                                  has_no_primes = (private_funds['24a-fundUsesPrimeBrokers'] == False).all()
                                  if has_no_primes:
                                    return None

                                  prime_brokers = pd.json_normalize(list(private_funds['24b-e-primeBrokers'].explode()))

                                  prime_brokers['clients'] = 0

                                  broker_stats = prime_brokers.groupby(['24b-name', '24c-2-crdNumber', '24c-1-secRegistrationNumber']) \
                                                              .count() \
                                                              .reset_index()[['24b-name',
                                                                              '24c-2-crdNumber',
                                                                              '24c-1-secRegistrationNumber',
                                                                              'clients']]
                                  
                                  broker_stats = broker_stats.rename(columns={'24b-name': 'name',
                                                                              '24c-2-crdNumber': 'crd',
                                                                              '24c-1-secRegistrationNumber': 'secRegNumber',
                                                                              })
                                  return broker_stats


                                gs_private_funds = get_private_funds('107738')

                                private_funds_to_prime_stats(gs_private_funds)
                                Out[34]:
                                namecrdsecRegNumberclients
                                0ABN AMRO SECURITIES (USA) LLC1517968 - 683981
                                1BNP PARIBAS-1
                                2CITIGROUP GLOBAL MARKETS INC.70598 - 81773
                                3CREDIT SUISSE SECURITIES (USA) LLC8168 - 4223
                                4MORGAN STANLEY-1
                                5MORGAN STANLEY & CO. LLC82098 - 158692
                                def process_crd(crd):
                                  private_funds = get_private_funds(crd)

                                  if len(private_funds) == 0:
                                    stats_per_firm = None
                                  else:
                                    try:
                                      stats_per_firm = private_funds_to_prime_stats(private_funds)
                                    except Exception as e:
                                      stats_per_firm = None
                                      print(f'{crd} - error: {str(e)}')

                                  return stats_per_firm
                                !pip install -q pandarallel
                                from pandarallel import pandarallel

                                number_of_workers = 5
                                pandarallel.initialize(progress_bar=True, nb_workers=number_of_workers, verbose=0)

                                primes_stats_list = list(form_advs_with_private_funds[:]['Info.FirmCrdNb'].parallel_apply(process_crd))
                                primes_stats = pd.concat([pd.DataFrame(d) for d in primes_stats_list if d is not None])
                                VBox(children=(HBox(children=(IntProgress(value=0, description='0.00%', max=244), Label(value='0 / 244'))), HB…
                                sum_clients = primes_stats.groupby(['name'])['clients'] \
                                                          .sum() \
                                                          .reset_index() \
                                                          .sort_values('clients', ascending=False) \
                                                          .reset_index(drop=True)

                                print('Top 10 Most Used Prime Brokers')
                                print('------------------------------')
                                print('Number of prime brokers:', len(sum_clients))
                                sum_clients.head(10)
                                Top 10 Most Used Prime Brokers
                                ------------------------------
                                Number of prime brokers: 354
                                Out[38]:
                                nameclients
                                0GOLDMAN SACHS & CO. LLC1002
                                1J.P. MORGAN SECURITIES LLC866
                                2MORGAN STANLEY & CO. LLC678
                                3BARCLAYS CAPITAL INC.354
                                4CITIGROUP GLOBAL MARKETS INC.352
                                5MERRILL LYNCH PROFESSIONAL CLEARING CORP.309
                                6J.P. MORGAN CLEARING CORP.225
                                7UBS SECURITIES LLC181
                                8BNP PARIBAS SECURITIES CORP.160
                                9CREDIT SUISSE SECURITIES (USA) LLC160

                                Please note that advisers may not consistently adhere to a standard naming convention for the legal names of prime brokers, and there may be variations in how they provide information such as the LEI. Additionally, it is possible that advisers may misspell the name of a prime broker or use a slightly different variation of the name. As a result, when working with prime broker data, it is important to account for potential inconsistencies and variations in the data provided.

                                Map CRD to LEI and LEI to CRD

                                This section illustrates the process of mapping a CRD (Central Registration Depository) number to a legal entity identifier (LEI), as well as the reverse mapping from LEI to CRD. This mapping is based on the information disclosed in Item 1.P of Form ADV filings.

                                Map CRD to LEI

                                Example: CRD 107738 of Goldman Sachs.

                                crd_query = {
                                  "query": "Info.FirmCrdNb:107738",
                                  "from": "0",
                                  "size": "1"
                                }

                                response = formAdvApi.get_firms(crd_query)

                                filings = pd.json_normalize(response['filings'])

                                lei = filings['FormInfo.Part1A.Item1.Q1P'][0]
                                print('LEI of CRD 107738:', lei)
                                LEI of CRD 107738: CF5M58QA35CFPUX70H17

                                Map LEI to CRD

                                Example: LEI 5493006YBH9Z1VHYNT79 of Morgan Stanley.

                                lei_query = {
                                  "query": "FormInfo.Part1A.Item1.Q1P:5493006YBH9Z1VHYNT79",
                                  "from": "0",
                                  "size": "1"
                                }

                                response = formAdvApi.get_firms(lei_query)

                                filings = pd.json_normalize(response['filings'])

                                crd = filings['Info.FirmCrdNb'][0]
                                print('CRD of LEI 5493006YBH9Z1VHYNT79:', crd)
                                CRD of LEI 5493006YBH9Z1VHYNT79: 134366

                                Footer

                                Products

                                • EDGAR Filing Search API
                                • Full-Text Search API
                                • Real-Time Filing Stream API
                                • Filing Download & PDF Generator API
                                • XBRL-to-JSON Converter
                                • 10-K/10-Q/8-K Item Extractor
                                • Investment Adviser & Form ADV API
                                • Insider Trading Data - Form 3, 4, 5
                                • Restricted Sales Notifications - Form 144
                                • Institutional Holdings - Form 13F
                                • Form N-PORT API - Investment Company Holdings
                                • Form N-CEN API - Annual Reports by Investment Companies
                                • Form N-PX API - Proxy Voting Records
                                • Form 13D/13G API
                                • Form S-1/424B4 - IPOs, Debt & Rights Offerings
                                • Form C - Crowdfunding Offerings
                                • Form D - Private Placements & Exempt Offerings
                                • Regulation A Offering Statements API
                                • Changes in Auditors & Accountants
                                • Non-Reliance on Prior Financial Statements
                                • Executive Compensation Data API
                                • Directors & Board Members Data
                                • Company Subsidiaries Database
                                • Outstanding Shares & Public Float
                                • SEC Enforcement Actions
                                • Accounting & Auditing Enforcement Releases (AAERs)
                                • SRO Filings
                                • CIK, CUSIP, Ticker Mapping

                                General

                                • Pricing
                                • Features
                                • Supported Filings
                                • EDGAR Filing Statistics

                                Account

                                • Sign Up - Start Free Trial
                                • Log In
                                • Forgot Password

                                Developers

                                • API Sandbox
                                • Documentation
                                • Resources & Tutorials
                                • Python API SDK
                                • Node.js API SDK

                                Legal

                                • Terms of Service
                                • Privacy Policy

                                Legal

                                • Terms of Service
                                • Privacy Policy

                                SEC API

                                © 2025 sec-api.io by Data2Value GmbH. All rights reserved.

                                SEC® and EDGAR® are registered trademarks of the U.S. Securities and Exchange Commission (SEC).

                                EDGAR is the Electronic Data Gathering, Analysis, and Retrieval system operated by the SEC.

                                sec-api.io and Data2Value GmbH are independent of, and not affiliated with, sponsored by, or endorsed by the U.S. Securities and Exchange Commission.

                                sec-api.io is classified under SIC code 7375 (Information Retrieval Services), providing on-demand access to structured data and online information services.