LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-coreindexingbaseDocumentIndexget
    Method●Since v0.2

    get

    Get documents by id.

    Fewer documents may be returned than requested if some IDs are not found or if there are duplicated IDs.

    Users should not assume that the order of the returned documents matches the order of the input IDs. Instead, users should rely on the ID field of the returned documents.

    This method should NOT raise exceptions if no documents are found for some IDs.

    Copy
    get(
      self,
      ids: Sequence[str],
      ,
      **kwargs: Any = {}
    ) -> list[Document]

    Parameters

    NameTypeDescription
    ids*Sequence[str]

    List of IDs to get.

    **kwargsAny
    Default:{}

    Additional keyword arguments. These are up to the implementation.

    View source on GitHub