# US SEC EDGAR Filings Data API
Query US SEC Form 4, 13F holdings, and XBRL financials.
## API Overview
- **HTTP Protocol:** HTTPS
- **HTTP Method:** GET
- **HTTP Endpoint:** https://api.gugudata.io/v1/stock/us/sec-edgar
- **Response Type:** application/json; charset=utf-8
- **DEMO Endpoint:** https://api.gugudata.io/v1/stock/us/sec-edgar/demo
- **Live Demo:** https://gugudata.io/demo/us-sec-edgar
- **Postman:** https://www.postman.com/gugudata/gugudata-io
- **LLM Page:** https://gugudata.io/details/us-sec-edgar/llm
- **Raw Markdown:** https://gugudata.io/details/us-sec-edgar/llm.md
## Remote MCP
- **MCP Endpoint:** https://mcp.gugudata.io/mcp
- **MCP Guide:** https://gugudata.io/mcp/
- **Authorization:** OAuth authorization opens in the browser; do not paste appkeys into MCP clients.
- **Tool Scope:** MCP clients receive GuGuData API tools available to the authorized account.
## Data & API Features
- Form 4 Insider Trading: Query executive, director, and 10% owner stock purchases, sales, and awards with share counts, prices, and USD transaction values.
- Form 13F Institutional Holdings: Track quarterly institutional equity and options positions across major asset managers via /v1/stock/us/sec-edgar/institutional-holdings.
- XBRL 10-K & 10-Q Financial Facts: Retrieve standardized US-GAAP revenue, net income, assets, EPS, and cash flow time series via /v1/stock/us/sec-edgar/financial-facts.
- Official SEC Accession Traceability: Every record includes official SEC AccessionNumber, 10-digit zero-padded CIK, filing date, and reporting period for auditability.
- Multi-Filter Paginated Queries: Filter by ticker, CIK, CUSIP, insider or manager keyword, transaction code, fiscal year, fiscal period, and date ranges.
- Unified Subscription & MCP Ready: One API key unlocks Form 4, 13F holdings, and XBRL financial facts across REST API and Model Context Protocol (MCP) tools.
## API Request Parameters
| Name | Type | Is Required | Default Value | Remark |
| --- | --- | --- | --- | --- |
| appkey | string | true | YOUR_APPKEY | API key used to authenticate the request. |
| ticker | string | false | AAPL | US stock ticker symbol (case-insensitive, e.g. AAPL, MSFT, NVDA). |
| cik | string | false | | SEC Central Index Key (auto zero-padded to 10 digits, e.g. 320193 or 0000320193). |
| insiderKeyword | string | false | | Case-insensitive substring match against insider name. |
| transactionCode | string | false | | SEC Form 4 transaction code: P (purchase), S (sale), A (award), M (exercise), F (tax withholding). |
| filingFrom | string | false | | Inclusive filing start date in yyyy-MM-dd format. |
| filingTo | string | false | | Inclusive filing end date in yyyy-MM-dd format. |
| pageIndex | integer | false | 1 | 1-based page number. |
| pageSize | integer | false | 20 | Number of records per page (1-100). |
## API Response Parameters
| Name | Type | Remark |
| --- | --- | --- |
| DataStatus.StatusCode | integer | Application-level status code. |
| DataStatus.DataTotalCount | integer | Number of matching or returned records for this request. |
| Data[].RecordId | string | Deterministic unique record identifier. |
| Data[].AccessionNumber | string | Official SEC filing accession number. |
| Data[].Cik | string | 10-digit zero-padded issuer CIK. |
| Data[].Ticker | string | Stock ticker symbol. |
| Data[].CompanyName | string | Issuer legal name. |
| Data[].FilingDate | string | SEC filing date (yyyy-MM-dd). |
| Data[].TransactionDate | string | Actual transaction date (yyyy-MM-dd). |
| Data[].InsiderName | string | Reporting insider name. |
| Data[].InsiderTitle | string | Executive title when reported. |
| Data[].TransactionCode | string | SEC Form 4 transaction code. |
| Data[].Shares | number | Number of shares transacted. |
| Data[].PricePerShare | number | Reported price per share in USD. |
| Data[].TransactionValueUsd | number | Total transaction value in USD. |
| Data[].SharesOwnedAfter | number | Beneficial shares owned after the transaction. |
## API Response Status Codes
| Status Code | Explanation of Status Code | Remarks |
| --- | --- | --- |
| 200 | Request processed successfully. | Some endpoints expose a separate application-level status field in the response body, such as `dataStatus.statusCode`. |
| 400 | Invalid request parameters or request format. | Check required fields, data types, and request body format. |
| 401 | Missing or unknown application key. | Provide a valid `appkey` with the request. |
| 403 | The application key is recognized but access is not allowed. | The key may be expired, inactive, or not permitted for the requested API. |
| 429 | Request rate or trial usage limit exceeded. | Reduce request frequency and retry with backoff. If a trial allowance is exhausted, check Trial Keys for remaining requests and subscribe to continue. |
| 500 | Internal service error. | Retry later or contact support if the error persists. |
| 503 | Upstream service unavailable. | Retry later; the requested upstream dependency is temporarily unavailable. |
## cURL Example
```bash
curl --location 'https://api.gugudata.io/v1/stock/us/sec-edgar?appkey=YOUR_APPKEY&ticker=AAPL&cik=YOUR_VALUE&insiderKeyword=YOUR_VALUE&transactionCode=YOUR_VALUE&filingFrom=YOUR_VALUE&filingTo=YOUR_VALUE&pageIndex=1&pageSize=20'
```