Get document
client.documents.get(stringid, RequestOptionsoptions?): DocumentGetResponse { id, connectionId, content, 16 more }
GET/v3/documents/{id}
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"
}