# SEC API query syntax, paging and limits

Every search endpoint takes the same POST body and returns the same shape. Queries use Lucene syntax.

## Authentication

Send the key as `Authorization: Bearer <key>`, or as `?token=` when a tool can't set headers.

## Request

```json
{
  "query": "issuer.ticker:AAPL AND transactionCodes:S",
  "from": 0,
  "size": 50,
  "sort": [
    {
      "filedAt": {
        "order": "desc"
      }
    }
  ]
}
```

- `query` (required, up to 3,500 characters)
- `size` 1 to 50
- `from` 0 to 10,000
- `sort` list of `{field: {order}}`

## Response

```json
{ "total": { "value": 86, "relation": "eq" }, "data": [ ... ] }
```

Past 10,000 matches `relation` is `gte`; split the query by date. Guide: https://www.quantisnow.com/sec-api/guides/paginate-past-10000-results

## Syntax

| What | Write | Notes |
| --- | --- | --- |
| Field match | `formType:"10-K"` | Quote values with spaces, slashes or dashes. |
| Nested field | `issuer.ticker:NVDA` | Dots reach into objects and arrays. |
| Any of a list | `ticker:(AAPL OR MSFT OR GOOGL)` | Up to 1,000 values. |
| And, or, not | `formType:4 AND NOT amendment:true` | Operators are uppercase. Group with parentheses. |
| Date range | `filedAt:[2026-01-01 TO 2026-03-31]` | Both ends included. Use `{ }` to leave an end out. |
| Greater or less | `purchased.valueUsd:>1000000` | Also `>=`, `<` and `<=` on numbers and dates. |
| Wildcard | `companyName:Apple*` | `*` for any characters, `?` for one. Not inside quotes. |
| Field exists | `_exists_:reportingOwner.officerTitle` | Records where the field has a value. |
| Everything | `*` | Use with a sort and a date range, or you page through the whole index. |

## Errors

- 400: The query does not parse, or `size` or `from` is out of range. The body says where.
- 401: No key, or the key is wrong.
- 403: The key does not have access to that endpoint yet. Trial keys cover the datasets named in the request.
- 429: Over the rate limit or the month's allowance. See `Retry-After`.
- 500: Our fault. Retry once; if it repeats, tell us the request.

## Live stream

`wss://api.quantisnow.com/v1/stream` pushes new filings and news items as JSON; send a query on connect to filter.

---

Get an API key: https://www.quantisnow.com/sec-api/keys (a person replies within one business day; approved keys start with 1,000 free calls).

All SEC API pages:

- [Overview](https://www.quantisnow.com/sec-api.md): SEC filings, insider trades, 13F holdings, financials and 8-K events through one query API, an MCP server and plain-English questions.
- [Get an API key](https://www.quantisnow.com/sec-api/keys): Request a key; every request is read and answered within one business day.
- [Query syntax and limits](https://www.quantisnow.com/sec-api/query-syntax.md): Lucene query syntax, authentication, paging, sorting, rate limits and errors.
- [Playground](https://www.quantisnow.com/sec-api/playground): Run the example queries in the browser and see the real responses.
- [Filings search](https://www.quantisnow.com/sec-api/filings-search.md): Query 10-Ks, 10-Qs, 8-Ks, S-1s, Form D and every other EDGAR form with one Lucene query. Ticker, CIK, form type, filing time and links to the filing index, as JSON.
- [Insider trading](https://www.quantisnow.com/sec-api/insider-trading.md): Search insider purchases and sales from Form 4, initial holdings from Form 3 and planned sales from Form 144 by ticker, insider, role, dollar size and date.
- [13F holdings](https://www.quantisnow.com/sec-api/13f-holdings.md): Every 13F filer's positions by quarter, with shares, value and the change from the quarter before: new position, added, trimmed or sold out. Search by fund, CIK or ticker.
- [13D and 13G stakes](https://www.quantisnow.com/sec-api/beneficial-ownership.md): Search Schedule 13D activist stakes and 13G passive stakes by filer, company and date. Every filing above 5% ownership, as it is accepted.
- [Financial statements](https://www.quantisnow.com/sec-api/financial-statements.md): Quarterly and annual income statement, balance sheet and cash flow for every SEC filer, read from XBRL and normalized to the same field names. Search by ticker, fiscal year or any value.
- [8-K events](https://www.quantisnow.com/sec-api/8-k-events.md): Every Form 8-K with its item numbers: auditor changes (4.01), bankruptcies (1.03), delisting notices (3.01), executive changes (5.02), earnings (2.02) and the rest. Search by item, company and date.
- [News and press releases](https://www.quantisnow.com/sec-api/news-wire.md): Press releases from the major wires, FDA actions, analyst upgrades and downgrades and every SEC filing, tagged by ticker and category, in one searchable stream with a live websocket.
- [Plain-English questions](https://www.quantisnow.com/sec-api/natural-language.md): Ask a question in English; get back the query it became and the rows it found.
- [MCP server](https://www.quantisnow.com/sec-api/mcp.md): Search SEC data from Claude, ChatGPT and Cursor.
- [Find insider buying clusters with the Form 4 API](https://www.quantisnow.com/sec-api/guides/insider-buying-clusters.md): Pull every open-market insider purchase for a window, group by company and keep the ones where three or more insiders bought. Python, 30 lines.
- [Track activist investors with Schedule 13D filings](https://www.quantisnow.com/sec-api/guides/track-activist-13d-filings.md): Query new Schedule 13D filings, tell activists from passive 13G holders, and follow one fund across every company it files on.
- [See which funds bought or sold a stock from 13F filings](https://www.quantisnow.com/sec-api/guides/which-funds-bought-a-stock.md): Use the change field on 13F holdings to list new positions, increases and full exits in one stock for a quarter, without joining two quarters yourself.
- [Screen 8-K filings by item number: auditor changes, delistings and bankruptcies](https://www.quantisnow.com/sec-api/guides/8k-item-screener.md): What each 8-K item number means, which ones traders watch, and how to query one item across every company with the 8-K API.
- [Load SEC financial statements into pandas](https://www.quantisnow.com/sec-api/guides/financial-statements-pandas.md): Pull quarterly income statement, balance sheet and cash flow data from XBRL filings into a pandas DataFrame, and screen every filer on one metric.
- [Page past 10,000 results in a Lucene-style search API](https://www.quantisnow.com/sec-api/guides/paginate-past-10000-results.md): Why search APIs stop at 10,000 results per query and the date-window loop that gets every record anyway.
- [Search SEC filings from Claude, ChatGPT or Cursor with MCP](https://www.quantisnow.com/sec-api/guides/sec-filings-in-claude-mcp.md): Connect the Quantisnow MCP server to an AI assistant and ask about filings, insider trades, 13F holdings and financials in plain English.
- [SEC's free EDGAR APIs vs a filings search API: what each is for](https://www.quantisnow.com/sec-api/guides/sec-edgar-api-vs-data-sec-gov.md): What data.sec.gov, EDGAR full-text search and the bulk files give you for free, where they stop, and when a search API saves the work.
- [All guides](https://www.quantisnow.com/sec-api/guides.md): How-to guides with code and real responses.

Quantisnow is not affiliated with or endorsed by the U.S. Securities and Exchange Commission. EDGAR is the SEC's filing system; the filings themselves are public records.
