sec-api.ioSEC API by D2V
Core APIs
Find & Track
EDGAR Filing Query APIFull-Text Search APIReal-Time Stream APIDaily Filing Ingestion Log
File Access
Download Filings & ExhibitsPDF GeneratorBulk Datasets
Extraction & Conversion
XBRL-to-JSON ConverterFinancial Statements + MoreFinancial StatementsFiling Section Extractor
Reference
EDGAR Entities DatabaseCIK / CUSIP / Ticker Mapping
AI Agents
Claude, ChatGPT & 50+ agents
MCP ServerFinancial Analysis Prompt LibraryEquity Research & Market Insights
Ownership & Corp. Events
Ownership & Insiders
Insider TradingForm 3/4/5Institutional HoldingsForm 13F5% Beneficial Owners13D / 13GInsider Sale NoticesForm 144
Event-Driven Disclosures
Auditor Changes8-K - 4.01Non-Reliance / Restatements8-K - 4.02Exec & Director Changes8-K - 5.02
Company Profile Data
Governance
Executive CompensationDirectors & Board Members
Capital Structure
Outstanding Shares & FloatSubsidiaries
Audit
Audit ReportsAudit Fees
Funds & Advisers
Registered Funds
Fund Portfolio Holdings and PerformanceForm N-PORTAnnual ReportsForm N-CENProxy Voting RecordsForm N-PX
Investment Advisers
Adviser RegistrationsForm ADV, Schedules, Brochures
Broker-Dealers
FOCUS ReportsForm X-17A-5
Offerings & Capital
Public Offerings
IPOs & SecondariesS-1 / F-1 / 424B4
Exempt Offerings
Private PlacementsForm DCrowdfundingForm CMini-IPOsReg A+
Enforcement & Regulatory
SEC Enforcement ActionsSEC Litigation ReleasesSEC Administrative ProceedingsAAER DatabaseSRO Filings & Rule MakingFINRA, Exchanges, Clearing Agencies
For developers
QuickstartAPI ReferencePython SDK ↗TypeScript SDK ↗Cookbook ↗
Browse all APIs →Browse all datasets →Full API docs →API reference →
Annual & Quarterly Reports
Annual reports10-KQuarterly reports10-QForeign annual20-FCanadian annual40-F
Material Events & Disclosures
Current reports8-KForeign current6-KReg A events1-UEarnings results8-K, Item 2.02Press releases + Reg FDEx 99Material contractsEx 10Insider trade policiesEx 19
Proxy & Shareholder Voting
Proxy statementsDEF 14APreliminaryPRE 14AAdditionalDEFA14ANon-management solicitingDFAN14AMerger proxy statementsDEFM14ADefinitive infoDEF 14CPreliminary infoPRE 14CAnnual report to SHARS
Corporate Insiders (§16)
Initial ownershipForm 3Insider TradingForm 4Annual deferredForm 5Restricted salesForm 144
Institutional Holdings
Portfolio holdings13F-HRCover pages13F-HR
Beneficial Ownership (5%+)
Active / activist13DPassive / institutional13G
Broker-Dealers & Market Infrastructure
BD annual reportsX-17A-5Transfer agent regTA-1Transfer agent rptTA-2Municipal advisorsMAAlt trading systemsATS-NRating agenciesNRSRO-CESwap dealersSBSE
SEC Administrative
Comment lettersCorresp / LetterEffectivenessEFFECTConfidential treatment ordersCT ORDER
Fund Registration & Holdings
Mutual funds & ETFsN-1AClosed-end & BDCsN-2Portfolio holdingsN-PORTMoney market fund portfolio reportsN-MFPSeparate accountN-3Variable annuityN-4Variable life insuranceN-6Fund mergersN-14
Business Development Cos
BDC electionN-54ABDC registrationN-2BDC auto shelfN-2ASR
Fund Reports
Annual censusN-CENShareholder reportsN-CSRSemi-annual shareholder reportsN-CSRSMoney market eventsN-CRProxy votingN-PXVariable productsN-VP
Fund Prospectuses & Supplements
Fund prospectus497Summary prospectus497KVariable initial summary497VPIVariable updating summary497VPUPost-effective (delayed)485APOSPost-effective (immediate)485BPOS
Fund Operations
Securities sold24F-2NTRepurchase offersN-23CDeregistrationN-8FExemptive apps40-APP
Public Offerings — Domestic
IPOs & registrationS-1Shelf registrationsS-3Business combinationsS-4Employee plansS-8REITsS-11
Public Offerings — Foreign
Foreign registrationF-1Foreign shelfF-3Foreign combinationsF-4ADRsF-6Rights offeringF-7Business combinationF-8MJDS registrationF-10MJDS exchange/tenderF-80
Prospectuses (424 series)
Structured products424B2Prospectus supplements424B3Final IPO424B4Shelf supplements424B5Free writingFWPM&A communications425
Exempt Offerings
Reg D privateForm DReg A offerings1-AReg A annual1-KReg A semi-annual1-SACrowdfundingForm CFunding portalsCFPORTAL
Asset-Backed Securities
Standard ABS registrationSF-1Shelf ABS registrationSF-3Distribution reports10-DAsset-level dataABS-EEReps & warrantiesABS-15G
Tender Offers & Going Private
Pre-commencement commsSC TO-CThird-partySC TO-TIssuer self-tenderSC TO-ITarget responseSC 14D9Going privateSC 13E3Cross-border transactionsCB
Confidential Submissions
Draft registrationsDRSDraft Reg ADOS
Browse all 400+ datasets →Datasets catalog →
PricingPlaygroundDocs
Setup
Python SDK ↗TypeScript SDK ↗Lucene Query Syntax
Fetch & download
Download SEC Filings From EDGARDownload Filings As PDFsDownload XML From EDGARDownload 10-Ks (Russell 3000)Financial Statements As ExcelExport Filing Metadata To CSVList Fiscal Period End Dates
Reference
Map Ticker → CIK & CUSIPMap CIK → Ticker & CUSIPMap CUSIP → Ticker & CIKList Companies By ExchangeList Companies By Sector & Industry
AI / LLM
Summarize SEC Filings With GPT ↗Analyze SEC Comment Letters
Section & text extraction
Extract 10-K SectionsExtract 10-Q SectionsExtract 8-K SectionsExtract 10-K (Multi-Year)Clean Extracted SectionsExtract 10-K Textual DataExtract Google Revenue (10-K)
Financial data
Extract Financial StatementsXBRL-to-JSON ConverterDownload XBRL XSD Files
Exhibits & attachments
Download 8-K Exhibit 99Download 8-K Press ReleasesDownload Material Contracts (Ex-10)
Governance & compensation
Exec Comp By TickerExec Comp Multi-Company CompareExport Exec Comp To ExcelDirectors & Board MembersAudit FeesSubsidiariesOutstanding Shares & Float
Market events & disclosures
8-K Material Event ActivityStock Reactions To 8-K 4.028-K Item 4.01Accountant Changes8-K Item 5.02Exec Changes
Ownership & fund analysis
Insider Trading AnalysisInsider Trading Analysis - Extended ↗13F Alpha, Volatility & Survival13F Portfolio Holdings & Cover PagesN-PORT Swap CounterpartiesN-PORT ETF ConstituentsForm 13D / 13G API ExamplesForm 144 Insider Sales
Investment advisers (Form ADV)
Recently Updated Form ADVsFind By Advisory ActivityFind By Business ActivityFind By Compensation ModelSort By Assets Under ManagementSort By Number Of AccountsFind Individual Advisers By CRD
Offerings analysis
Top 20 Largest Offerings / YrMost-Used Law Firms (S-1)424B4 Prospectuses By YearForm C CrowdfundingForm D Private PlacementsReg A+ Offerings
Quant & research
Fed Funds Rate ProjectionsFama-French Factor ModelStatistical SignificanceHalloween Effect ExplainedEDGAR Filing Trends 1994-2022EDGAR Filer Analysis
Enforcement research
SEC Litigation ReleasesSEC Administrative ProceedingsAAERs
More
Real-Time StreamFull-Text SearchForm N-CENForm N-PX Proxy VotingAll Per-API Examples →
Regulatory explainers
EDGAR Filings & ExhibitsIntro to SEC LawFiling Entities & Disclosure RequirementsForm Types Supporting XBRL8-K Item 4.01 Content Requirements
Browse All Tutorials →Cookbook on GitHub ↗
API Documentation
Introduction

AI Assistants

MCP Server

Filing Search and Retrieval

Filing Search
Full-Text Search
EDGAR Ingestion Log
Real-Time Filing Stream
Filing Download
PDF Generator
XBRL to JSON
Section Extractor
Bulk Datasets

Investment Advisers

Firm and Individual AdvisorsADV

Ownership and Holdings

Insider Transactions and Holdings3 / 4 / 5
Restricted Securities Sales144
Institutional Portfolio Holdings13F
Overview
Example: Python
API Reference
Beneficial Ownership Above 5%13D / 13G
Insider & 5% Holder OwnershipDEF 14A
Fund Portfolio Holdings and PerformanceN-PORT

Investment Companies

Fund Annual Census ReportsN-CEN
Proxy Voting and Voting RecordsN-PX
Fund Governance & Fees
Fund Reorganizations

Offerings and Capital Raises

Registrations and ProspectusesS-1 / 424B4
Crowdfunding OfferingsForm C
Exempt Private OfferingsForm D
Reg A Offerings1-A / 1-K / 1-Z

Material Events

Entry into Material Agreements8-K 1.01
Agreement Terminations8-K 1.02
Bankruptcy and Receivership8-K 1.03
Cybersecurity Incidents8-K 1.05
Auditor Changes8-K 4.01
Financial Restatements8-K 4.02
Director and Officer Changes8-K 5.02
Shareholder Voting Results8-K 5.07

Executive and Director Pay

Executive Compensation
Director Compensation
Pay Versus Performance
Executive Compensation Governance
Severance & Change in Control

Board and Corporate Governance

Directors and Board Members
Board Oversight
Shareholder Rights & Defenses
Related Party Transactions
ESG & Risk Oversight
Compliance Signals

Shareholder Meetings and Votes

Ballot Items & Vote Standards
Shareholder Meetings Calendar
Shareholder Proposals and Proxy Contests
M&A & Strategic Transactions

Audit and Company Data

Audit Reports
Audit Fees
Subsidiaries
Shares Outstanding and Float
Equity Plans & Dilution

Broker-Dealers

FOCUS ReportsX-17A-5

SEC Enforcement and Rulemaking

Enforcement Actions
Litigation Releases
Administrative Proceedings
AAERs
SRO Filings

Identifiers and Entities

CIK, CUSIP and Ticker Mapping
EDGAR Entities

Financial Statements
  1. Home
  2. Documentation
  3. Institutional Portfolio Holdings
  4. Example: Python
View as MarkdownOpen this page as plain Markdown
Open in ChatGPTAsk questions about this pageOpen in ClaudeAsk questions about this pageOpen in CursorAsk questions about this page

Access Portfolio Holdings & Cover Pages of Form 13F Filings with Python

Open In Colab   View on GitHub

On this page:
  • Quick Start
    • Holdings from Form 13F Filings
      • Cover Pages from Form 13F Filings

      This Python tutorial demonstrates how to access and download the holdings and cover pages of Form 13F filings using the sec-api Python package and the Form 13F APIs. The number of unique holdings of a fund is calculated as well as the total portfolio value. The cover page of the corresponding Form 13F filing is also downloaded, allowing for confirmation of the fund's name, address, other managers, and more.

      Quick Start

      !pip install sec-api
      import json
      import pandas as pd

      API_KEY_SEC_API = "YOUR_API_KEY"
      from sec_api import Form13FHoldingsApi, Form13FCoverPagesApi

      form13FHoldingsApi = Form13FHoldingsApi(API_KEY_SEC_API)
      form13FCoverPagesApi = Form13FCoverPagesApi(API_KEY_SEC_API)

      search_params = {
          "query": "cik:1350694 AND periodOfReport:2024-03-31",
          "from": "0",
          "size": "1",
          "sort": [{"periodOfReport": {"order": "desc"}}],
      }

      # load holdings
      response = form13FHoldingsApi.get_data(search_params)
      filings = response["data"]
      holdings = filings[0]["holdings"]

      # load cover page
      response = form13FCoverPagesApi.get_data(search_params)
      cover_page = response["data"][0]

      Holdings from Form 13F Filings

      The following example demonstrates how to retrieve a fund's holdings from Form 13F filings. The get_data(search_params) method of the Form13FHoldingsApi class extracts holdings from Form 13F filings that match the specified search criteria. In this example, we obtain the portfolio holdings of Bridgewater Associates (CIK: 1350694) as reported in their 13F filing for the first quarter of 2024.

      from sec_api import Form13FHoldingsApi

      form13FHoldingsApi = Form13FHoldingsApi(API_KEY_SEC_API)

      search_params = {
          "query": "cik:1350694 AND periodOfReport:2024-03-31",
          "from": "0",
          "size": "1",
          "sort": [{"periodOfReport": {"order": "desc"}}],
      }

      response = form13FHoldingsApi.get_data(search_params)
      filings = response["data"]
      holdings_json = filings[0]["holdings"]
      holdings = pd.DataFrame(holdings_json)
      holdings
      Out[5]:
      cusiptickercikinvestmentDiscretionvotingAuthoritynameOfIssuervalueshrsOrPrnAmttitleOfClass
      088579Y101MMM66740SOLE{'Sole': 13726, 'Shared': 0, 'None': 0}3M CO1455917{'sshPrnamtType': 'SH', 'sshPrnamt': 13726}COM
      1002824100ABT1800SOLE{'Sole': 1728482, 'Shared': 0, 'None': 7675}ABBOTT LABS197331605{'sshPrnamtType': 'SH', 'sshPrnamt': 1736157}COM
      200287Y109ABBV1551152SOLE{'Sole': 449779, 'Shared': 0, 'None': 0}ABBVIE INC81904756{'sshPrnamtType': 'SH', 'sshPrnamt': 449779}COM
      300404A109ACHC1520697SOLE{'Sole': 82943, 'Shared': 0, 'None': 408}ACADIA HEALTHCARE COMPANY IN6603066{'sshPrnamtType': 'SH', 'sshPrnamt': 83351}COM
      4G1151C101ACN1467373SOLE{'Sole': 5269, 'Shared': 0, 'None': 0}ACCENTURE PLC IRELAND1826288{'sshPrnamtType': 'SH', 'sshPrnamt': 5269}SHS CLASS A
      ..............................
      67298954M200Z1617640SOLE{'Sole': 98269, 'Shared': 0, 'None': 0}ZILLOW GROUP INC4793562{'sshPrnamtType': 'SH', 'sshPrnamt': 98269}CL C CAP STK
      67398956P102ZBH1136869SOLE{'Sole': 353985, 'Shared': 0, 'None': 918}ZIMMER BIOMET HOLDINGS INC46840098{'sshPrnamtType': 'SH', 'sshPrnamt': 354903}COM
      67498978V103ZTS1555280SOLE{'Sole': 60434, 'Shared': 0, 'None': 0}ZOETIS INC10226037{'sshPrnamtType': 'SH', 'sshPrnamt': 60434}CL A
      67598980F104ZI1794515SOLE{'Sole': 70792, 'Shared': 0, 'None': 0}ZOOMINFO TECHNOLOGIES INC1134796{'sshPrnamtType': 'SH', 'sshPrnamt': 70792}COMMON STOCK
      67698980A105ZTO1677250SOLE{'Sole': 523693, 'Shared': 0, 'None': 0}ZTO EXPRESS CAYMAN INC10966131{'sshPrnamtType': 'SH', 'sshPrnamt': 523693}SPONSORED ADS A

      677 rows × 9 columns

      columns_to_explode = ["votingAuthority", "shrsOrPrnAmt"]

      for column in columns_to_explode:
          holdings = pd.concat(
              [
                  holdings.drop(columns=column),
                  pd.json_normalize(holdings[column]).add_prefix(f"{column}_"),
              ],
              axis=1,
          )

      holdings
      Out[6]:
      cusiptickercikinvestmentDiscretionnameOfIssuervaluetitleOfClassvotingAuthority_SolevotingAuthority_SharedvotingAuthority_NoneshrsOrPrnAmt_sshPrnamtTypeshrsOrPrnAmt_sshPrnamt
      088579Y101MMM66740SOLE3M CO1455917COM1372600SH13726
      1002824100ABT1800SOLEABBOTT LABS197331605COM172848207675SH1736157
      200287Y109ABBV1551152SOLEABBVIE INC81904756COM44977900SH449779
      300404A109ACHC1520697SOLEACADIA HEALTHCARE COMPANY IN6603066COM829430408SH83351
      4G1151C101ACN1467373SOLEACCENTURE PLC IRELAND1826288SHS CLASS A526900SH5269
      .......................................
      67298954M200Z1617640SOLEZILLOW GROUP INC4793562CL C CAP STK9826900SH98269
      67398956P102ZBH1136869SOLEZIMMER BIOMET HOLDINGS INC46840098COM3539850918SH354903
      67498978V103ZTS1555280SOLEZOETIS INC10226037CL A6043400SH60434
      67598980F104ZI1794515SOLEZOOMINFO TECHNOLOGIES INC1134796COMMON STOCK7079200SH70792
      67698980A105ZTO1677250SOLEZTO EXPRESS CAYMAN INC10966131SPONSORED ADS A52369300SH523693

      677 rows × 12 columns

      unique_holdings_by_cusip = holdings.groupby("cusip").first().reset_index()
      print(f"Number of unique holdings: {len(unique_holdings_by_cusip)}")
      Number of unique holdings: 677
      total_portfolio_value = holdings["value"].sum() / 1_000_000_000
      print(f"Total portfolio value: ${total_portfolio_value:,.3f} billion")
      Total portfolio value: $19.775 billion

      Cover Pages from Form 13F Filings

      To retrieve the cover page of Bridgewater's Form 13F filing for the first quarter of 2024, we use the get_data(search_params) method of the Form13FCoverPagesApi class.

      from sec_api import Form13FCoverPagesApi

      form13FCoverPagesApi = Form13FCoverPagesApi(API_KEY_SEC_API)

      search_params = {
          "query": "cik:1350694 AND periodOfReport:2024-03-31",
          "from": "0",
          "size": "1",
          "sort": [{"periodOfReport": {"order": "desc"}}],
      }

      response = form13FCoverPagesApi.get_data(search_params)
      cover_page = response["data"][0]

      print(json.dumps(cover_page, indent=2))
      {
        "id": "d1a4cbcd2eab004e9415e402a2701c46",
        "accessionNo": "0001172661-24-002257",
        "filedAt": "2024-05-14T12:37:20-04:00",
        "formType": "13F-HR",
        "cik": "1350694",
        "crdNumber": "105129",
        "secFileNumber": "801-35875",
        "form13FFileNumber": "028-11794",
        "periodOfReport": "2024-03-31",
        "isAmendment": false,
        "amendmentInfo": {},
        "filingManager": {
          "name": "Bridgewater Associates, LP",
          "address": {
            "street": "One Nyala Farms Road",
            "city": "Westport",
            "stateOrCountry": "CT",
            "zipCode": 6880
          }
        },
        "reportType": "13F HOLDINGS REPORT",
        "otherManagersReportingForThisManager": [],
        "provideInfoForInstruction5": false,
        "signature": {
          "name": "Michael Kitson",
          "title": "Chief Compliance Officer and Counsel",
          "phone": "203-226-3030",
          "signature": "Michael Kitson",
          "city": "Westport",
          "stateOrCountry": "CT",
          "signatureDate": "05-14-2024"
        },
        "tableEntryTotal": 677,
        "tableEntryTotalAsReported": 677,
        "tableValueTotal": 19775432137,
        "tableValueTotalAsReported": 19775432137,
        "otherIncludedManagersCount": 0,
        "otherIncludedManagers": []
      }

      Products

      • MCP Server
      • Financial Analysis Prompt Library
      • EDGAR Filing Search API
      • Full-Text Search API
      • Real-Time Filing Stream API
      • EDGAR File & Filing Download API
      • Filing to 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
      • Audit Fees 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
      • Bulk Datasets

      General

      • Pricing
      • APIs
      • Datasets
      • Data Browser
      • Features
      • Supported Filings
      • EDGAR Filing Statistics
      • Equity Research & Market Insights

      Account

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

      Developers

      • API Playground
      • Documentation
      • API Reference
      • llms.txt
      • Resources & Tutorials
      • Python API SDK
      • Node.js API SDK
      • Cookbook
      • GitHub

      Legal

      • Terms of Service
      • Privacy Policy

      Legal

      • Terms of Service
      • Privacy Policy

      SEC API

      © 2019 - 2026 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.