Skip to main content
GET
/
v3
/
documents
/
{id}
/
chunks
Get document chunks
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.supermemory.ai/v3/documents/{id}/chunks', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "documentId": "<string>",
  "chunks": [
    {
      "id": "<string>",
      "position": 123,
      "content": "<string>",
      "type": "<string>",
      "createdAt": "<string>",
      "metadata": {}
    }
  ],
  "total": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

Document chunks retrieved successfully

Response for document chunks endpoint

documentId
string
required

The document ID

chunks
object[]
required

Ordered list of chunks

total
number
required

Total number of chunks