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

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

    Parameters

    NameTypeDescription
    ids*Sequence[str]
    **kwargsAny
    Default:{}

    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.

    List of IDs to get.

    Additional keyword arguments. These are up to the implementation.