Skip to main content
LlamaIndex is a data framework designed to connect custom data sources with large language models (LLMs). It helps in structuring, indexing, and querying data, making it easy for LLMs to understand and retrieve relevant information efficiently. LlamaIndex supports a wide variety of data connectors and offers tools for building powerful retrieval-augmented generation (RAG) applications. Dappier is a platform that connects LLMs and Agentic AI agents to real-time, rights-cleared data from trusted sources, including web search, finance, and news. By providing enriched, prompt-ready data, Dappier empowers AI with verified and up-to-date information for a wide range of applications.

Overview

The LlamaIndex integration with Dappier allows developers to enhance their LLM applications with real-time search and AI-powered recommendation tools. By leveraging Dappier’s pre-trained, RAG-ready APIs, LLMs can retrieve accurate, up-to-date information across key domains such as news, finance, weather, sports, and lifestyle content. This integration includes two tools:
  • DappierRealTimeSearchToolSpec: Enables LLMs to access live web and financial data using natural language queries.
  • DappierAIRecommendationsToolSpec: Provides intelligent content recommendations from trusted media sources based on user intent and query context.
Together, these tools help ensure your LLM outputs are factual, relevant, and enriched with trusted real-world data.

Installation

To get started, install the required Python packages:

Setup API Keys

To authenticate and use Dappier tools, you’ll need a valid API key. You can generate one for free from your Dappier API dashboard. Once you have the key, set it in your environment using the following code:
Python

Dappier Real Time Search Tool

Open In Colab The DappierRealTimeSearchToolSpec allows LLMs to access real-time data across the web, including the latest news, weather, financial updates, and more.

Watch the Video Guide

If you prefer a visual walkthrough, check out the accompanying video guide below:

Initialize the Tool

You can initialize the real-time search tool and convert it into a list of tools ready for use:
Python
Query real-time web content such as news, weather, or general updates.
Python

Stock Market Data

Access real-time financial insights and stock news.
Python

Parameters

The DappierRealTimeSearchToolSpec methods support the following parameter:

query (str)

  • A natural language query used to retrieve real-time data from web sources or financial platforms.
  • This parameter is required for both search_real_time_data and search_stock_market_data.

Dappier AI Recommendations Tool

Open In Colab The DappierAIRecommendationsToolSpec provides intelligent, real-time content recommendations across a variety of verticals including sports, lifestyle, pet care, sustainable living, and local news. These recommendations come from trusted content partners and are tailored based on user queries.

Watch the Video Guide

If you prefer a visual walkthrough, check out the accompanying video guide below:

Initialize the Tool

Python

Sports News Recommendations

Python

Lifestyle News

Python

iHeartDogs Articles

Python

iHeartCats Articles

Python

GreenMonster Articles

Python

WISH-TV News

Python

9 and 10 News

Python

Parameters

All recommendation methods in DappierAIRecommendationsToolSpec support the following parameters:

query (str)

  • The user query for retrieving recommendations.

data_model_id (str) Optional

  • The data model ID to use for recommendations.
  • Data model IDs always start with the prefix "dm_".
  • Defaults to "dm_01j0pb465keqmatq9k83dthx34".

similarity_top_k (int) Optional

  • The number of top documents to retrieve based on similarity.
  • Defaults to 9.

ref (str) Optional

  • The site domain where AI recommendations should be displayed.
  • Defaults to None.

num_articles_ref (int) Optional

  • The minimum number of articles to return from the specified reference domain (ref).
  • The remaining articles will come from other sites in the RAG model.
  • Defaults to 0.

search_algorithm (str) Optional

  • The search algorithm to use for retrieving articles. Available options:
    • "most_recent" (default)
    • "semantic"
    • "most_recent_semantic"
    • "trending"
These parameters offer flexibility in customizing how results are retrieved and displayed, depending on the application needs.

Conclusion

Integrating Dappier with LlamaIndex enables powerful, real-time, and context-aware capabilities for your LLM applications. Whether you’re looking to pull the latest updates from the web or generate tailored content recommendations, Dappier’s tools make it easy to deliver accurate and relevant results using natural language. With just a few lines of code, you can bring trusted, live data into your AI workflows—empowering your models with factual, fresh, and focused responses.