# Download a RAG snapshot

URL: https://docs.healthcare.dev/reference/datasets/download-a-rag-snapshot

```http
GET https://api.healthcare.dev/v1/datasets/{dataset}/snapshots/{version}
```

Team plan (403 `plan-upgrade-required` below Team); never counts as a billable call. One snapshot's manifest plus a signed download URL for each file, valid for 15 minutes (`expires_at`) and needing no API key. `latest` is the newest snapshot. Check each file against the manifest's `sha256` after downloading.

Requires an API key: `Authorization: Bearer hdev_live_...`. See [Authentication](/authentication).

## Path parameters

| Name | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| `dataset` | string | yes | Dataset id: one of `hcpcs`, `icd10cm`, `icd10pcs`, `ndc`, `rxnorm` | `icd10cm` |
| `version` | string | yes | A release (`data_version`) from the list, or `latest` | `latest` |

## Examples

**curl**

```sh
curl "https://api.healthcare.dev/v1/datasets/icd10cm/snapshots/latest" \
  -H "Authorization: Bearer $HDEV_API_KEY"
```

**TypeScript**

```ts
const res = await fetch("https://api.healthcare.dev/v1/datasets/icd10cm/snapshots/latest", {
  headers: { Authorization: `Bearer ${process.env.HDEV_API_KEY}` },
});
const { data, meta } = await res.json();
```

**Python**

```python
import os
import requests

res = requests.get("https://api.healthcare.dev/v1/datasets/icd10cm/snapshots/latest", headers={"Authorization": f"Bearer {os.environ['HDEV_API_KEY']}"})
body = res.json()
```

## Response

The snapshot with download URLs

```json
{
  "data": {
    "format": "hdev-rag-snapshot/1",
    "dataset": "string",
    "name": "string",
    "version": "string",
    "effective_date": "2026-10-01",
    "published_at": "2026-10-24T12:00:00Z",
    "created_at": "2026-10-24T12:00:00Z",
    "records": 0,
    "chunks": 0,
    "embedding": {
      "id": "string",
      "dims": 1,
      "dtype": "float32",
      "byte_order": "little-endian",
      "normalized": true,
      "metric": "cosine",
      "file": "string",
      "rows": 0
    },
    "files": [
      {
        "path": "string",
        "bytes": 0,
        "sha256": "string",
        "content_type": "string",
        "gzip": true
      }
    ],
    "source": {
      "source": "string",
      "source_url": "string",
      "source_sha256": "string",
      "pipeline_version": "string"
    },
    "license": {
      "license": "string",
      "terms": {
        "display": "string",
        "attribution": "string",
        "url": "string"
      },
      "file": "string"
    },
    "latest": true,
    "downloads": [
      {
        "path": "string",
        "url": "string"
      }
    ],
    "expires_at": "2026-10-24T12:00:00Z"
  },
  "meta": {
    "source": "cms-icd10",
    "data_version": "2026.1",
    "retrieved_at": "2026-10-24T12:00:00Z",
    "license": "Public domain (CMS). Reference data, not medical advice."
  },
  "links": {
    "self": "/v1/datasets/icd10cm/snapshots/latest",
    "next": null
  }
}
```

### Fields

| Field | Type | Always present | Description |
| --- | --- | --- | --- |
| `format` | "hdev-rag-snapshot/1" | yes |  |
| `dataset` | string | yes | Dataset id, e.g. `icd10cm` |
| `name` | string | yes | Dataset name |
| `version` | string | yes | The release (`data_version`) |
| `effective_date` | string \| null (date) | yes | When the release takes effect |
| `published_at` | string (date-time) | yes | When we published the release |
| `created_at` | string (date-time) | yes | When the snapshot was built |
| `records` | integer | yes | Active records in the release (retired records are left out) |
| `chunks` | integer | yes | Lines in the chunks file: one per active record with text |
| `embedding` | SnapshotEmbedding | yes |  |
| `files` | SnapshotFile[] | yes | Every file except the manifest itself, with its size and SHA-256 |
| `source` | object | yes | Where the release came from, as in each response's `meta` |
| `license` | object | yes | What you may do with the data; the same text is in `LICENSE.txt` |
| `latest` | boolean | yes | True for the newest snapshot of the dataset |
| `downloads` | SnapshotDownload[] | yes | One signed URL per file, the manifest included |
| `expires_at` | string (date-time) | yes | When the download URLs stop working |

## Errors

Errors are `application/problem+json` ([RFC 9457](https://www.rfc-editor.org/rfc/rfc9457)). Branch on `type`, not on `title`. See [Errors](/errors).

| Status | `type` | When |
| --- | --- | --- |
| 400 | `invalid-request` | A parameter or the body failed validation; `errors` lists each field. |
| 401 | `unauthorized` | Missing, malformed or revoked API key. |
| 403 | `plan-upgrade-required` | The plan doesn't include this feature; `required_plan` names the plan that does. |
| 404 | `not-found` | No record with that id (retired records are still returned). |
| 429 | `rate-limited / quota-exceeded` | Too many requests per second (retry after `Retry-After`), or the monthly quota is used up. |
| 503 | `dataset-unavailable / unavailable` | The dataset has no published version yet, or the service is degraded. |
