From 3c444392a9ca04cef53dce41b917ed2687af1f77 Mon Sep 17 00:00:00 2001 From: Hyperion <89154626+daniel-scrivner@users.noreply.github.com> Date: Thu, 16 Jul 2026 10:11:44 -0600 Subject: [PATCH 1/2] docs: clarify Python SDK quickstart --- README.md | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 9fb3ffa..ddce924 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,14 @@ # SEC API Python SDK -`secapi-client` is the Python client for SEC API filings, filing sections, financial statements, ownership data, and factor data. +`secapi-client` is the Python client for retrieving source-backed SEC filings, filing sections, financial statements, ownership data, and factor data. -[Documentation](https://docs.secapi.ai) · [Get an API key](https://secapi.ai/signup) · [Support](https://github.com/secapi-ai/secapi-python/issues) · [Status](https://status.secapi.ai) - -## Install - -```bash -pip install secapi-client -``` - -## Set your API key - -Create an API key in the [SEC API dashboard](https://secapi.ai/signup), then set it in your shell: +## Install and retrieve a filing ```bash -export SECAPI_API_KEY="secapi_live_..." +python -m pip install secapi-client +export SECAPI_API_KEY="secapi_..." ``` -## Make a request - Create `first_request.py`: ```python @@ -28,21 +17,23 @@ from secapi_client import SecApiClient client = SecApiClient() filing = client.agent_latest_filing(ticker="AAPL", form="10-K") -print(filing["accessionNumber"]) -print(filing["filingUrl"]) +print({ + "accessionNumber": filing.get("accessionNumber"), + "filingDate": filing.get("filingDate"), + "filingUrl": filing.get("filingUrl"), + "requestId": filing.get("requestId"), +}) ``` -Run `python first_request.py`. It prints the accession number and SEC source URL for Apple's latest matching 10-K. Those values change when a newer filing is available. - -## Configuration and compatibility +Run `python first_request.py`. It prints the current filing identity and request ID for Apple's latest matching 10-K. Those live values can change when a newer filing is available. -`SecApiClient()` reads `SECAPI_API_KEY` and the optional `SECAPI_BASE_URL` from the environment. `SECAPI_API_BASE_URL` is an alias. Pass `bearer_token` or set `SECAPI_BEARER_TOKEN` only for signed-in account endpoints; standard data requests use an API key. +`SecApiClient` sends `SECAPI_API_KEY` as `x-api-key` to `https://api.secapi.ai`. It wraps public REST endpoints; use the [hosted MCP server](https://docs.secapi.ai/mcp-install) separately when your client supports MCP. Keep API keys out of browser code and do not use a machine key as an `Authorization: Bearer` token. -Python 3.11 or newer is required. The legacy `OMNI_DATASTREAM_API_KEY`, `OMNI_DATASTREAM_BEARER_TOKEN`, `OMNI_DATASTREAM_BASE_URL`, and `OMNI_DATASTREAM_API_BASE_URL` environment variables remain supported. +## Compatibility and support -Failures raise `SecApiError`, which includes the status, error code, and request ID. Include the request ID when opening a [support issue](https://github.com/secapi-ai/secapi-python/issues). +Python 3.11 or newer is required. See the [Python SDK guide](https://docs.secapi.ai/python-sdk) and [API reference](https://docs.secapi.ai/api-reference), check [status](https://status.secapi.ai), or [open an SDK issue](https://github.com/secapi-ai/secapi-python/issues). -See the [API documentation](https://docs.secapi.ai) for endpoint coverage, pagination, and retry behavior. +`SECAPI_BASE_URL` and `SECAPI_API_BASE_URL` can override the default origin. Failures raise `SecApiError`, which includes status, error code, and request ID when supplied. Preserve filing identifiers and request IDs with derived output. ## License From 561351253bd98fd93db68636598039ad8266cb79 Mon Sep 17 00:00:00 2001 From: Hyperion <89154626+daniel-scrivner@users.noreply.github.com> Date: Sat, 18 Jul 2026 09:13:05 -0600 Subject: [PATCH 2/2] chore: align public package metadata --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e3a2bb4..9d9e36e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "secapi-client" version = "1.1.0" -description = "Python SDK for SEC API" +description = "Python SDK for source-backed SEC filings and financial data" requires-python = ">=3.11" readme = "README.md" license = "MIT" @@ -10,7 +10,7 @@ authors = [ ] [project.urls] -Homepage = "https://secapi.ai/developers" +Homepage = "https://docs.secapi.ai" Documentation = "https://docs.secapi.ai" Repository = "https://github.com/secapi-ai/secapi-python"