# Bulk delivery

Daily snapshot files, exports over many listings, and webhooks, at the credits of the same rows read call by call.

Bulk delivery has no price of its own. A snapshot or an export costs the credits of the calls it is made of, as each route charges them, and a listing or record the dataset holds nothing for is free, as it is through the route.

## Daily snapshots

A snapshot is a whole dataset as its route lists it, read once each UTC day is over, as gzipped NDJSON and as Parquet. Listing them is free and needs no key:

```bash
curl "https://api.gloom.sh/v1/datasets/transcripts/snapshots"
```

```json
{
  "data": [
    {
      "dataset": "transcripts",
      "date": "2026-10-26",
      "rows": 3708,
      "credits": 37156,
      "files": [{ "format": "ndjson", "bytes": 90000000, "sha256": "…" }],
      "path": "/v1/datasets/transcripts/snapshots/2026-10-26"
    }
  ],
  "meta": { "endpoint": "transcripts.list", "retentionDays": 7 }
}
```

`credits` is what that day's rows cost through the routes: here 19 pages of `/v1/transcripts` at 4 credits and 3,708 transcripts at 10. `files` gives each format's size in bytes and its SHA-256. Ask for a day, or `latest`, to get its files:

```bash
curl "https://api.gloom.sh/v1/datasets/transcripts/snapshots/latest" \
  -H "Authorization: Bearer $GLOOM_DATASETS_KEY"
```

The answer gives each file's `url`, a signed link good for an hour, and charges the snapshot's `credits`. Each request is charged. Send an `Idempotency-Key` header to make a retry safe: for 24 hours the same key gives back the same snapshot, uncharged, with new links each time.

A day's earnings and IPOs are the ones dated that day, and Congress trades are that year's filings. Snapshots exist for awards, catalysts, central bank rates, Congress trades, COT, CPI, credit documents, depositary receipts, earnings, energy inventories, GPU prices, hiring jobs and momentum, IPOs, M&A, perpetuals, app attention and transcripts. A dataset read company by company is delivered by export.

## Exports

An export reads one route for many listings, or many record ids, into one file. It takes the route's own parameters, so a date range, `asOf` and `fields` work as on a call. Price it first, free and without a key:

```bash
curl -X POST "https://api.gloom.sh/v1/datasets/cost" \
  -H "Content-Type: application/json" \
  -d '{"endpoint":"transcripts.detail","ids":["…"],"format":"parquet"}'
```

The quote is one call per id at the route's price: 10 credits a transcript, so a corpus of 3,708 transcripts costs 37,080 credits. For `/filings`, a paged route, it prices one page a listing, and `estimate` gives each listing's rows and the pages and credits reading all of them takes, counted from what Gloom holds, with `exact` false where part is estimated. Its notices name listings of one filer, such as `TM` and `7203.T`, and listings with no SEC filer, which are free. Without a key, an address has 300 listings counted a minute. Then start it:

```bash
curl -X POST "https://api.gloom.sh/v1/exports" \
  -H "Authorization: Bearer $GLOOM_DATASETS_KEY" \
  -H "Idempotency-Key: corpus-2026-10-27" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint": "short-volume.history",
    "symbols": ["AAPL", "MSFT", "NVDA"],
    "params": { "asOf": "2026-06-30" }
  }'
```

- It answers `202` with the export and holds back its quote, or `maxCredits` when you send one.
- When it is done it charges what its calls cost and gives back the rest. `missing`, `failed` and `truncated` name the listings it did not read, and `reasons` says why for each one missing or failed.
- `complete` says whether the file holds every row asked for. It is `false` when a listing in `truncated` was stopped short or one in `failed` could not be read, and for a failed export. Each `truncated` entry gives its `reason`. `maxCredits`: the credits ran out (the quote, unless you sent one). A paged route's quote covers one page per listing, not its whole history: an export reads every listing's first page before any listing's second, then further pages in listing order while `maxCredits` lasts, so each listing gets the page it was quoted and a long history stops at its `nextCursor`. Read the rest through the route, with the export's `params`, that listing as `symbols` and its `nextCursor` as `cursor` (null: from the start), or export it again with a larger `maxCredits`. `depth`: the route pages no deeper, as its `depth_limit` notice says (Search and SEC lists stop 5,000 rows deep). Read the rest with a narrower window, such as an earlier `to` on `/filings` or `until` on `/insider-trades`.
- `GET /v1/exports/{id}` gives its state and, once `completed`, signed links to its file. Polling is free. While it runs, `calls` and `read` say how far it is, recorded about every 30 seconds; `rows` is set once it is done.
- The same `Idempotency-Key` with the same body gives back the same export; with another body, `409 idempotency_conflict`.
- A company route takes up to 1,000 `symbols`, a record route up to 10,000 `ids`. A file holds at most 2,000,000 rows.

An export reads at up to half its key's per-minute limit, so your own calls keep the rest: the 3,708 transcripts take about four hours on Basic and one on Desk. An export that fails mid-way is run again from the start, at most 3 times. An export not done within 72 hours fails too, and either way it gives back everything it held.

## Webhooks

Register an https URL to hear when an export is done, or when a dataset's new snapshot holds other rows than the day before:

```bash
curl -X POST "https://api.gloom.sh/v1/webhooks" \
  -H "Authorization: Bearer $GLOOM_DATASETS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/gloom","datasets":["transcripts"]}'
```

The answer holds the endpoint's `secret`, shown this once. Each event is a JSON `POST` with a `Gloom-Signature` header, `t=<unix seconds>,v1=<hex>`, the HMAC-SHA256 of `t.body` with the secret:

```js
import { createHmac, timingSafeEqual } from "node:crypto"

function verify(secret, header, body) {
  const { t, v1 } = Object.fromEntries(header.split(",").map((p) => p.split("=")))
  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false
  const expected = createHmac("sha256", secret).update(`${t}.${body}`).digest()
  const given = Buffer.from(v1, "hex")
  return given.length === expected.length && timingSafeEqual(given, expected)
}
```

- Answer with a `2xx`. Anything else is tried again after 1, 5, 30, 120, 360, 720 and 1,440 minutes, then given up.
- The URL must use https on port 443 and reach a public address. Redirects are not followed.
- `Gloom-Event-Id` names each event once; a retry sends the same one.
- An account has up to 5 endpoints. `GET /v1/webhooks` lists them and `DELETE /v1/webhooks/{id}` removes one.

## Retention

Snapshot and export files are kept 7 days. They are made from the data Gloom stores, which is never deleted: a later snapshot, or the same export run again, gives the rows again.

Over [MCP](https://gloom.sh/datasets/docs/mcp), `export_quote`, `export_create`, `export_get`, `snapshot_list` and `snapshot_get` do the same, at the same credits.

- [Previous Point in time](https://gloom.sh/datasets/docs/point-in-time)
- [Next Streaming](https://gloom.sh/datasets/docs/streaming)
