{"id":16909873,"url":"https://github.com/jadchaar/sec-edgar-api","last_synced_at":"2025-06-26T10:32:04.277Z","repository":{"id":45737245,"uuid":"448420807","full_name":"jadchaar/sec-edgar-api","owner":"jadchaar","description":"🤖 Unofficial SEC EDGAR API wrapper for Python","archived":false,"fork":false,"pushed_at":"2024-07-10T05:20:45.000Z","size":48,"stargazers_count":95,"open_issues_count":3,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T18:09:28.991Z","etag":null,"topics":["api-wrapper","cik","edgar","etfs","finance","financial-data","funds","markets","mutual-funds","python","sec-edgar","sec-edgar-api","stock-market","stocks"],"latest_commit_sha":null,"homepage":"https://sec-edgar-api.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jadchaar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-16T00:14:47.000Z","updated_at":"2025-05-06T14:58:42.000Z","dependencies_parsed_at":"2024-10-26T21:18:13.576Z","dependency_job_id":"73289fa7-d103-4b21-8d7f-321a546d9013","html_url":"https://github.com/jadchaar/sec-edgar-api","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jadchaar/sec-edgar-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadchaar%2Fsec-edgar-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadchaar%2Fsec-edgar-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadchaar%2Fsec-edgar-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadchaar%2Fsec-edgar-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jadchaar","download_url":"https://codeload.github.com/jadchaar/sec-edgar-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadchaar%2Fsec-edgar-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262047899,"owners_count":23250444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-wrapper","cik","edgar","etfs","finance","financial-data","funds","markets","mutual-funds","python","sec-edgar","sec-edgar-api","stock-market","stocks"],"created_at":"2024-10-13T18:58:07.914Z","updated_at":"2025-06-26T10:32:04.218Z","avatar_url":"https://github.com/jadchaar.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sec-edgar-api\n\n[![Tests](https://github.com/jadchaar/sec-edgar-api/actions/workflows/continuous_integration.yml/badge.svg)](https://github.com/jadchaar/sec-edgar-api/actions/workflows/continuous_integration.yml)\n[![Documentation Status](https://readthedocs.org/projects/sec-edgar-api/badge/?version=latest)](https://sec-edgar-api.readthedocs.io/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/jadchaar/sec-edgar-api/branch/main/graph/badge.svg?token=0WLWU3SZKE)](https://codecov.io/gh/jadchaar/sec-edgar-api)\n[![PyPI Version](https://img.shields.io/pypi/v/sec-edgar-api.svg)](https://pypi.org/project/sec-edgar-api/)\n[![Supported Python Versions](https://img.shields.io/pypi/pyversions/sec-edgar-api.svg)](https://pypi.org/project/sec-edgar-api/)\n[![License](https://img.shields.io/pypi/l/sec-edgar-api.svg)](https://pypi.org/project/sec-edgar-api/)\n[![Code Style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n\n**sec-edgar-api** is a lightweight, unofficial Python API wrapper for the [SEC EDGAR REST API](https://www.sec.gov/edgar/sec-api-documentation).\n\n## Features\n\n- Full support for [all SEC EDGAR REST API endpoints](#wrapper-functions-and-corresponding-api-endpoints)\n- Automatic pagination handling for filing submissions data\n- Automatic rate-limiting to 10 requests per second to conform with [SEC fair access rules](https://www.sec.gov/developer)\n- Full support for PEP 484-style type hints and the [mypy type checker](https://mypy.readthedocs.io/en/stable/)\n- Support for Python 3.6+\n\n## Quick Start\n\n### Installation\n\nInstall and update this package using [pip](https://pip.pypa.io/en/stable/getting-started/):\n\n```console\n$ pip install -U sec-edgar-api\n```\n\n### Usage\n\n```python\n\u003e\u003e\u003e from sec_edgar_api import EdgarClient\n\n# Specify user-agent string to pass to SEC to identify\n# requests for rate-limiting purposes\n\u003e\u003e\u003e edgar = EdgarClient(user_agent=\"\u003cSample Company Name\u003e \u003cAdmin Contact\u003e@\u003cSample Company Domain\u003e\")\n\n# Get submissions for Apple with the additional paginated files\n# appended to the recent filings to prevent the need for extra\n# manual pagination handling\n\u003e\u003e\u003e edgar.get_submissions(cik=\"320193\")\n{\n    \"cik\": \"320193\",\n    \"entityType\": \"operating\",\n    \"sic\": \"3571\",\n    \"sicDescription\": \"Electronic Computers\",\n    \"insiderTransactionForOwnerExists\": 0,\n    \"insiderTransactionForIssuerExists\": 1,\n    \"name\": \"Apple Inc.\",\n    \"tickers\": [\n        \"AAPL\"\n    ],\n    \"exchanges\": [\n        \"Nasdaq\"\n    ],\n    ...\n    \"filings\": {\n        \"recent\": {\n            \"accessionNumber\": [...],\n            \"filingDate\": [...],\n            \"reportDate\": [...],\n            \"acceptanceDateTime\": [...],\n            \"act\": [...],\n            \"form\": [...],\n            \"fileNumber\": [...],\n            \"filmNumber\": [...],\n            \"items\": [...],\n            \"size\": [...],\n            \"isXBRL\": [...],\n            \"isInlineXBRL\": [...],\n            \"primaryDocument\": [...],\n            \"primaryDocDescription\": [...]\n        },\n        # The extra paginated submission data has already been\n        # appended to the lists in the above \"recent\" key entries\n        \"files\": []\n    }\n}\n\n# Get submissions for Apple without automatic pagination handling,\n# which requires manual handling of the paginated files (not recommended)\n\u003e\u003e\u003e edgar.get_submissions(cik=\"320193\", handle_pagination=False)\n{\n    \"cik\": \"320193\",\n    \"entityType\": \"operating\",\n    \"sic\": \"3571\",\n    \"sicDescription\": \"Electronic Computers\",\n    \"insiderTransactionForOwnerExists\": 0,\n    \"insiderTransactionForIssuerExists\": 1,\n    \"name\": \"Apple Inc.\",\n    \"tickers\": [\n        \"AAPL\"\n    ],\n    \"exchanges\": [\n        \"Nasdaq\"\n    ],\n    ...\n    \"filings\": {\n        \"recent\": {\n            \"accessionNumber\": [...],\n            \"filingDate\": [...],\n            \"reportDate\": [...],\n            \"acceptanceDateTime\": [...],\n            \"act\": [...],\n            \"form\": [...],\n            \"fileNumber\": [...],\n            \"filmNumber\": [...],\n            \"items\": [...],\n            \"size\": [...],\n            \"isXBRL\": [...],\n            \"isInlineXBRL\": [...],\n            \"primaryDocument\": [...],\n            \"primaryDocDescription\": [...]\n        },\n        # Requires manual pagination handling\n        \"files\": [\n            {\n                \"name\": \"CIK0000320193-submissions-001.json\",\n                \"filingCount\": ...,\n                \"filingFrom\": ...,\n                \"filingTo\": ...\n            }\n        ]\n    }\n}\n\n# Get company concept for Apple\n\u003e\u003e\u003e edgar.get_company_concept(cik=\"320193\", taxonomy=\"us-gaap\", tag=\"AccountsPayableCurrent\")\n{\n    \"cik\": 320193,\n    \"taxonomy\": \"us-gaap\",\n    \"tag\": \"AccountsPayableCurrent\",\n    \"label\": \"Accounts Payable, Current\",\n    \"description\": ...,\n    \"entityName\": \"Apple Inc.\",\n    \"units\": {\n        \"USD\": [...]\n    }\n}\n\n# Get company facts for Apple\n\u003e\u003e\u003e edgar.get_company_facts(cik=\"320193\")\n{\n    \"cik\": 320193,\n    \"entityName\": \"Apple Inc.\",\n    \"facts\": {\n        \"dei\": {\n            \"EntityCommonStockSharesOutstanding\": {\n                \"label\": \"Entity Common Stock, Shares Outstanding\",\n                \"description\": ...,\n                \"units\": {\n                    \"shares\": [...]\n                }\n            },\n            \"EntityPublicFloat\": {\n                \"label\": \"Entity Public Float\",\n                \"description\": ...,\n                \"units\": {\n                    \"USD\": [...]\n                }\n            }\n        },\n        \"us-gaap\": {\n            \"AccountsPayable\": {\n                \"label\": \"Accounts Payable (Deprecated 2009-01-31)\",\n                \"description\": ...,\n                \"units\": {\n                    \"USD\": [...]\n                }\n            },\n            \"AccountsPayableCurrent\": {\n                \"label\": \"Accounts Payable, Current\",\n                \"description\": ...,\n                \"units\": {\n                    \"USD\": [...]\n                }\n            },\n            ...\n        }\n    }\n}\n\n# Get one fact for each reporting entity in specified\n# calendar period (Q1 2019)\n\u003e\u003e\u003e edgar.get_frames(taxonomy=\"us-gaap\", tag=\"AccountsPayableCurrent\", unit=\"USD\", year=\"2019\", quarter=1)\n{\n    \"taxonomy\": \"us-gaap\",\n    \"tag\": \"AccountsPayableCurrent\",\n    \"ccp\": \"CY2019Q1I\",\n    \"uom\": \"USD\",\n    \"label\": \"Accounts Payable, Current\",\n    \"description\": ...,\n    \"pts\": 3388,\n    \"data\": [\n        {\n            \"accn\": \"0001555538-19-000006\",\n            \"cik\": 1555538,\n            \"entityName\": \"SUNCOKE ENERGY PARTNERS, L.P.\",\n            \"loc\": \"US-IL\",\n            \"end\": \"2019-03-31\",\n            \"val\": 78300000\n        },\n        {\n            \"accn\": \"0000011199-19-000012\",\n            \"cik\": 11199,\n            \"entityName\": \"BEMIS CO INC\",\n            \"loc\": \"US-WI\",\n            \"end\": \"2019-03-31\",\n            \"val\": 465700000\n        },\n        ...\n    ]\n}\n```\n\n## Wrapper Functions and Corresponding API Endpoints\n\n|                        Wrapper Function                         |          API Route          |                                         Full API URI                                         |\n| --------------------------------------------------------------- | --------------------------- | -------------------------------------------------------------------------------------------- |\n| `get_submissions(cik)`                                          | `/submissions/`             | `data.sec.gov/submissions/CIK{cik}.json`                                                     |\n| `get_company_concept(cik, taxonomy, tag)`                       | `/api/xbrl/companyconcept/` | `data.sec.gov/api/xbrl/companyconcept/CIK{cik}/{taxonomy}/{tag}.json`                        |\n| `get_company_facts(cik)`                                        | `/api/xbrl/companyfacts/`   | `data.sec.gov/api/xbrl/companyfacts/CIK{cik}.json`                                           |\n| `get_frames(taxonomy, tag, unit, year, quarter, instantaneous)` | `/api/xbrl/frames/`         | `data.sec.gov/api/xbrl/frames/{taxonomy}/{tag}/{unit}/CY{year}{quarter}{instantaneous}.json` |\n\nMore details on each endpoint can be found on the official SEC API documentation: [sec.gov/edgar/sec-api-documentation](https://www.sec.gov/edgar/sec-api-documentation).\n\n## Contributing\n\nIf you encounter a bug or would like to see a new company filing or feature added to **sec-edgar-api**, please [file an issue](https://github.com/jadchaar/sec-edgar-api/issues) or [submit a pull request](https://help.github.com/en/articles/creating-a-pull-request).\n\n## Documentation\n\nFor full documentation, please visit [sec-edgar-api.readthedocs.io](https://sec-edgar-api.readthedocs.io).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadchaar%2Fsec-edgar-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjadchaar%2Fsec-edgar-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadchaar%2Fsec-edgar-api/lists"}