LangChain tool recipe

SEC API LangChain Tool

A copy-ready LangChain tool starter for agent builders who want structured SEC filing watchlist data through RapidAPI without building a separate EDGAR retrieval service.

GET /v1/sec/watchlist/changes?tickers=AAPL,MSFT,NVDA&since=2026-07-01&limit=25
from langchain.tools import tool

@tool
def sec_watchlist_changes(tickers: str, since: str = "2026-07-01", limit: int = 25) -> dict:
    """Fetch SEC filing changes for a comma-separated ticker watchlist."""
    # Call GET /v1/sec/watchlist/changes through RapidAPI and return structured rows.
    return {"tickers": tickers, "since": since, "limit": limit}

# Pass sec_watchlist_changes into create_agent(..., tools=[sec_watchlist_changes]).

Workflow Setup

This recipe shows how to move SEC filing data into automation tools using live HTTPS endpoints and standard API credentials.

Endpoints Used

The integration uses live SEC Event Intelligence endpoints available through RapidAPI subscriptions.

Integration FAQ

Is this an official LangChain integration?

No. It is a standard LangChain tool starter using the public tool decorator pattern with the live RapidAPI endpoint.

Can this be used without LangSmith or LangGraph?

Yes. The starter is a plain LangChain tool function. Observability and graph orchestration are optional choices in the surrounding app.

No investment advice. These recipes move public SEC filing metadata into automation tools. They do not provide recommendations, ratings, signals, or personalized financial guidance. The starter workflow file is available at /downloads/sec-filings-langchain-tool.py.