> ## Documentation Index
> Fetch the complete documentation index at: https://novita.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Snapshots

You can list all snapshots, or narrow the list to those created from a specific sandbox.

***

## List snapshots

Call the method and page through the results. Each page is a list of `SnapshotInfo`.

<CodeGroup>
  ```python Python icon="python" theme={"system"}
  import os
  from novita_sandbox import Novita

  novita = Novita(api_key=os.getenv("NOVITA_API_KEY", ""))
  paginator = novita.sandbox.list_snapshots(limit=20)

  while paginator.has_next:
      snapshots = paginator.next_items()
      for s in snapshots:
          print(s.snapshot_id)
  ```

  ```js JavaScript & TypeScript icon="js" theme={"system"}
  import { Novita } from 'novita-sandbox'

  const novita = new Novita({
    apiKey: process.env.NOVITA_API_KEY || '',
  })

  const paginator = novita.sandbox.listSnapshots({ limit: 20 })

  while (paginator.hasNext) {
    const snapshots = await paginator.nextItems()
    for (const s of snapshots) {
      console.log(s.snapshotId)
    }
  }
  ```
</CodeGroup>

***

## Filter by source sandbox

Pass a sandbox ID to list only the snapshots created from that sandbox.

<CodeGroup>
  ```python Python icon="python" theme={"system"}
  import os
  from novita_sandbox import Novita

  novita = Novita(api_key=os.getenv("NOVITA_API_KEY", ""))
  sandbox_id = "<sandboxID>"
  paginator = novita.sandbox.list_snapshots(sandbox_id=sandbox_id)

  while paginator.has_next:
      for s in paginator.next_items():
          print(s.snapshot_id)
  ```

  ```js JavaScript & TypeScript icon="js" theme={"system"}
  import { Novita } from 'novita-sandbox'

  const novita = new Novita({
    apiKey: process.env.NOVITA_API_KEY || '',
  })
  const sandboxId = '<sandboxID>'

  const paginator = novita.sandbox.listSnapshots({ sandboxId })

  while (paginator.hasNext) {
    for (const s of await paginator.nextItems()) {
      console.log(s.snapshotId)
    }
  }
  ```
</CodeGroup>
