Skip to main content
Dappier connects any LLM or your Agentic AI to real-time, rights-cleared, proprietary data from trusted sources, making your AI an expert in anything. Our specialized models include Real-Time Web Search, News, Sports, Financial Stock Market Data, Crypto Data, and exclusive content from premium publishers. Explore a wide range of data models in our marketplace at marketplace.dappier.com. Dappier delivers enriched, prompt-ready, and contextually relevant data strings, optimized for seamless integration with LangChain. Whether you’re building conversational AI, recommendation engines, or intelligent search, Dappier’s LLM-agnostic RAG models ensure your AI has access to verified, up-to-date data—without the complexity of building and managing your own retrieval pipeline.

DappierRetriever

This will help you get started with the Dappier retriever. For detailed documentation of all DappierRetriever features and configurations head to the API reference.

Setup

Install langchain-dappier and set environment variable DAPPIER_API_KEY.
We also need to set our Dappier API credentials, which can be generated at the Dappier site.. We can find the supported data models by heading over to the Dappier marketplace. If you want to get automated tracing from individual queries, you can also set your LangSmith API key by uncommenting below:

Installation

This retriever lives in the langchain-dappier package:

Instantiation

  • data_model_id: str Data model ID, starting with dm_. You can find the available data model IDs at: Dappier marketplace.
  • k: int Number of documents to return.
  • ref: Optional[str] Site domain where AI recommendations are displayed.
  • num_articles_ref: int Minimum number of articles from the ref domain specified. The rest will come from other sites within the RAG model.
  • search_algorithm: Literal[ “most_recent”, “most_recent_semantic”, “semantic”, “trending” ] Search algorithm for retrieving articles.
  • api_key: Optional[str] The API key used to interact with the Dappier APIs.

Usage

Use within a chain

Like other retrievers, DappierRetriever can be incorporated into LLM applications via chains. We will need a LLM or chat model:

API reference

For detailed documentation of all DappierRetriever features and configurations head to the API reference.