Metadata-Version: 2.4
Name: secintel
Version: 0.1.0
Summary: Python client for the SEC Intel API — SEC EDGAR filings, financials & insider-conviction scores for AI agents.
Author: Cristian Lungu
License: MIT
Project-URL: Homepage, https://secintelapi.netlify.app
Project-URL: API, https://rapidapi.com/lungucristian1980/api/sec-intel-filings-financials-insider-trades
Project-URL: Source, https://github.com/lungucristian1980-hub/secintel-python
Keywords: sec,edgar,finance,insider-trading,form-4,api,ai,llm,rag,mcp
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.20
Dynamic: license-file

# secintel

Tiny Python client for the **[SEC Intel API](https://secintelapi.netlify.app)** — SEC EDGAR filings, XBRL financials, and parsed Form 4 insider trades (with a **0–100 insider-conviction score**) as clean JSON, built for AI agents, LLM apps and RAG.

```bash
pip install secintel
```

Get a free API key (1,000 calls/mo, no card): **[RapidAPI listing](https://rapidapi.com/lungucristian1980/api/sec-intel-filings-financials-insider-trades)**

## Quick start

```python
from secintel import SecIntel

sec = SecIntel("YOUR_RAPIDAPI_KEY")

# Everything about a company in one call
data = sec.company("AAPL")
print(data["profile"]["name"])
print(data["financials"]["revenue"])

# The part no other SEC API gives you: a 0-100 insider-conviction score
print(sec.conviction("NVDA"))          # e.g. 82
```

## Feed it to an LLM

Every response is flat JSON — drop it straight into a prompt or a tool call:

```python
import json, anthropic

facts = sec.company("NVDA") | {"insider": sec.insider("NVDA")}
client = anthropic.Anthropic()
msg = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=400,
    messages=[{"role": "user",
               "content": "Using only this SEC data, is NVDA seeing insider accumulation?\n\n"
                          + json.dumps(facts, indent=2)}],
)
print(msg.content[0].text)
```

Prefer MCP? The API is also available as an MCP server through RapidAPI — plug it into Claude Desktop, Cursor or VS Code. See the [homepage](https://secintelapi.netlify.app).

## Methods

| Method | Endpoint |
|---|---|
| `company(query)` | full snapshot: profile + financials + insider + filings |
| `financials(query)` | XBRL fundamentals with history |
| `insider(query, limit=None)` | parsed Form 4 + **conviction_score** |
| `conviction(query)` | shortcut → just the 0–100 score |
| `filings(query, form=None, limit=None)` | recent filings |
| `search(q, forms=None, limit=None)` | full-text filing search |
| `latest(form=None, limit=None)` | live market-wide filing feed |
| `insider_signals(limit=None)` | live market-wide insider BUYS |
| `resolve(query)` | ticker / CIK / name → identifiers |

`query` accepts a ticker (`AAPL`), a CIK, or a company name.

## Notes

Data is from **SEC EDGAR** (US public domain). This is an independent product, not affiliated with the U.S. SEC. For informational purposes only; not investment advice.

MIT licensed.
