Introduction
In this step-by-step guide, we will walk you through building a Dynamic Travel Planner using Replit and Dappier’s Real-Time Data Model API. This app will generate a customized travel itinerary based on the user’s chosen destination and number of days, providing real-time weather updates, hotel deals, and local attractions. By leveraging OpenAI’s LLMs and Dappier’s enriched real-time data, users can generate AI-powered travel plans within minutes.Dappier Python Real Time Data
This template demonstrates how to Build a Dynamic Travel Planner Using Replit and Dappier Real-Time Data Model. You can check out the app on Replit here: Check out the app on ReplitWatch the Video Guide
If you prefer a visual walkthrough, check out the accompanying video guide below:Dappier Real-Time Data Model API
The Dappier Real-Time Data Model API enables applications to retrieve verified and up-to-date information from trusted sources across multiple domains, including weather, finance, and news. It allows seamless integration of real-time data into AI-powered applications.Usage in Python
The API can be used to fetch real-time data with a simple function call:Parameters
-
query (str): The user-provided search query. Example queries 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): The AI model ID to use for the query.
- AI model IDs always start with the prefix
"am_". - Multiple AI model IDs are available at the Dappier Marketplace.
- AI model IDs always start with the prefix
Prerequisites
Before you begin, ensure you have:- A Dappier account (Sign up here)
- An OpenAI account (Sign up here)
- A Replit account (Sign up here)
Step 1: Fork the Dappier Python Real-Time Data App
- Visit the Dappier Replit Integration Documentation.
- Click on the Dappier Python Real-Time Data link inside the page to open the template in Replit.
- Fork the app to create your own version.
- Rename the app to Dappier Dynamic Travel Planner.
- Add a detailed description such as:
“A Dynamic Travel Planner that generates personalized itineraries based on user-inputted destinations and trip durations. It provides real-time weather updates, hotel deals, and attraction recommendations, powered by Dappier and OpenAI.”
Step 2: Set Up API Keys
1. Add the Dappier API Key
- Go to Dappier API Keys.
- Generate an API key.
- In Replit, open the Secrets Manager.
- Add a new secret:
- Key:
DAPPIER_API_KEY - Value: (Paste your Dappier API Key here)
- Key:
- Click Save.
2. Add the OpenAI API Key
- Go to OpenAI API Keys.
- Generate an API key.
- In Replit, open the Secrets Manager.
- Add a new secret:
- Key:
OPENAI_API_KEY - Value: (Paste your OpenAI API Key here)
- Key:
- Click Save.
Step 3: Run the App
- Click “Run” in Replit to check if everything is working correctly.
- The system will automatically install dependencies and generate necessary code for you.
- Accept any suggested changes by Replit.
Step 4: Generate the Travel Planner Using Replit’s AI Assistant
Instead of writing the code manually, Replit’s AI Assistant can generate the entire app for you by following these simple instructions:- Open the Assistants App in Replit.
- Enter the following instructions:
“Create a travel planner app that asks the user for their destination city and the number of days for the trip. Fetch real-time weather updates and hotel deals for the given destination using Dappier’s Real-Time Data API. Use OpenAI to generate a structured, well-balanced itinerary that includes local attractions, sightseeing options, and relaxation spots. The app should be interactive and provide users with dynamic travel recommendations.”
- Replit’s AI will automatically generate the code for your app.
- Accept the code suggestions and let Replit set up everything for you.
- Run the app to verify it works as expected.
Step 5: Verify and Deploy
- Run the app again to verify that the itinerary is generated correctly.
- If everything looks good, deploy the app.

