edgrapi
A tiny Python client for the Edgrapi SEC EDGAR data API.
Parsed SEC filings as clean JSON: company financials, insider trades (Form 4), 8-K events, 13F fund holdings, and 13D/13G activist stakes. There's no LLM in the data path — every value is lifted straight from the filing, so you can verify any number on EDGAR yourself.
The heavy lifting (XBRL parsing, CUSIP mapping, quarter-over-quarter diffs)
happens server-side, so this client stays tiny and has one dependency
(requests).
Install
pip install edgrapi
Get a free API key (100 calls/month, no card) at https://edgrapi.com.
Usage
from edgrapi import Client
c = Client("your_key")
# Financials — income statement, balance sheet, cash flow (normalized from XBRL)
c.fundamentals("AAPL")
c.fundamentals("AAPL", period="quarterly", limit=8)
c.ratios("AAPL")
# Insider trades (Form 4), scored buy vs sell
c.insider("NVDA")
# 8-K material events, item-coded
c.events("TSLA")
c.events("TSLA", notable=True) # skip routine 8-Ks
# 13F fund holdings, diffed against last quarter
c.holdings("berkshire") # famous-fund alias
c.holdings("burry")
# 13D / 13G activist stakes
c.activist("AAPL")
# Company profile + CIK, and recent filings
c.company("MSFT")
c.filings("MSFT", form="10-K")
# Extracted 10-K / 10-Q sections (business, risk factors, MD&A)
c.sections("AAPL")
Every method returns the parsed JSON body as a dict.
Errors
Failed calls raise EdgrapiError, which carries the HTTP status and the
server's detail:
from edgrapi import Client, EdgrapiError
c = Client("your_key")
try:
c.fundamentals("NOTATICKER")
except EdgrapiError as e:
print(e.status, e.detail) # e.g. 404 unknown ticker
Common statuses: 401 bad key, 402 / 429 out of credits, 404 unknown
ticker. Calls that return no data are not charged. The exact credit cost of each
call comes back in the X-Credits-Cost response header, and your remaining
balance in X-Credits-Remaining.
Notes
- This is a thin HTTP client. The API it talks to is a hosted service; if you'd rather run everything locally with no API key, edgartools is an excellent open-source library that parses EDGAR on your own machine.
- Data is public SEC EDGAR content, surfaced for research. Not investment advice.
License
MIT.
Metadata
Release files for edgrapi 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| edgrapi-0.1.0.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| edgrapi-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / edgrapi-0.1.0.tar.gz
| Download URL | edgrapi-0.1.0.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a60e7f5cbc7dd4245604843b3976e4da8d5a2f8f7746f5eaf31a0f6877b7b3ec
|
|
BLAKE2b-256 checksum How to use checksums |
68346cbe99ec59b11c7ba946a644f4a2c7a5dcb62a31e867f4957406980c0762
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / edgrapi-0.1.0-py3-none-any.whl
| Download URL | edgrapi-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0a1ed90b6d3a4f9d1b928b036e7fc52575c5a9ae35784ed67c4d15f56f98061
|
|
BLAKE2b-256 checksum How to use checksums |
067555fa51971c9d6db4504b88e1d1fbf3657c6b13f22b40d6f610bd1044d794
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|