Inspiration
We wanted to plan a winter trip with the boys but we couldn't find a location that could suit everyone's needs. We would never agree on anything and the group chat didn't make it out of the trip. We decided: why not make an AI travel agent that could plan trips for you.
What it does
Autotrip finds the optimal route using the Google Maps Directions API and recommends hotels near the midpoint of the route using the Amadeus API. It suggests attractions and restaurants along the route using Google Maps API using trending Instagram insights. We used LangChain and OpenAI to summarize and personalize the itinerary which outputs a structured itinerary with complete with cost breakdown, travel times, and maps where you can finally download the itinerary as a pdf or save it to you calender.
How we built it
Frontend (Next.js + TypeScript): We built using Next.js for a clean interface, TailwindCSS for styling and layout, and React Query to manage API calls. Integrated the Google Maps JavaScript API for displaying routes, pins, and hotel images. We also used Framer Motion for smooth animations and built a chat UI for more personalized plans by the user.
Backend (FastAPI + Python):
We built the backend as a REST API using FastAPI, which allowed us to efficiently handle multiple asynchronous API calls and maintain performance. The backend integrates with the Google Maps API for routing, hotel images, location data, and the Amadeus API for real-time hotel searches, while using Instagram trend data to recommend popular spots and restaurants using custom engagement metric. To generate personalized itineraries and summaries, we implemented LangChain with OpenAI GPT-4o-mini, enabling the AI to understand user inputs and create realistic, budget-aware travel plans. We designed several key endpoints including /api/places, /api/hotels, /api/itinerary, and /api/ai/summarize to organize data flow between the frontend and backend. Using Pydantic schemas ensured consistent data validation, while async requests improved concurrency and reduced response times. Finally, we implemented in-memory caching for frequent responses to improve performance and minimize redundant API calls.
Challenges we ran into
We were integrating multiple APIs with different data formats while handling API timeouts and incomplete responses. We also had to ensure route and distance calculations were accurate for midpoint ranking. Formatting AI responses into structured, parsable JSON while balancing realism with speed, generating complete itineraries under 120 seconds.
Accomplishments that we're proud of
We successfully integrated AI + geospatial APIs for end-to-end automation. We created a visually dynamic frontend with animated maps and interactive itinerary views. We implemented midpoint-based hotel logic and delivered a budget-aware itinerary that dynamically adjusts hotel and meal costs
What we learned
Throughout building AutoTrip, we learned how to orchestrate multiple APIs in real time using async Python, which taught us the importance of efficiency and careful error handling when dealing with concurrent requests. We also discovered how to use LangChain effectively for structured prompt generation, helping the AI produce well-organized and context-aware itineraries. Designing clear and consistent data schemas became crucial for keeping the frontend and backend perfectly aligned, especially as the project grew more complex. We realized how combining AI with Maps data can dramatically simplify real-world decision making by turning raw location data into meaningful travel insights.
What's next for AutoTrip
We want to expand itinerary generation beyond 2 days and integrate Redis caching and Firebase authentication. We plan to enable group trip collaboration and shared editing and maybe launch a mobile app version for travelers on the go.
Built With
- amadeus
- fastapi
- google-maps
- gpt4o
- langchain
- next.js
- pydantic
- python
- restful
- typescript

Log in or sign up for Devpost to join the conversation.