---
title: "Download a run's hooks as CSV, JSON or Markdown"
method: GET
path: "/v1/runs/{run_id}/export"
tags: ["research"]
---

# Download a run's hooks as CSV, JSON or Markdown

`GET /v1/runs/{run_id}/export`

## Request

- Base URL: `https://api.hookdetector.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.hookdetector.com/v1/runs/{run_id}/export`
- Auth: none declared

The hooks of a finished run as a file, one row or section per hook, ready to open
in a spreadsheet or paste into notes. CSV cells that a spreadsheet would run as a
formula are prefixed with a quote. With bom=true a csv starts with the UTF-8
byte-order mark for Excel. 409 run_not_finished while the run is in flight.
Free. MCP: export_run.

## Path parameters

- `run_id` string, uuid, required

## Query parameters

- `format` 'csv' | 'json' | 'md': csv (opens in any spreadsheet), json or md
- `bom` boolean: csv only: start the file with the UTF-8 byte-order mark, so Excel opens it as UTF-8 (curly quotes, emoji, accents). Leave it off when a program reads the file

## Headers

- `authorization` string, nullable: Bearer hd_... from POST /v1/accounts or POST /v1/keys

## Response `200`

the file, as an attachment

- string

## Other responses

- `401`: missing, invalid, revoked or expired API key (code key_expired)
- `403`: the key lacks the scope this call needs (insufficient_scope), or its credit_limit is spent (key_credit_limit_reached)
- `404`: not found on this account
- `409`: conflict with the account's state
- `413`: request body over the size cap
- `422`: invalid input
- `500`: our fault; names the request id

---

[API](https://skmtc.dev/hookdetector/apis/hook-detector.md) · [All operations](https://skmtc.dev/hookdetector/apis/hook-detector/llms.txt) · [OpenAPI document](https://skmtc.dev/hookdetector/apis/hook-detector/revisions/b136a2804d2b?raw)
