# Exports

Any stored result can be downloaded as JSON or CSV, and most as a PDF report: a single check, a bulk job,
a comparison or a monitor's history. Exports are free and need a free account.

## Exporting from the website

Under a finished result, choose **Export**, then the format:

- **JSON**: the result exactly as the API returns it. A job exports as the job and all its rows.
- **CSV**: one row per finding for a single check; one row per target for a job, with its status,
  summary, score, credits and the failing and warning findings; one row per finding with a column per
  domain for a comparison. The file opens in Excel, Numbers and Google Sheets.
- **PDF report**: a printable report with the verdict, the findings grouped by severity with their fixes,
  and the details. It takes a few seconds; then choose **Download PDF**.
- **Calendar (ICS)**: for the domain expiry calendar, every renewal date as a calendar event.

JSON, CSV and calendar files are made as you download them and never stored. PDFs are kept for 24 hours
so you can download them again, then deleted.

## What can be exported

Results stay exportable as long as we keep them: 24 hours for a single check or a comparison, and 7 days
for a bulk job's rows. After that, run the check again, then export it.

WHOIS results export as JSON or CSV only, never as PDF, so registration details are never printed into a
stored file. A comparison's PDF leaves its WHOIS cells out and says so.

## White-label PDFs

On the Agency plan, PDFs can carry your company name, logo, accent colour and footer instead of ours, with
no mention of DNS Super and no links to our fix guides (the fix text stays in the report). Set them up
under [Branding](/app/settings/branding); only the account owner can change them. A light accent colour is
darkened in the PDF until text in it is easy to read.

## Limits

- 60 exports an hour per account.
- PDFs: 5 an hour on the Free plan and 20 an hour on paid plans, at most 5 ready to download at once and
  30 MB of PDFs per account. Download or delete one to make room.
- A PDF has at most 100 pages, and a job's PDF lists its first 500 rows; export larger jobs as CSV.

## By API

Send `POST /v1/exports` with a `source` and a `format` (`json`, `csv`, `pdf` or `ics`):

- `{"kind": "call", "request_id": "…"}`: a single check, by the `X-Request-Id` you sent with it.
- `{"kind": "job", "job_id": "…"}`, or with `"row": 3` for one row.
- `{"kind": "compare", "request_id": "…"}`: a comparison.
- `{"kind": "monitor", "monitor_id": "…", "since": "2026-11-01"}`: a monitor's events.

JSON, CSV and ICS come straight back as a file download. A PDF answers `202` with the export: poll
`GET /v1/exports/{id}` until its `status` is `done`, then download `GET /v1/exports/{id}/file` with the same
API key. `GET /v1/exports` lists your PDFs and `DELETE /v1/exports/{id}` removes one. A retry with the same
`X-Request-Id` returns the same PDF export. Add `"branding": "none"` to get a standard PDF on the Agency
plan.

curl: a job as CSV, then a call as PDF

```sh
curl -X POST "https://api.dnssuper.com/v1/exports" \
  -H "Authorization: Bearer $DNSSUPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source": {"kind": "job", "job_id": "<job id>"}, "format": "csv"}' \
  -o results.csv

curl -X POST "https://api.dnssuper.com/v1/exports" \
  -H "Authorization: Bearer $DNSSUPER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source": {"kind": "call", "request_id": "<request id>"}, "format": "pdf"}'
```

Python: a PDF, polled until it is ready

```python
import os
import time

import httpx

api = httpx.Client(base_url="https://api.dnssuper.com", headers={"Authorization": f"Bearer {os.environ['DNSSUPER_API_KEY']}"})
export = api.post("/v1/exports", json={"source": {"kind": "job", "job_id": "<job id>"}, "format": "pdf"}).json()
while export["status"] in ("queued", "running"):
    time.sleep(2)
    export = api.get(f"/v1/exports/{export['id']}").json()
if export["status"] == "done":
    pdf = api.get(f"/v1/exports/{export['id']}/file")
    open(export["filename"], "wb").write(pdf.content)
```

TypeScript: JSON

```ts
const response = await fetch("https://api.dnssuper.com/v1/exports", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.DNSSUPER_API_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ source: { kind: "job", job_id: "<job id>" }, format: "json" }),
});
const { job, items } = await response.json();
console.log(job.status, items.length);
```

## Questions

### Is a CSV safe to open in a spreadsheet?

Yes. Every cell is quoted, and text that a spreadsheet could read as a formula is written so it stays
text.

### Why did my PDF fail?

The PDF printer may have been busy for a few minutes, or the result was too large for 100 pages. Export
it again, or export it as CSV.

### Do exports cost credits?

No. Exports are free and don't show up in your usage.
