x-api-key. Use the endpoint reference for the request shape and response fields of the route you call.
Authenticate and version requests
Machine requests usex-api-key; do not put an API key in Authorization: Bearer. Browser-only account actions require a signed-in browser session. A human bearer credential is required only where the endpoint reference says so.
Use secapi-version to request a dated API version. When it is omitted, SEC API resolves the current published version and returns it in SECAPI-Version. A pinned version can receive additive fields, so parse the fields your application uses and tolerate additional fields.
Keep the evidence that identifies a result
For a material response, store the returnedRequest-Id, traceparent when present, endpoint, parameters, and retrieval time. For filing-backed results, also retain the accession number, filing URL, period, units, and any route-specific provenance, freshness, warning, or capability fields.
You may send x-request-id to correlate a request with your own logs. Keep the returned Request-Id too: it identifies the API request if you need to diagnose it.
Request only the response view you use
Some endpoints supportview=default, view=compact, or view=agent.
defaultis the full documented response.compactis a smaller endpoint-specific projection.agentis an endpoint-specific projection for retrieval and citation-oriented workflows.
Continue list results correctly
When a response returnshasMore and nextCursor, use nextCursor as the next request’s cursor; stop when hasMore is false. Some list endpoints do not paginate. Their reference defines their limit and pagination contract.
Handle failures by status and code
Error responses provide a machine-readablecode, message, and request ID. Read them before retrying.
Do not retry a billing, budget, quota, or authorization stop until its stated condition changes. See Troubleshooting for code-specific next actions.
Interpret financial periods before comparing values
CheckperiodBasis where an endpoint provides it. Balance-sheet values are point-in-time; quarterly income-statement and cash-flow values can be year-to-date as filed. Also compare units, reporting periods, and source context before treating values as comparable.
Use REST or an SDK when you need direct control of the request and response. Use hosted MCP when an MCP-aware client needs SEC API tools. Begin with your first request.
