{"id":24572,"library":"sec-parser","title":"sec-parser","description":"Parse SEC EDGAR HTML documents into a tree of elements that correspond to the visual structure of the document. Version 0.58.1, active development.","status":"active","version":"0.58.1","language":"python","source_language":"en","source_url":"https://github.com/alphanome-ai/sec-parser","tags":["sec","edgar","html","parsing","financial"],"install":[{"cmd":"pip install sec-parser","lang":"bash","label":"stable"}],"dependencies":[{"reason":"HTML parsing","package":"beautifulsoup4","optional":false},{"reason":"XML parser for BeautifulSoup","package":"lxml","optional":false}],"imports":[{"wrong":"from sec_parser import SECParser","symbol":"Edgar10QParser","correct":"from sec_parser import Edgar10QParser"}],"quickstart":{"code":"from sec_parser import SECParser\nfrom sec_parser.semantic_elements import TextElement\n\nhtml = \"<html><body><p>Revenue: $100</p></body></html>\"\nparser = SECParser()\ntree = parser.parse(html)\n# Print top-level elements\nfor element in tree:\n    if isinstance(element, TextElement):\n        print(element.text)","lang":"python","description":"Parse SEC EDGAR HTML into a tree of semantic elements, then iterate over them."},"warnings":[{"fix":"Use iteration over flat list instead of recursive traversal.","message":"In v0.50+, the output tree structure changed: flat list replaced nested tree. Code relying on parent-child traversal will break.","severity":"breaking","affected_versions":">=0.50.0"},{"fix":"Replace parse_html() with parse()","message":"SECParser.parse_html() removed in v0.40. Use SECParser.parse() instead.","severity":"deprecated","affected_versions":">=0.40.0"},{"fix":"Ensure HTML is from SEC EDGAR, not scraped with missing elements.","message":"Input HTML must be valid EDGAR document. Non-standard HTML may cause empty tree.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'0.58.1':24 'activ':25 'correspond':15 'develop':26 'document':8,22 'edgar':6,28 'element':13 'financi':31 'html':7,29 'pars':4,30 'parser':3 'sec':2,5,27 'sec-pars':1 'structur':19 'tree':11 'version':23 'visual':18","created_at":"2026-05-01T08:13:47.664809+00:00","updated_at":"2026-05-01T08:13:47.664809+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.58.1","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/alphanome-ai/sec-parser","docs":null,"changelog":null,"pypi":"https://pypi.org/project/sec-parser/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}