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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Download Scrapfly crawl artifact

> Download a completed Scrapfly crawl as WARC or HAR.

`scrapfly.downloadCrawlArtifact` returns the crawler's archival artifact as a durable `Blob`.

```ts theme={null}
import { automation, onInvocation } from "automate.ax"
import { scrapfly } from "automate.ax/scrapfly"

export default automation("Download crawl archive", () => {
  onInvocation()
  scrapfly.downloadCrawlArtifact({ crawlerId: "crawl-id", type: "warc" })
})
```

`crawlerId` is required. `type` is `warc` or `har` and defaults to `warc`. Returns `{ artifact, type }`; WARC blobs use `application/gzip` and HAR blobs use `application/json`. Request the artifact after the crawler reaches a terminal state.
