Skip to main content

SEC filing tools for LangChain

Give your LangChain and LangGraph agents SEC EDGAR data: 10-K and 10-Q sections, XBRL financial statements, Form 4 insider trades and 8-K reports. Powered by the SecFeed API.

No vector store or embeddings needed: SecFeed returns the exact filing section (Risk Factors, MD&A, Business), and the tool hands your agent the paragraphs that match its question.

pip install secfeed-langchain
export SECFEED_API_KEY=sf_...   # free key: https://secfeedapi.com/signup/
from langchain_openai import ChatOpenAI
from langchain.agents import create_agent
from secfeed_langchain import all_tools

agent = create_agent(ChatOpenAI(model="gpt-4o-mini"), all_tools())
reply = agent.invoke({"messages": [("user", "What are NVDA's biggest risks?")]})
print(reply["messages"][-1].content)

Each tool is a normal LangChain StructuredTool, so it also works with llm.bind_tools(...), LangChain agents and any framework that accepts LangChain tools.

Tools

Tool What the agent gets API calls
search_10k The paragraphs of the latest 10-K that answer a question, from the right section (Business, Risk Factors, MD&A, Market Risk), with the filing link 2
search_10q Same for the latest 10-Q 2
financial_statements Income statement, balance sheet and cash flow from XBRL, last periods side by side 1
insider_trades Latest Form 4 trades: who, role, buy or sell, shares, price, value, 10b5-1 flag 1
recent_8k Latest 8-K reports and the items each one covers, with links 2

Repeat questions about the same filing are cached for the life of the process, so they cost no extra calls.

You can call a tool directly to see what the model sees:

from secfeed_langchain import insider_trades
print(insider_trades.invoke({"ticker": "MSFT", "code": "S", "limit": 3}))

Example agent

pip install secfeed-langchain langchain langchain-openai
python examples/stock_agent.py "Is AMD's growth funded by its own cash flow, and are insiders selling?"

Any OpenAI compatible endpoint works: set OPENAI_BASE_URL and MODEL.

Also available

  • secfeed-crewai: the same tools for CrewAI, with a three agent stock research crew
  • secfeed Python and Node SDKs for every SecFeed endpoint (13F holdings, Form D, full text search, XBRL frames and more)
  • SecFeed MCP server for Claude, Cursor and other MCP clients

License

MIT

Metadata

Release files for secfeed-langchain 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for secfeed-langchain 0.1.0
File Size Uploaded Provenance Actions
secfeed_langchain-0.1.0.tar.gz 8.0 kB Without provenance Details for secfeed_langchain-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for secfeed-langchain 0.1.0
File Interpreter ABI Platform Actions
secfeed_langchain-0.1.0-py3-none-any.whl Python 3 none any Details for secfeed_langchain-0.1.0-py3-none-any.whl

Total release size: 16.5 kB

Release files / secfeed_langchain-0.1.0.tar.gz

Download URL secfeed_langchain-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
693d098fc98c944c9d9e06319d81d257f7bb258a597217807d0086177544b63c
BLAKE2b-256 checksum
How to use checksums
4da216f31b641727a1cf8dddcb999d78e7582659096ee00e1b9ce98317024ba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Release files / secfeed_langchain-0.1.0-py3-none-any.whl

Download URL secfeed_langchain-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
23cb79313e3b2d3fdf8e97e9afebce694ac851ea52599cf5bc34f221fb62647f
BLAKE2b-256 checksum
How to use checksums
b9c27ef201cb8e7efb9b77e951bf153638858c1c40c7f35442fc4b0fffd36a00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.20

Security for secfeed-langchain 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page