Skip to content
Get started

Get document

client.documents.get(stringid, RequestOptionsoptions?): DocumentGetResponse { id, connectionId, content, 16 more }
GET/v3/documents/{id}

Get a document by ID

ParametersExpand Collapse
id: string
ReturnsExpand Collapse
DocumentGetResponse { id, connectionId, content, 16 more }

Document object

id: string

Unique identifier of the document.

minLength22
maxLength22
connectionId: string | null

Optional ID of connection the document was created from. This is useful for identifying the source of the document.

minLength22
maxLength22
content: string | null

The content to extract and process into a document. This can be a URL to a website, a PDF, an image, or a video.

Plaintext: Any plaintext format

URL: A URL to a website, PDF, image, or video

We automatically detect the content type from the url’s response format.

createdAt: string

Creation timestamp

formatdatetime
customId: string | null

Optional custom ID of the document. This could be an ID from your database that will uniquely identify this document.

maxLength255
dreamingStatus: "dreaming" | "done"
One of the following:
"dreaming"
"done"
filepath: string | null
metadata: string | number | boolean | 2 more | null

Optional metadata for the document. This is used to store additional information about the document. You can use this to store any additional information you need about the document. Metadata can be filtered through. Keys must be strings and are case sensitive. Values can be strings, numbers, or booleans. You cannot nest objects.

One of the following:
string
number
boolean
Record<string, unknown>
Array<unknown>
ogImage: string | null
raw: unknown

Raw content of the document

source: string | null

Source of the document

maxLength255
status: "unknown" | "queued" | "extracting" | 5 more

Status of the document

One of the following:
"unknown"
"queued"
"extracting"
"chunking"
"embedding"
"indexing"
"done"
"failed"
summary: string | null

Summary of the document content

taskType: "memory" | "superrag"

Task type: “memory” (default) for full context layer with SuperRAG built in, “superrag” for managed RAG as a service.

One of the following:
"memory"
"superrag"
title: string | null

Title of the document

type: "text" | "pdf" | "tweet" | 10 more

Type of the document

One of the following:
"text"
"pdf"
"tweet"
"google_doc"
"google_slide"
"google_sheet"
"image"
"video"
"audio"
"notion_doc"
"webpage"
"onedrive"
"github_markdown"
updatedAt: string

Last update timestamp

formatdatetime
DeprecatedcontainerTags?: Array<string>

Optional tags this document should be containerized by. This can be an ID for your user, a project ID, or any other identifier you wish to use to group documents.

url?: string | null

URL of the document

Get document

import Supermemory from 'supermemory';

const client = new Supermemory({
  apiKey: process.env['SUPERMEMORY_API_KEY'], // This is the default and can be omitted
});

const document = await client.documents.get('id');

console.log(document.id);
{
  "id": "acxV5LHMEsG2hMSNb4umbn",
  "connectionId": "xxxxxxxxxxxxxxxxxxxxxx",
  "content": "Our API rate limits are 100 req/min on free and 1000 on pro.",
  "createdAt": "2025-04-15T09:30:00.000Z",
  "customId": "doc-api-rate-limits",
  "dreamingStatus": "dreaming",
  "filepath": "filepath",
  "metadata": {
    "source": "bar",
    "language": "bar"
  },
  "ogImage": "ogImage",
  "raw": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s.",
  "source": "text",
  "status": "done",
  "summary": "API rate limit policy: 100 req/min free, 1000 req/min pro.",
  "taskType": "memory",
  "title": "API Rate Limiting Policy",
  "type": "text",
  "updatedAt": "2025-04-15T09:31:00.000Z",
  "containerTags": [
    "string"
  ],
  "url": "https://docs.example.com/guides/rate-limits"
}
Returns Examples
{
  "id": "acxV5LHMEsG2hMSNb4umbn",
  "connectionId": "xxxxxxxxxxxxxxxxxxxxxx",
  "content": "Our API rate limits are 100 req/min on free and 1000 on pro.",
  "createdAt": "2025-04-15T09:30:00.000Z",
  "customId": "doc-api-rate-limits",
  "dreamingStatus": "dreaming",
  "filepath": "filepath",
  "metadata": {
    "source": "bar",
    "language": "bar"
  },
  "ogImage": "ogImage",
  "raw": "Our API rate limits are 100 req/min on free and 1000 on pro. Clients should use exponential backoff on 429s.",
  "source": "text",
  "status": "done",
  "summary": "API rate limit policy: 100 req/min free, 1000 req/min pro.",
  "taskType": "memory",
  "title": "API Rate Limiting Policy",
  "type": "text",
  "updatedAt": "2025-04-15T09:31:00.000Z",
  "containerTags": [
    "string"
  ],
  "url": "https://docs.example.com/guides/rate-limits"
}