A lightweight, AI-powered search engine built using Flask, JavaScript, and the Exa Search API.
This project allows users to enter natural-language search queries and receive relevant, high-quality results powered by Exaโs AI-driven search capabilities.
The goal of this project was to understand how modern search systems work, practice full-stack development, and integrate an AI-based search API into a clean, responsive web interface.
- Python
- Flask
- Exa Search API
- HTML
- CSS (custom styling, responsive layout)
- JavaScript (async fetch, DOM manipulation)
Hereโs what you can do with the AI Search Engine:
- Enter natural-language search queries
- Queries are sent to the backend and processed using the Exa API
- Returns relevant, high-quality search results
- Asynchronous requests using
fetch() - Results are rendered dynamically without page reloads
- Displays titles and external links for each result
- Flask server handles:
- Input validation
- API requests to Exa
- Response normalization for frontend use
- Clean separation between backend logic and frontend UI
- Minimal, modern search interface
- Responsive layout that works on desktop and mobile
- Visual feedback for searching, empty results, and errors
- The user enters a search query in the frontend.
- The query is sent as JSON to the Flask backend.
- Flask calls the Exa Search API using keyword-based search.
- Exa returns relevant results.
- The backend formats the response and sends it back to the frontend.
- Results are rendered dynamically in the browser.
To run this project on your local machine:
- Clone or download this repository.
- Install the required Python dependencies:
pip install flask exa-py
- Open app.py and ensure your Exa API key is set.
- Start the Flask development server:
python app.py
- Open your browser and navigate to:
http://127.0.0.1:5000
This project helped strengthen both my backend and AI-integration skills.
- Learned how AI-powered search engines retrieve and rank results
- Worked with natural-language queries instead of simple keyword matching
- Understood how modern search APIs differ from traditional search engines
- Built a Flask API to handle client requests
- Processed and normalized third-party API responses
- Implemented input validation and error handling
- Connected a JavaScript frontend to a Python backend
- Used asynchronous fetch requests and dynamic DOM rendering
- Maintained clean separation of concerns between layers
This demo shows:
- Entering a natural-language query
- AI-powered search results returned from Exa
- Dynamic rendering of results in the UI
