Dappier Toolkit
You can also check this cookbook in colab here Dappier toolkit helps interacting with the Dappier API. It provides methods for searching real time data and fetching AI recommendations across key verticals like News, Finance, Stock Market, Sports, Weather and more. This will help you getting started with the Dappier toolkit.Installation
This toolkit lives in thecamel package. First, install the CAMEL
package with all its dependencies:
Setup
You’ll need to set up your API keys for Dappier. You can go to here to get API Key from Dappier.Python
Real-Time Search
Search real-time data using an AI model. Access real-time information using the specified AI model based on the given query. Depending on the AI model ID, the data retrieved can vary between general web search results or financial news and stock prices. Note: Multiple AI model IDs are available, which can be found at Dappier marketplace.Watch the Video
If you prefer a visual walkthrough, check out the accompanying video below:Python
Parameters
query (str):
- The user-provided query. Examples include:
"How is the weather today in Austin, TX?""What is the latest news for Meta?""What is the stock price for AAPL?"
ai_model_id (str) Optional:
- The AI model ID to use for the query.
- AI model IDs always start with the prefix
"am_". - Defaults to
"am_01j06ytn18ejftedz6dyhz2b15". - Multiple AI model IDs are available, which can be found at Dappier marketplace.
AI Recommendations
Retrieve AI-powered recommendations based on the provided query and data model. It fetches real-time AI-generated recommendations using the specified data model and search algorithm. The results include personalized content based on the query and, optionally, relevance to a specific reference domain. Note: Multiple Data model IDs are available, which can be found at Dappier marketplace.Watch the Video
If you prefer a visual walkthrough, check out the accompanying video below:Python
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.
- Options:
"most_recent"(default),"semantic","most_recent_semantic","trending".

