Resolve a ticker to a CIK, then pull SEC EDGAR filer profiles, filings, XBRL financial concepts and full-text search across 2001-today. 6 endpoints, 1 credit each, structured JSON.
---
name: sec-edgar-api
description: Resolve a ticker to a CIK, then pull SEC EDGAR filer profiles, filings, XBRL financial concepts and full-text search across 2001-today. 6 endpoints, 1 credit each, structured JSON.
version: 1.0.0
tags: sec, sec-edgar, edgar, filings, 10-K, 10-Q, 8-K, xbrl, financial-data, cik, ticker-lookup, full-text-search, investment-research, agents, langchain, crewai, autogen, structured-data, json, ai-agents
metadata:
openclaw:
requires:
env:
- SCAVIO_API_KEY
primaryEnv: SCAVIO_API_KEY
timeout: 120
throttle: 1
emoji: "\U0001F3DB"
homepage: https://scavio.dev/docs/sec-edgar-lookup?utm_source=agent-skills&utm_medium=skill&utm_campaign=sec-edgar-api
---
# SEC EDGAR via Scavio
Resolve a ticker or company name to its CIK, then read the filer's profile, page its filings, pull the full reported history of any XBRL concept, list every concept it reports, and run EDGAR full-text search back to 2001. All six endpoints return structured JSON.
## When to trigger
Use this skill when the user asks to:
- Find a company's CIK from a ticker or name
- List a company's SEC filings, filtered by form type or date
- Pull a reported financial number over time (revenue, net income, EPS) straight from XBRL
- Discover which financial concepts a filer actually reports
- Search the full text of SEC filings for a phrase, a risk factor, or a named party
- Check a filer's SIC industry, EIN, LEI, state of incorporation or fiscal year end
- Build investment research, fundamentals datasets, or filing-monitoring pipelines
## Setup
Get a free API key at [scavio.dev](https://scavio.dev/?utm_source=agent-skills&utm_medium=skill&utm_campaign=sec-edgar-api) (50 free credits to get started, no card required):
```bash
export SCAVIO_API_KEY=sk_live_your_key
```
### If you do not have a key yet
An agent running this skill without `SCAVIO_API_KEY` set will get `401` on every
call below. The whole path from nothing to a working key is self-serve:
1. Sign up at [dashboard.scavio.dev](https://dashboard.scavio.dev/sign-up?utm_source=agent-skills&utm_medium=skill&utm_campaign=sec-edgar-api) - email or Google, no card required.
2. A key is created for the account automatically at signup. It is on the dashboard under API Keys, ready to copy.
3. A new account starts with 50 credits. Endpoints in this skill cost 1 credit each unless the table below says otherwise.
When the balance runs out the API answers `402` with a JSON body carrying
`billing_url`. Topping up needs no code change - the same key keeps working.
The smallest purchase is 2,500 credits for $25, and monthly plans work out
cheaper per credit if the usage is steady rather than one-off.
Every request is a `POST` with a JSON body and:
```
Authorization: Bearer $SCAVIO_API_KEY
```
## Endpoints
Base URL: `https://api.scavio.dev`. All paths are under `/api/v1/sec`. Every endpoint costs **1 credit**.
| Endpoint | Credits | What it returns |
|---|---|---|
| `POST /api/v1/sec/lookup` | 1 | **Start here.** Ticker or name to CIK, with the listing exchange |
| `POST /api/v1/sec/company` | 1 | Filer profile: names, SIC, EIN, LEI, addresses, tickers, filing habits |
| `POST /api/v1/sec/filings` | 1 | A page of filings with direct document links |
| `POST /api/v1/sec/concept` | 1 | Every value a filer reported for one XBRL concept |
| `POST /api/v1/sec/facts` | 1 | The index of every XBRL concept a filer reports |
| `POST /api/v1/sec/search` | 1 | EDGAR full-text search, 2001-today, with facets |
This runs on the SEC's own free JSON API, so the data is first-party.
## Workflow
**Look up first.** Callers hold a ticker (`AAPL`); EDGAR is keyed by CIK (`0000320193`).
1. **Resolve:** call `/sec/lookup` with `query` - a ticker, a company name, or a fragment. Each row carries its match tier as `match`, plus ready-made submissions, company-facts and EDGAR URLs.
2. **Profile:** call `/sec/company` with the `cik` (or a `ticker` - both fields accept either spelling, which softens the lookup step but does not remove it).
3. **Filings:** call `/sec/filings` with `cik` or `ticker`, filtered by `form` and dates.
4. **Financials, in two steps:** call `/sec/facts` to discover which XBRL tags the filer actually reports, then `/sec/concept` with one of those tags to pull its full reported history.
5. **Full text:** call `/sec/search` to find the documents that mention a phrase, across all filers.
`/sec/lookup`, `/sec/company`, `/sec/concept` and `/sec/facts` do not paginate. `/sec/filings` and `/sec/search` do.
### Pagination
- **`/sec/filings`** - `page` (1-based) with `limit` (1-500, default 50).
- **`/sec/search`** - `page`, **capped at 100**, 100 documents per page. The index refuses a result window past 10,000, which is where the cap comes from.
- `limit` on `/lookup`, `/concept` and `/facts` sizes the response. It is **not** a page parameter and there is no second page.
## Parameters
### Lookup (`/lookup`)
| Parameter | Type | Default | Description |
|---|---|---|---|
| `query` | string | required | Ticker, company name, or a fragment (1-200 chars) |
| `limit` | integer | `10` | 1-100. Sizes the response; not a page param. |
| `exchange` | string | -- | `NASDAQ`, `NYSE`, `OTC`, `CBOE`, matched case-insensitively |
Filers the SEC lists with **no** exchange at all are excluded by **any** `exchange` value - omit it if you might be chasing an OTC or unlisted filer.
### Company (`/company`)
| Parameter | Type | Default | Description |
|---|---|---|---|
| `cik` | string | one of | `320193`, `0000320193` or `CIK0000320193` (1-20 chars). A ticker is accepted here too. |
| `ticker` | string | one of | Dotted or dashed (`BRK.B` / `BRK-B`). **Wins over `cik`** when both are given. |
`cik` or `ticker` is required.
### Filings (`/filings`)
| Parameter | Type | Default | Description |
|---|---|---|---|
| `cik` | string | one of | See above |
| `ticker` | string | one of | See above |
| `form` | string or array | -- | `"10-K"`, `["10-K","10-Q"]` or `"10-K,8-K"` (up to 25). Matched against the form **and its root form**. |
| `date_from` | string | -- | `YYYY-MM-DD` |
| `date_to` | string | -- | `YYYY-MM-DD` |
| `page` | integer | -- | 1-based |
| `limit` | integer | `50` | 1-500 |
| `include_history` | boolean | `false` | Reach past the "recent" block into up to 10 archived shards. Still 1 credit. |
`cik` or `ticker` is required.
### Concept (`/concept`)
| Parameter | Type | Default | Description |
|---|---|---|---|
| `concept` | string | required | **Case-sensitive** XBRL tag, e.g. `NetIncomeLoss` (1-120 chars, `^[A-Za-z][A-Za-z0-9]*$`) |
| `cik` | string | one of | See above |
| `ticker` | string | one of | See above |
| `taxonomy` | string | `us-gaap` | `us-gaap`, `dei`, `ifrs-full`, `srt` |
| `unit` | string | -- | e.g. `USD` vs `USD/shares` |
| `form` | string | -- | **Exact** match here - `10-K` excludes `10-K/A` |
| `limit` | integer | `250` | 1-2000. Sizes the response. |
`cik` or `ticker` is required.
### Facts (`/facts`)
| Parameter | Type | Default | Description |
|---|---|---|---|
| `cik` | string | one of | See above |
| `ticker` | string | one of | See above |
| `taxonomy` | string | -- | Restrict to one taxonomy |
| `query` | string | -- | Case-insensitive substring against tag name and label (1-200 chars) |
| `limit` | integer | `250` | 1-2000 |
`cik` or `ticker` is required.
### Search (`/search`)
| Parameter | Type | Default | Description |
|---|---|---|---|
| `query` | string | -- | Quoted phrase for exact, bare words for a bag of terms (1-500 chars). **Optional.** |
| `cik` | string or array | -- | Up to 25. Tickers accepted here too. |
| `ticker` | string or array | -- | Up to 25 |
| `form` | string or array | -- | Up to 25 |
| `date_from` | string | -- | `YYYY-MM-DD`. Coverage starts **2001**. |
| `date_to` | string | -- | `YYYY-MM-DD` |
| `location` | string or array | -- | EDGAR's own two-character codes: `CA`, `NY`, and alphanumeric codes for foreign jurisdictions |
| `sort` | string | `relevance` | `relevance`, `newest`, `oldest` |
| `page` | integer | -- | 1-100, 100 documents per page |
`/search` accepts **no query at all** - a `cik`, `ticker`, `form` or date filter on its own is a valid search.
## Examples
```python
import requests
BASE = "https://api.scavio.dev"
# Your key from https://scavio.dev. Load it from your environment or secret
# store in real code - keep it out of source control.
API_KEY = "sk_your_key_here"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}
# 1. Resolve the ticker to a CIK - always start here
hits = requests.post(f"{BASE}/api/v1/sec/lookup", headers=HEADERS,
json={"query": "AAPL"}).json()
# 2. Filer profile
company = requests.post(f"{BASE}/api/v1/sec/company", headers=HEADERS,
json={"ticker": "AAPL"}).json()
# 3. Annual reports only - note this also brings back 10-K/A amendments
filings = requests.post(f"{BASE}/api/v1/sec/filings", headers=HEADERS,
json={"ticker": "AAPL", "form": "10-K", "date_from": "2015-01-01", "limit": 100}).json()
# 4. Financials in two steps: discover the tag, then pull its history
facts = requests.post(f"{BASE}/api/v1/sec/facts", headers=HEADERS,
json={"ticker": "AAPL", "query": "revenue"}).json()
revenue = requests.post(f"{BASE}/api/v1/sec/concept", headers=HEADERS,
json={"ticker": "AAPL", "concept": "RevenueFromContractWithCustomerExcludingAssessedTax",
"taxonomy": "us-gaap", "unit": "USD"}).json()
# 5. Full-text search across all filers, 2001-today
mentions = requests.post(f"{BASE}/api/v1/sec/search", headers=HEADERS,
json={"query": "\"material weakness\"", "form": "8-K",
"date_from": "2024-01-01", "sort": "newest", "page": 1}).json()
```
## Response shapes
Every response uses the envelope `{ data, response_time, credits_used, credits_remaining }`.
- **lookup** - matching filers with symbol, listing exchange, and ready-made submissions / company-facts / EDGAR URLs, tiered by match quality; each row carries its tier as `match`.
- **company** - legal and former names, SIC industry, filer category, EIN, LEI, state of incorporation, fiscal year end, business and mailing addresses, every ticker with its exchange, which forms it files and how often, plus a preview of its 10 most recent filings.
- **filings** - accession number, form and root form, filing and period dates, 8-K item codes, direct links to the primary document, the filing index and the attachment directory. `history_truncated` is set when `include_history` hit the 10-shard cap.
- **concept** - every value the filer reported for that concept, newest period first, with the form and filing each number came from. Restatements are **kept, not collapsed**, and `latest` disambiguates a quarter from its year-to-date twin using the SEC's comparability flag.
- **facts** - every XBRL concept the filer reports: tag, label, description, units and most recent value, across `us-gaap`, `dei` and any other taxonomy it uses.
- **search** - each hit is the matching **document** with its URL, form, filing date and filer identity, plus facets breaking the whole result set down by company, form, industry and state.
## Guardrails
- Every call is 1 credit, including `include_history`, which can do up to 10 lookups for that one credit. Use it rather than paging blindly into the past.
- **XBRL tags are case-sensitive.** `netincomeloss` is a 404 upstream, not a fuzzy match. Never guess a tag - call `/sec/facts` and use one it actually reports.
- **`form` behaves differently on two endpoints.** On `/filings` it matches the form and its root form, so `10-K` also returns `10-K/A` amendments (ask for `10-K/A` to get amendments only). On `/concept` it is an exact match, so `10-K` excludes `10-K/A`. Do not carry an assumption from one to the other.
- EDGAR's "recent" block is **not a fixed window** - it can be a decade for a quiet filer and about a year for a prolific one. Never tell the user "this is everything" from a default `/filings` call; set `include_history` and check `history_truncated`.
- Full-text search coverage **starts in 2001**. A phrase absent from `/search` results is not proof it was never filed.
- Restatements are preserved in `/concept`. If you report a single number for a period, say which filing it came from.
- `ticker` wins over `cik` when both are sent - do not send a mismatched pair and expect the CIK to be honoured.
- Never fabricate CIKs, accession numbers, filing dates or reported figures. Only return API data, and cite the filing behind any number you quote.
- This is public regulatory data, not investment advice. Do not present a figure as a recommendation.
## Failure handling
- `400` means an invalid or missing parameter - e.g. neither `cik` nor `ticker`, or a malformed date. Fix and retry.
- `401` means the API key is invalid or missing. Check `SCAVIO_API_KEY`.
- `404` usually means the CIK, the concept tag or the taxonomy does not exist upstream. Re-resolve with `/lookup` or `/facts` rather than retrying the same value.
- `429` means rate or usage limit exceeded. Wait before retrying. See [rate limits](https://scavio.dev/docs/rate-limits?utm_source=agent-skills&utm_medium=skill&utm_campaign=sec-edgar-api).
- `502` / `503` mean upstream is temporarily unavailable - wait a few seconds and retry.
- If `/search` returns nothing, remember coverage starts in 2001 and try a looser phrase or a wider date range.
- If `SCAVIO_API_KEY` is not set, prompt the user to export it before continuing.
## Python SDK
`langchain-scavio` has no SEC EDGAR tool - use the Scavio SDK directly:
```bash
pip install scavio==0.15.0
```
```python
from scavio import ScavioClient
client = ScavioClient() # reads SCAVIO_API_KEY
hits = client.sec.lookup("AAPL")
company = client.sec.company(ticker="AAPL")
filings = client.sec.filings(ticker="AAPL", form=["10-K", "10-Q"], include_history=True)
facts = client.sec.facts(ticker="AAPL", query="revenue")
history = client.sec.concept("NetIncomeLoss", ticker="AAPL", taxonomy="us-gaap")
docs = client.sec.search(query='"material weakness"', form="8-K", sort="newest")
```
JavaScript / TypeScript:
```bash
npm install scavio@0.15.0
```
```js
import { Scavio } from "scavio";
const scavio = new Scavio(); // reads SCAVIO_API_KEY
const hits = await scavio.sec.lookup({ query: "AAPL" });
const history = await scavio.sec.concept({ ticker: "AAPL", concept: "NetIncomeLoss" });
```
don't have the plugin yet? install it then click "run inline in claude" again.
extracted implicit decision logic into explicit if-else branches (auth, rate limits, pagination caps, form filter behavior differences, restatements), documented external scavio api connection with env var, oauth scope, pricing, rate limits and coverage dates, added edge cases (10-shard cap on history, empty result sets, case-sensitive xbrl tags, ticket wins over cik), clarified output contract with specific json field names and formats, added outcome signal checks for response codes and user-visible success criteria.
this skill resolves a company ticker or name to its sec cik identifier, then queries the full sec edgar api to pull filer profiles, structured filings metadata, historical xbrl financial concepts, the index of reported accounting tags, and full-text search across filings back to 2001. all responses are structured json. use this when you need to research a company's regulatory filings, monitor filing activity, extract reported financial figures over time, or search regulatory text. every endpoint costs 1 credit and runs on the sec's own json api, so data is first-party.
external connection: scavio sec edgar api
https://api.scavio.devAuthorization: Bearer $SCAVIO_API_KEY header on every requestSCAVIO_API_KEY (required; sign up free at https://scavio.dev, 50 credits to start, no card required)402 with billing_url in response body)/search capped at page 100 max, 100 docs per page, 10,000 doc window limit)/search; concept history varies by filer and taxonomyrequired caller inputs (vary by endpoint)
/lookup)320193, zero-padded like 0000320193, or prefixed like CIK0000320193; ticker accepted as alternate)10-K, 10-Q, 8-K; can be single string or array; up to 25 forms)YYYY-MM-DD)NetIncomeLoss, RevenueFromContractWithCustomerExcludingAssessedTax)us-gaap; can be dei, ifrs-full, srt)step 1: resolve ticker or company name to cik
AAPL), company name fragment (e.g. Apple), or partial namePOST https://api.scavio.dev/api/v1/sec/lookup with body {"query": "<ticker_or_name>", "limit": 10, "exchange": "<optional_NASDAQ_NYSE_OTC>"}{"Authorization": "Bearer $SCAVIO_API_KEY"}cik, ticker, name, match tier (quality of match), exchange, and direct urls to submissions, company-facts, and edgar pagesexchange to include otc and unlisted companiesstep 2: fetch filer profile
POST https://api.scavio.dev/api/v1/sec/company with body {"ticker": "<from_step_1>"} or {"cik": "<from_step_1>"}name, former_names, sic industry code, filer_category, ein, lei, state_of_incorporation, fiscal_year_end, business_address, mailing_address, array of tickers with exchanges, form_types and filing frequency, preview of 10 most recent filingsstep 3: list filings (optional pagination)
"10-K" or ["10-K","10-Q"]), optional date range, optional page numberPOST https://api.scavio.dev/api/v1/sec/filings with body {"ticker": "<from_step_1>", "form": "10-K", "date_from": "2015-01-01", "date_to": "2024-12-31", "page": 1, "limit": 50, "include_history": false}filings array (each row has accession_number, form, root_form, filing_date, period_date, primary_document_url, filing_index_url, attachments_url, optional 8-k item codes), page, limit, total, history_truncated flaginclude_history: true to reach past 10 archived shards in one credit; always check history_truncated to know if you got everything/filings matches form and root form, so 10-K returns 10-K/A amendments too; ask for 10-K/A explicitly to get amendments onlystep 4a: discover xbrl concepts a filer reports
POST https://api.scavio.dev/api/v1/sec/facts with body {"ticker": "<from_step_1>", "taxonomy": "us-gaap", "query": "revenue", "limit": 250}facts array (each row has tag name, label, description, units list, latest_value), indexed by taxonomy/concept; never guess tag names (xbrl tags are case-sensitive)step 4b: pull historical values for one xbrl concept
NetIncomeLoss), optional taxonomy, optional unit filter, optional form filter, optional limitPOST https://api.scavio.dev/api/v1/sec/concept with body {"ticker": "<from_step_1>", "concept": "NetIncomeLoss", "taxonomy": "us-gaap", "unit": "USD", "limit": 250}concept values array, newest period first, each row has value, form, filing_date, period_date, filed_in document link, latest flag (disambiguates quarter from year-to-date using sec comparability flag), accession_numbernetincomeloss will 404; always call /facts first to discover actual tags/concept is exact match (not like /filings), so 10-K excludes 10-K/Astep 5: search full text across all filers (optional pagination)
POST https://api.scavio.dev/api/v1/sec/search with body {"query": "\"material weakness\"", "form": "8-K", "date_from": "2024-01-01", "sort": "newest", "page": 1}documents array (each row has url, form, filing_date, filer_cik, filer_name, state, industry), page, total_documents, facets object with breakdowns by companies, forms, industries, states/search accepts no query at all; a cik, ticker, form, or date filter alone is a valid searchif SCAVIO_API_KEY env var not set
export SCAVIO_API_KEY=sk_your_keyif api returns 401 unauthorized
SCAVIO_API_KEY is set correctly and key still exists in account dashboardif api returns 400 bad request
YYYY-MM-DD, invalid exchange code)if api returns 402 payment required
if api returns 404 not found
/lookup with ticker or company name fragment/facts on that filer to discover actual tag names (xbrl tags are case-sensitive)us-gaap (default), dei, ifrs-full, or srtif api returns 429 rate limit exceeded
/search pagination: cannot go beyond page 100 (10,000 doc window); no workaroundif api returns 502 or 503 service unavailable
if /filings returns no results on first call
include_history: true to reach past recent block into 10 archived shards (still 1 credit)history_truncated: true, you hit the 10-shard cap; query is too broad or company has too many filingsif /search returns no results
if /concept returns empty array
/facts to discover which tags and units the filer actually usesif reported figure comes from multiple filings for same period
latest flag to distinguish quarter from year-to-date variantform filter behavior differs by endpoint
/filings: form: "10-K" returns 10-K and 10-K/A amendments (use form matching, not exact)/concept: form: "10-K" excludes 10-K/A (exact match only)ticker parameter wins over cik if both sent
every endpoint response envelope is json: { data, response_time, credits_used, credits_remaining }
/lookup output
data: array of matching filerscik (string), ticker (string), name (string), match (string tier: "ticker", "exact", "fuzzy"), exchange (string or null), submissions_url, company_facts_url, edgar_url/company output
data: single objectname, former_names (array), sic (string code), filer_category, ein, lei, state_of_incorporation, fiscal_year_end, business_address, mailing_address, tickers (array with exchange), form_types (array of forms filed with frequency), recent_filings (array of 10 most recent)/filings output
data: objectfilings (array of filing objects), page, limit, total, history_truncated (boolean)accession_number, form, root_form, filing_date (YYYY-MM-DD), period_date (YYYY-MM-DD), primary_document_url, filing_index_url, attachments_url, optional items (array of 8-k item codes)/facts output
data: object keyed by taxonomy (e.g. us-gaap, dei)tag, label, description, units (array of unit strings, e.g. ["USD", "USD/shares"]), latest_value/concept output
data: objectconcept (tag name), taxonomy, unit, values (array, newest period first)value (number or string), form, filing_date, period_date, accession_number, filed_in (url), latest (boolean, true if this is latest reported value for period)/search output
data: objectdocuments (array of matching filings), page, total_documents, facets (object with facet breakdowns)url, form, filing_date, filer_cik, filer_name, state, industrycompanies (array with cik, name, hit count), forms (array with form, hit count), industries (array with sic code, hit count), states (array with state code, hit count)data format
0000320193)success indicator: check response status code
200 with json envelope means success; check credits_remaining to know balance400, 401, 402, 404, 429, 502, 503 means failure; read error message and decide retry or pivotskill output verification
/lookup returns at least one matching filer with cik and ticker/company returns non-empty profile with sic, ein, state of incorporation/filings returns array of filings with accession numbers and filing dates matching filter criteria; check history_truncated to know if more exist/facts returns array of xbrl tags with labels and units; use this to pick a tag for step 4b/concept returns array of historical values sorted by period, newest first; each value includes the form and filing it came from/search returns array of documents matching the query and filters; facets show breakdowns of results by company, form, industry, stateuser-facing outcome
history_truncated or totaldo not claim success if
4xx or 5xx (error codes above)