---
title: "Read an exact line range from an asset's text"
method: GET
path: "/api/v1/assets/{assetId}/text/lines"
tags: ["Assets"]
---

# Read an exact line range from an asset's text

`GET /api/v1/assets/{assetId}/text/lines`

## Request

- Base URL: `https://api-docs.busabase.com`
- URL: `https://api-docs.busabase.com/api/v1/assets/{assetId}/text/lines`
- Auth: none declared

## Path parameters

- `assetId` string, required

## Query parameters

- `startLine` integer, required: First line to read. 1-indexed, and INCLUSIVE.
- `endLine` integer, required: Last line to read, INCLUSIVE. A range wider than 2000 lines is silently narrowed to the first 2000 rather than rejected — the response reports `lineCountCapped` when that happened, so check it before concluding the file ends there.

## Response `200`

Lines [startLine, endLine] (range capped at 2000 lines / ~2MB response) read via a storage byte-range request — the server never loads the whole object, even for a multi-GB file.

- object
  - `lines` string[], required
  - `totalLines` integer, required
  - `truncated` boolean, required

---

[API](https://skmtc.dev/busabase/apis/busabase-api.md) · [All operations](https://skmtc.dev/busabase/apis/busabase-api/llms.txt) · [OpenAPI document](https://skmtc.dev/busabase/apis/busabase-api/revisions/bc6a7d5ff4c1?raw)
