Skill Tracer
Skills › Scientific Agent Skills › database-lookup › sec-edgar.md

sec-edgar.md

260 lines · skills/database-lookup/references/sec-edgar.md at 5f2bc03

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# SEC EDGAR API Reference
2

SEC EDGAR API Reference

Raw lines 1 to 2
3## Overview
4SEC's Electronic Data Gathering, Analysis, and Retrieval system. Provides free access to corporate filings, company data, and XBRL financial data. No API key required, but a User-Agent header identifying you is mandatory.
5

Overview

SEC's Electronic Data Gathering, Analysis, and Retrieval system. Provides free access to corporate filings, company data, and XBRL financial data. No API key required, but a User-Agent header identifying you is mandatory.

Raw lines 3 to 5
6## Base URLs
7- **Company/Filings Data:** `https://data.sec.gov`
8- **EDGAR Website/Archives:** `https://www.sec.gov`
9- **XBRL API:** `https://data.sec.gov/api/xbrl`

Base URLs

  • Company/Filings Data: https://data.sec.gov
  • EDGAR Website/Archives: https://www.sec.gov
  • XBRL API: https://data.sec.gov/api/xbrl
Raw lines 6 to 10
11## Authentication
12- **API Key:** Not required.
13- **User-Agent Header:** REQUIRED on every request. Must contain company/person name and email.
14 ```
15 User-Agent: MyCompany admin@mycompany.com
16 ```
17 Requests without a proper User-Agent are blocked (403).

Authentication

  • API Key: Not required.
  • User-Agent Header: REQUIRED on every request. Must contain company/person name and email. `` User-Agent: MyCompany admin@mycompany.com `` Requests without a proper User-Agent are blocked (403).
Raw lines 11 to 18
19## Rate Limits
20- **10 requests per second** per source IP.
21- Exceeding this results in temporary IP-based throttling (HTTP 429).
22- Use the official bulk ZIP archives for large jobs instead of querying every company separately.
24---

Rate Limits

  • 10 requests per second per source IP.
  • Exceeding this results in temporary IP-based throttling (HTTP 429).
  • Use the official bulk ZIP archives for large jobs instead of querying every company separately.

Raw lines 19 to 25
26## Key Endpoints

Key Endpoints

Raw lines 26 to 27
28### Full-text discovery
30Use [EDGAR full-text search](https://www.sec.gov/edgar/search/) for interactive discovery. Its `efts.sec.gov` backend is not one of the documented `data.sec.gov` public APIs; do not treat inferred UI routes, filters, or response fields as a stable retrieval contract. Use the documented submissions and XBRL routes below for reproducible API retrieval.

Full-text discovery

Use EDGAR full-text search for interactive discovery. Its efts.sec.gov backend is not one of the documented data.sec.gov public APIs; do not treat inferred UI routes, filters, or response fields as a stable retrieval contract. Use the documented submissions and XBRL routes below for reproducible API retrieval.

Raw lines 28 to 31
32### 3. Company Tickers & CIK Lookup
34#### `GET https://www.sec.gov/cgi-bin/browse-edgar`
35Legacy EDGAR company search.
37**Parameters:**
38| Parameter | Type | Required | Description |
39|-----------|--------|----------|-------------|
40| `company` | string | No | Company name search. |
41| `CIK` | string | No | CIK number or ticker symbol. |
42| `type` | string | No | Filing type filter (e.g., `10-K`). |
43| `dateb` | string | No | Filed before date `YYYY-MM-DD`. |
44| `owner` | string | No | `include`, `exclude`, or `only`. |
45| `count` | int | No | Number of results (max 100). |
46| `action` | string | Yes | `getcompany` for company search. |
47| `output` | string | No | `atom` for XML/Atom feed. |
49**Example:**
50```
51https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=AAPL&type=10-K&dateb=&owner=include&count=10&output=atom
52```
54#### `GET https://www.sec.gov/files/company_tickers.json`
55Returns a JSON mapping of all company tickers to CIK numbers.
57**Response:**
58```json
60 "0": {"cik_str": 320193, "ticker": "AAPL", "title": "Apple Inc."},
61 "1": {"cik_str": 789019, "ticker": "MSFT", "title": "MICROSOFT CORP"},
62 ...
64```
66#### `GET https://www.sec.gov/files/company_tickers_exchange.json`
67Includes exchange information for each ticker.
69---

3. Company Tickers & CIK Lookup

GET https://www.sec.gov/cgi-bin/browse-edgar

Legacy EDGAR company search.

Parameters:

ParameterTypeRequiredDescription
companystringNoCompany name search.
CIKstringNoCIK number or ticker symbol.
typestringNoFiling type filter (e.g., 10-K).
datebstringNoFiled before date YYYY-MM-DD.
ownerstringNoinclude, exclude, or only.
countintNoNumber of results (max 100).
actionstringYesgetcompany for company search.
outputstringNoatom for XML/Atom feed.

Example:

https://www.sec.gov/cgi-bin/browse-edgar?action=getcompany&CIK=AAPL&type=10-K&dateb=&owner=include&count=10&output=atom

GET https://www.sec.gov/files/company_tickers.json

Returns a JSON mapping of all company tickers to CIK numbers.

Response:

{
  "0": {"cik_str": 320193, "ticker": "AAPL", "title": "Apple Inc."},
  "1": {"cik_str": 789019, "ticker": "MSFT", "title": "MICROSOFT CORP"},
  ...
}

GET https://www.sec.gov/files/company_tickers_exchange.json

Includes exchange information for each ticker.


Raw lines 32 to 70
Runs code bin/browse-edgar :34
71### 4. Company Filings & Submissions
73#### `GET https://data.sec.gov/submissions/CIK{cik_padded}.json`
74Returns company metadata and recent filings for a given CIK (zero-padded to 10 digits).
76**Example:**
77```
78https://data.sec.gov/submissions/CIK0000320193.json
79```
81**Response:**
82```json
84 "cik": "320193",
85 "entityType": "operating",
86 "sic": "3571",
87 "sicDescription": "Electronic Computers",
88 "name": "Apple Inc.",
89 "tickers": ["AAPL"],
90 "exchanges": ["Nasdaq"],
91 "filings": {
92 "recent": {
93 "accessionNumber": ["0000320193-24-000123", ...],
94 "filingDate": ["2024-11-01", ...],
95 "reportDate": ["2024-09-28", ...],
96 "form": ["10-K", ...],
97 "primaryDocument": ["aapl-20240928.htm", ...],
98 "primaryDocDescription": ["10-K", ...]
99 },
100 "files": [
101 {"name": "CIK0000320193-submissions-001.json", "filingCount": 1000}
102 ]
103 }
105```
107`filings.recent` contains at least one year or 1,000 filings, whichever is larger. Retrieve older filenames from `filings.files` under the same `/submissions/` base; keep the parallel arrays aligned by index.
109---

4. Company Filings & Submissions

GET https://data.sec.gov/submissions/CIK{cik_padded}.json

Returns company metadata and recent filings for a given CIK (zero-padded to 10 digits).

Example:

https://data.sec.gov/submissions/CIK0000320193.json

Response:

{
  "cik": "320193",
  "entityType": "operating",
  "sic": "3571",
  "sicDescription": "Electronic Computers",
  "name": "Apple Inc.",
  "tickers": ["AAPL"],
  "exchanges": ["Nasdaq"],
  "filings": {
    "recent": {
      "accessionNumber": ["0000320193-24-000123", ...],
      "filingDate": ["2024-11-01", ...],
      "reportDate": ["2024-09-28", ...],
      "form": ["10-K", ...],
      "primaryDocument": ["aapl-20240928.htm", ...],
      "primaryDocDescription": ["10-K", ...]
    },
    "files": [
      {"name": "CIK0000320193-submissions-001.json", "filingCount": 1000}
    ]
  }
}

filings.recent contains at least one year or 1,000 filings, whichever is larger. Retrieve older filenames from filings.files under the same /submissions/ base; keep the parallel arrays aligned by index.


Raw lines 71 to 110
111### 5. Company Concept (XBRL Data)
113#### `GET https://data.sec.gov/api/xbrl/companyconcept/CIK{cik}/{taxonomy}/{tag}.json`
114Returns all values reported by a company for a specific XBRL tag across all filings.
116**Path Parameters:**
117| Parameter | Description |
118|------------|-------------|
119| `cik` | Zero-padded CIK (10 digits). |
120| `taxonomy` | XBRL taxonomy: `us-gaap`, `ifrs-full`, `dei`, `srt`. |
121| `tag` | XBRL concept tag, e.g., `RevenueFromContractWithCustomerExcludingAssessedTax`, `Assets`, `AccountsPayableCurrent`. |
123**Example:**
124```
125https://data.sec.gov/api/xbrl/companyconcept/CIK0000320193/us-gaap/RevenueFromContractWithCustomerExcludingAssessedTax.json
126```
128**Response:**
129```json
131 "cik": 320193,
132 "taxonomy": "us-gaap",
133 "tag": "RevenueFromContractWithCustomerExcludingAssessedTax",
134 "label": "Revenue",
135 "description": "Amount of revenue recognized...",
136 "entityName": "Apple Inc.",
137 "units": {
138 "USD": [
139 {
140 "start": "2023-10-01",
141 "end": "2024-09-28",
142 "val": 391035000000,
143 "accn": "0000320193-24-000123",
144 "fy": 2024,
145 "fp": "FY",
146 "form": "10-K",
147 "filed": "2024-11-01"
148 }
149 ]
150 }
152```
154---

5. Company Concept (XBRL Data)

GET https://data.sec.gov/api/xbrl/companyconcept/CIK{cik}/{taxonomy}/{tag}.json

Returns all values reported by a company for a specific XBRL tag across all filings.

Path Parameters:

ParameterDescription
cikZero-padded CIK (10 digits).
taxonomyXBRL taxonomy: us-gaap, ifrs-full, dei, srt.
tagXBRL concept tag, e.g., RevenueFromContractWithCustomerExcludingAssessedTax, Assets, AccountsPayableCurrent.

Example:

https://data.sec.gov/api/xbrl/companyconcept/CIK0000320193/us-gaap/RevenueFromContractWithCustomerExcludingAssessedTax.json

Response:

{
  "cik": 320193,
  "taxonomy": "us-gaap",
  "tag": "RevenueFromContractWithCustomerExcludingAssessedTax",
  "label": "Revenue",
  "description": "Amount of revenue recognized...",
  "entityName": "Apple Inc.",
  "units": {
    "USD": [
      {
        "start": "2023-10-01",
        "end": "2024-09-28",
        "val": 391035000000,
        "accn": "0000320193-24-000123",
        "fy": 2024,
        "fp": "FY",
        "form": "10-K",
        "filed": "2024-11-01"
      }
    ]
  }
}

Raw lines 111 to 155
156### 6. Company Facts (All XBRL for one company)
158#### `GET https://data.sec.gov/api/xbrl/companyfacts/CIK{cik}.json`
159Returns aggregated company concepts from non-custom taxonomies applying to the entire entity. Custom tags and dimensional/segment facts require inspecting the filing itself.
161**Example:**
162```
163https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json
164```
166**Response:** Same structure as companyconcept but with all tags nested under `facts.us-gaap`, `facts.dei`, etc.
168```json
170 "cik": 320193,
171 "entityName": "Apple Inc.",
172 "facts": {
173 "dei": {
174 "EntityCommonStockSharesOutstanding": { "units": { "shares": [...] } }
175 },
176 "us-gaap": {
177 "RevenueFromContractWithCustomerExcludingAssessedTax": { "units": { "USD": [...] } },
178 "Assets": { "units": { "USD": [...] } }
179 }
180 }
182```
184---

6. Company Facts (All XBRL for one company)

GET https://data.sec.gov/api/xbrl/companyfacts/CIK{cik}.json

Returns aggregated company concepts from non-custom taxonomies applying to the entire entity. Custom tags and dimensional/segment facts require inspecting the filing itself.

Example:

https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json

Response: Same structure as companyconcept but with all tags nested under facts.us-gaap, facts.dei, etc.

{
  "cik": 320193,
  "entityName": "Apple Inc.",
  "facts": {
    "dei": {
      "EntityCommonStockSharesOutstanding": { "units": { "shares": [...] } }
    },
    "us-gaap": {
      "RevenueFromContractWithCustomerExcludingAssessedTax": { "units": { "USD": [...] } },
      "Assets": { "units": { "USD": [...] } }
    }
  }
}

Raw lines 156 to 185
186### 7. Frames (Cross-Company XBRL for a period)
188#### `GET https://data.sec.gov/api/xbrl/frames/{taxonomy}/{tag}/{unit}/{period}.json`
189Returns the last-filed fact per reporting entity that best matches the requested calendar period. Reporting start/end dates can differ between entities; inspect them before comparing values.
191**Path Parameters:**
192| Parameter | Description |
193|------------|-------------|
194| `taxonomy` | `us-gaap`, `ifrs-full`, `dei`, `srt`. |
195| `tag` | XBRL tag, e.g., `Assets`. |
196| `unit` | `USD`, `shares`, `pure`, etc. |
197| `period` | Instant: `CY2023Q4I`; Duration: `CY2023`, `CY2023Q1`. |
199**Period format:**
200- `CY2023` = calendar year 2023 (full year duration)
201- `CY2023Q1` = Q1 2023 duration
202- `CY2023Q4I` = instant at end of Q4 2023 (balance sheet items)
204**Example:**
205```
206https://data.sec.gov/api/xbrl/frames/us-gaap/Assets/USD/CY2023Q4I.json
207```
209**Response:**
210```json
212 "taxonomy": "us-gaap",
213 "tag": "Assets",
214 "ccp": "CY2023Q4I",
215 "uom": "USD",
216 "label": "Assets",
217 "description": "Sum of the carrying amounts...",
218 "pts": 8500,
219 "data": [
220 {"accn": "0000320193-24-000123", "cik": 320193, "entityName": "Apple Inc.", "loc": "US-CA", "end": "2023-12-30", "val": 352583000000}
221 ]
223```
225---

7. Frames (Cross-Company XBRL for a period)

GET https://data.sec.gov/api/xbrl/frames/{taxonomy}/{tag}/{unit}/{period}.json

Returns the last-filed fact per reporting entity that best matches the requested calendar period. Reporting start/end dates can differ between entities; inspect them before comparing values.

Path Parameters:

ParameterDescription
taxonomyus-gaap, ifrs-full, dei, srt.
tagXBRL tag, e.g., Assets.
unitUSD, shares, pure, etc.
periodInstant: CY2023Q4I; Duration: CY2023, CY2023Q1.

Period format:

  • CY2023 = calendar year 2023 (full year duration)
  • CY2023Q1 = Q1 2023 duration
  • CY2023Q4I = instant at end of Q4 2023 (balance sheet items)

Example:

https://data.sec.gov/api/xbrl/frames/us-gaap/Assets/USD/CY2023Q4I.json

Response:

{
  "taxonomy": "us-gaap",
  "tag": "Assets",
  "ccp": "CY2023Q4I",
  "uom": "USD",
  "label": "Assets",
  "description": "Sum of the carrying amounts...",
  "pts": 8500,
  "data": [
    {"accn": "0000320193-24-000123", "cik": 320193, "entityName": "Apple Inc.", "loc": "US-CA", "end": "2023-12-30", "val": 352583000000}
  ]
}

Raw lines 186 to 226
227### 8. Filing Archives (Direct Document Access)
229#### `GET https://www.sec.gov/Archives/edgar/data/{cik}/{accession_number_no_dashes}/{filename}`
230Direct access to any filing document.
232**Example:**
233```
234https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm
235```
237The accession number format in the URL is stripped of dashes: `0000320193-24-000123` becomes `000032019324000123`.
239---

8. Filing Archives (Direct Document Access)

GET https://www.sec.gov/Archives/edgar/data/{cik}/{accession_number_no_dashes}/{filename}

Direct access to any filing document.

Example:

https://www.sec.gov/Archives/edgar/data/320193/000032019324000123/aapl-20240928.htm

The accession number format in the URL is stripped of dashes: 0000320193-24-000123 becomes 000032019324000123.


Raw lines 227 to 240
241## Common XBRL Tags Reference
242| Tag | Description |
243|-----|-------------|
244| `RevenueFromContractWithCustomerExcludingAssessedTax` / `Revenues` | Revenue concepts; choose from the company's actual facts |
245| `NetIncomeLoss` | Net income |
246| `Assets` | Total assets |
247| `Liabilities` | Total liabilities |
248| `StockholdersEquity` | Total equity |
249| `EarningsPerShareBasic` | Basic EPS |
250| `EarningsPerShareDiluted` | Diluted EPS |
251| `OperatingIncomeLoss` | Operating income |
252| `CashAndCashEquivalentsAtCarryingValue` | Cash and equivalents |
253| `LongTermDebt` | Long-term debt |
254| `CommonStockSharesOutstanding` | Shares outstanding |

Common XBRL Tags Reference

TagDescription
RevenueFromContractWithCustomerExcludingAssessedTax / RevenuesRevenue concepts; choose from the company's actual facts
NetIncomeLossNet income
AssetsTotal assets
LiabilitiesTotal liabilities
StockholdersEquityTotal equity
EarningsPerShareBasicBasic EPS
EarningsPerShareDilutedDiluted EPS
OperatingIncomeLossOperating income
CashAndCashEquivalentsAtCarryingValueCash and equivalents
LongTermDebtLong-term debt
CommonStockSharesOutstandingShares outstanding
Raw lines 241 to 255
256## Notes
257- CIK numbers must be zero-padded to 10 digits in `data.sec.gov` URLs.
258- Response excerpts and accession numbers here illustrate structure; obtain actual document names and accession numbers from submissions before constructing archive URLs.
259- For bulk downloads, SEC provides index files at `https://www.sec.gov/Archives/edgar/full-index/`.
260- All responses are JSON unless otherwise noted. Filing documents can be HTML, XML, or plain text.

Notes

  • CIK numbers must be zero-padded to 10 digits in data.sec.gov URLs.
  • Response excerpts and accession numbers here illustrate structure; obtain actual document names and accession numbers from submissions before constructing archive URLs.
  • For bulk downloads, SEC provides index files at https://www.sec.gov/Archives/edgar/full-index/.
  • All responses are JSON unless otherwise noted. Filing documents can be HTML, XML, or plain text.
Raw lines 256 to 260