EDGAR Python guide
EDGAR API Python Guide
A Python guide for developers searching EDGAR API Python tutorial or examples before choosing between direct SEC.gov access and a hosted normalized filing API.
import os
import requests
host = "https://sec-event-intelligence.p.rapidapi.com"
headers = {
"x-rapidapi-host": "sec-event-intelligence.p.rapidapi.com",
"x-rapidapi-key": os.environ["RAPIDAPI_KEY"],
}
search = requests.get(
f"{host}/v1/sec/companies/search",
headers=headers,
params={"q": "apple", "limit": 10},
timeout=20,
)
search.raise_for_status()
for company in search.json()["data"]:
print(company["ticker"], company["cik"], company["name"])
Implementation Steps
This guide shows language-specific setup steps for calling the live SEC endpoints through the RapidAPI subscription path.
- Use direct SEC.gov EDGAR APIs when the workflow needs raw source documents or exhibits.
- Use this hosted Python path when the workflow needs company lookup, filing changes, and normalized JSON.
- Store RAPIDAPI_KEY in the environment and keep the key out of source code.
Endpoints Used
Start with one polling endpoint and expand only after the response shape fits your workflow.
GET /v1/sec/companies/searchGET /v1/sec/company/{ticker}/profileGET /v1/sec/company/{ticker}/filings
SDK FAQ
Is this an official SEC.gov EDGAR Python package?
No. It is a hosted API guide for normalized public SEC filing metadata. Direct SEC.gov APIs remain available for raw public source access.
When should I use direct EDGAR instead?
Use direct EDGAR when you need complete raw filings, exhibits, or a custom parser. Use this guide when you need application-ready metadata in Python.
/downloads/sec-event-intelligence-python-client.py.