> ## 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.

# GET /v1/artifacts/{artifact_id}/export

> Export one persisted artifact as JSON, compact JSON, or a markdown download envelope

Export one persisted artifact as JSON, compact JSON, or a markdown download envelope

<Info>
  Audience: developers choosing a structured handoff or markdown download for one persisted artifact.
</Info>

## Coverage and source scope

Returns the saved artifact with its manifest for `json` or `compact_json`. With `format=markdown`, the response is a download envelope rather than inline markdown; follow its download details. Compact JSON is intentionally reduced and may truncate large content or arrays.

## Canonical metadata

* `artifactId`
* `format`
* `manifest`
* `artifact`
* `download`

## Example request

<RequestExample>
  ```bash theme={null}
  curl -X GET -H "x-api-key: $SECAPI_API_KEY" -H "secapi-version: 2026-03-19" "https://api.secapi.ai/v1/artifacts/art_example_123/export?format=compact_json"
  ```
</RequestExample>

## Example response

<ResponseExample>
  ```json theme={null}
  {
    "object": "artifact_export",
    "artifactId": "art_example_123",
    "format": "compact_json",
    "manifest": {
      "object": "artifact_manifest",
      "id": "aman_example_123",
      "artifactId": "art_example_123",
      "kind": "markdown_bundle",
      "status": "ready",
      "filename": "aapl-10-k-item-1a.md",
      "contentType": "text/markdown; charset=utf-8",
      "storageMode": "local",
      "objectKey": null,
      "byteLength": 18432,
      "lineCount": 420,
      "checksumSha1": "example_checksum",
      "filing": {
        "accessionNumber": "0000320193-25-000079",
        "form": "10-K",
        "filingUrl": "https://www.sec.gov/Archives/edgar/data/320193/000032019325000079/aapl-20250927_htm.xml"
      },
      "section": {
        "key": "item_1a",
        "title": "Risk Factors"
      },
      "exportedFormats": [
        "json",
        "markdown",
        "compact_json"
      ],
      "createdAt": "2026-03-19T12:00:00.000Z"
    },
    "artifact": {
      "object": "artifact",
      "id": "art_example_123",
      "kind": "markdown_bundle",
      "status": "ready"
    }
  }
  ```
</ResponseExample>

## Format selection

Omit `format` or use `format=json` for the stored artifact object and manifest. `format=markdown` returns a download envelope rather than inline markdown. `format=compact_json` returns a reduced representation: large `contentMd` or `content` strings are truncated, snippets are shortened, and arrays are capped, so it is not a lossless archive format.

## Errors

A missing, inaccessible, or failed export returns `404 artifact_export_failed`.

## Give this prompt to your agent

<Prompt>
  Use SEC API GET /v1/artifacts/{artifact_id}/export to export one persisted artifact as JSON, compact JSON, or a markdown download envelope. Preserve `artifactId`, `format`, `manifest`, `artifact`, `download` in the output. Return a concise markdown summary plus the exact structured payload fields that a downstream engineer or agent should keep using this result.
</Prompt>

## Failure posture

* use full JSON or download when a workflow needs lossless saved content
* label compact JSON as reduced when passing it to a reviewer
* retain the manifest and artifact ID with every export
