---
title: "Get package version source"
method: GET
path: "/scopes/{scope}/packages/{package}/versions/{version}/source"
---

# Get package version source

`GET /scopes/{scope}/packages/{package}/versions/{version}/source`

Returns the rendered source code of a file or a directory listing for a package version

## Path parameters

- `scope` string, required — The name of a scope. This must not be @ prefixed.
- `package` string, required — The name of a package.
- `version` string, required

## Query parameters

- `path` string

## Response `200`

OK

- PackageVersionSource
  - `version` PackageVersion, required
    - `scope` string, required — The name of a scope. This must not be @ prefixed.
    - `package` string, required — The name of a package.
    - `version` string, required — A semantic version.
    - `yanked` boolean, required — Whether the version has been yanked.
    - `usesNpm` boolean, required — Whether the version uses npm dependencies.
    - `newerVersionsCount` integer, required — The number of newer versions.
    - `lifetimeDownloadCount` integer, required — The total number of downloads for this version.
    - `rekorLogId` string, nullable — Rekor log ID for the published package version.
    - `license` string, nullable — The license of the package version.
    - `readmePath` string, nullable — The path to the readme file in the package.
    - `createdAt` string, date-time, required — The date and time when the package version was created.
    - `updatedAt` string, date-time, required — The date and time when the package version was last updated.
    - `symbolCount` integer, nullable — The number of symbols documented by this version. Null for versions published before this count was recorded.
  - `css` string, required — CSS for styling the source view.
  - `comrakCss` string, required — CSS for comrak markdown rendering.
  - `script` string, required — JavaScript for the source view.
  - `source` union, required
    - object
      - `kind` 'dir', required
      - `entries` SourceDirEntry[], required
        - `name` string, required — The name of the file or directory.
        - `size` integer, required — Size in bytes.
        - `kind` 'dir' | 'file', required — Whether this entry is a directory or file.
    - object
      - `kind` 'file', required
      - `size` integer, required — Size of the file in bytes.
      - `view` string, nullable — HTML-rendered source code view. Null for binary files.
      - `rendered` string, nullable — Rendered HTML, present for markdown files.

## Other responses

- `400` — Invalid request
- `404` — Package version or path not found

## Changes

- **2026-08-25** `abb153728b13` — 1 info
  - added the optional property `version/symbolCount` to the response with the `200` status
- **2026-08-25** `32a1de340efa` — 1 info
  - added the optional property `source/oneOf[subschema #2]/rendered` to the response with the `200` status
- **2026-02-06** `0c4e8d8a5c2a` — 1 info
  - endpoint added
- **2024-02-28** `f8d3b912d946` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/jsr-io/apis/jsr-api/changes/scopes/:scope/packages/:package/versions/:version/source/get.md)

---

[API](https://skmtc.dev/jsr-io/apis/jsr-api.md) · [All operations](https://skmtc.dev/jsr-io/apis/jsr-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jsr-io/jsr-api/revisions/abb153728b13/schema)
