Arguments
string[] | number[]
required
The IDs of the documents you want to fetch.
object
required
Response
Document[]
required
This field is
null if no document with the specified ID is found.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
await index.fetch({ ids: ["star-wars", "inception"] });
/*
[
{
id: "star-wars",
content: { ... },
metadata: { ... }
},
{
id: "inception",
content: { ... },
metadata: { ... }
}
]
*/
await index.fetch({ prefix: "star-" });
/*
[
{
id: "star-wars"
content: { ... },
metadata: { ... }
},
{
id: "star-trek",
content: { ... },
metadata: { ... }
}
]
*/
await index.fetch({ ids: ["star-wars", "inception"] });
/*
[
{
id: "star-wars",
content: { ... },
metadata: { ... }
},
{
id: "inception",
content: { ... },
metadata: { ... }
}
]
*/
await index.fetch({ prefix: "star-" });
/*
[
{
id: "star-wars"
content: { ... },
metadata: { ... }
},
{
id: "star-trek",
content: { ... },
metadata: { ... }
}
]
*/
Was this page helpful?