---
title: "Read a text file"
method: GET
path: "/files/content"
tags: ["Files"]
---

# Read a text file

`GET /files/content`

## Request

- Base URL: `https://api.deepnote.com/v2`
- URL: `https://api.deepnote.com/v2/files/content`
- Auth: HTTP bearer

Returns a small text file, or a range of its lines, for agents that read and edit project files such as scripts, configs, or CSVs. Not meant for large or binary files; download those with `GET /files/download`.

## Query parameters

- `projectId` string, uuid, required: Project that contains the file.
- `path` string, required: File path within the project.
- `startLine` integer: First line to read, starting at 1.
- `endLine` integer: Last line to read, inclusive.

## Response `200`

File content

- ReadFileResponse
  - `content` string, required
  - `startLine` integer, required
  - `endLine` integer, required
  - `hasMore` boolean, required: Whether the file continues after `endLine`.

## Other responses

- `400`: Validation error, path is not a file, or the requested lines cannot be read
- `401`: Unauthorized
- `403`: Insufficient permissions
- `404`: File not found
- `409`: Project is suspended
- `429`: Rate limit exceeded

## Changes

- **2026-10-30** `107b37922b3a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/deepnote/apis/deepnote-public-api/changes/files/content/get.md)

---

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