---
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.
  - `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.

## Other responses

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

---

[API](https://skmtc.net/deno/apis/jsr.md) · [All operations](https://skmtc.net/deno/apis/jsr/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deno/jsr/revisions/3d37ac9b68f7/schema)
