> ## Documentation Index
> Fetch the complete documentation index at: https://docs.secapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Make your first SEC API request

> Send one authenticated issuer-resolution request and use its result as the start of a source-backed workflow

You need an API key and a shell. Keep the key in the process that makes the request; do not put it in browser code, a URL, or a repository.

## Create a key and set it once

Create an account at [secapi.ai/signup](https://secapi.ai/signup), create an API key in the signed-in [dashboard](https://secapi.ai/app), then set it for your shell:

```bash theme={null}
export SECAPI_API_KEY="secapi_..."
```

<Warning>
  SEC API machine requests use the `x-api-key` header. An API key is not an `Authorization: Bearer` token.
</Warning>

## 1. Resolve the issuer

Resolve `AAPL` to the API's current entity record before requesting a filing. It is a small request with a response you can inspect before you add filing retrieval, pagination, or automation.

```bash theme={null}
curl --fail-with-body -sS \
  -H "x-api-key: $SECAPI_API_KEY" \
  -H "secapi-version: 2026-03-19" \
  "https://api.secapi.ai/v1/entities/resolve?ticker=AAPL&view=agent"
```

## Expected response

```json theme={null}
{
  "company": {
    "name": "Apple Inc.",
    "ticker": "AAPL",
    "cik": "0000320193"
  },
  "requestId": "req_..."
}
```

Carry the returned CIK, ticker, and company name forward. Do not infer a CIK from a ticker string or from an old filing URL.

Expect a JSON entity-resolution response containing the matched entity identity and `requestId`. `view=agent` is a compact response shape with identifiers and match metadata; it does not promise every field from another response shape.

If this returns `401 missing_api_key`, the request did not include `x-api-key`. If it returns `401 authentication_failed`, the supplied key was not accepted. Do not switch the key to a bearer header to fix either error.

## 2. Turn success into a filing result

Once entity resolution works, retrieve the issuer's latest 10-K. This request returns the current latest matching filing, so the accession number can change after a new filing.

```bash theme={null}
curl --fail-with-body -sS \
  -H "x-api-key: $SECAPI_API_KEY" \
  -H "secapi-version: 2026-03-19" \
  "https://api.secapi.ai/v1/filings/latest?ticker=AAPL&form=10-K&view=agent"
```

Before summarizing or storing the result, preserve these fields when the response includes them:

* `accessionNumber`
* `form`
* `filingDate`
* `filingUrl`
* `requestId`

Those fields are the minimum filing citation artifact: identify the source as `Apple Inc. 10-K, filed <filingDate>, accession <accessionNumber>, <filingUrl>`. Keep any returned `provenance`, `freshness`, `materialization`, warning, and trace fields alongside it; availability varies by route and response view.

## Choose the next implementation step

| You are building                      | Go next                                     |
| ------------------------------------- | ------------------------------------------- |
| An HTTP integration                   | [First request flows](/first-request-flows) |
| A JavaScript, Python, Go, or Rust app | [Libraries and SDKs](/libraries-and-sdks)   |
| A shell workflow                      | [CLI](/cli)                                 |
| An agent client                       | [Install MCP](/mcp-install)                 |

If you need to separate authentication problems from API availability, check `https://api.secapi.ai/healthz` after the failed request and include both response identifiers in the support note.

For response behavior, versions, and retries, read [API conventions](/api-conventions). For a failing request, capture its response and continue with [request diagnostics](/request-diagnostics).
