This is a full-stack AI-powered search and aggregation tool that takes user queries, retrieves results from Google and YouTube, and presents them in a structured React UI. The backend is built with FastAPI (Python), and the frontend is developed using React.js.
β Features:
- AI-Powered Search Expansion: Enhances user queries using NLP models.
- Google & YouTube Integration: Fetches search results from multiple sources.
- Multithreading Optimization: Improves speed using parallel processing.
- Sorting & Filtering: Allows users to customize search results.
- Dark Mode UI: Aesthetic, user-friendly design similar to Google Search.
- Toggle AI Search: Allows users to switch between AI-enhanced search and direct search.
Technology | Description |
---|---|
Frontend | React.js, CSS |
Backend | FastAPI (Python) |
Database | Not required (API-based search) |
APIs Used | Google Search (SerpAPI), YouTube Data API |
AI Model | Hugging Face Transformers (T5, BART) |
Deployment | Vercel (Frontend), Render (Backend) |
git clone https://github.com/G26karthik/Ai-search-tool.git
cd your-repository-name
π Navigate to the backend folder:
cd backend
π Install dependencies:
pip install -r requirements.txt
π Set up environment variables: Create a .env file inside backend/ and add:
SERPAPI_KEY=your_serpapi_key
YOUTUBE_API_KEY=your_youtube_api_key
Run the FastAPI server:
uvicorn main:app --reload
π Test the API in browser:
http://127.0.0.1:8000/docs
π Navigate to the frontend folder:
cd search-tool
π Install dependencies:
npm install
π Set up environment variables: Create a .env file inside search-tool/ and add:
REACT_APP_BACKEND_URL=http://127.0.0.1:8000
π Start the frontend:
npm start
π Open in browser:
http://localhost:3000
- Uses NLP models (
T5
orBART
) from Hugging Face to expand user queries. - Helps generate more relevant search terms to improve results.
- Can be toggled ON/OFF using a toggle button:
- AI Mode ON: Query is expanded before searching.
- AI Mode OFF: Uses the exact user query without modification.
- Alert message appears when AI search is enabled, informing users that accuracy may vary.
- Google Search:
- Uses SerpAPI to fetch organic search results.
- Returns title, snippet, and link for each result.
- YouTube Search:
- Uses YouTube Data API v3 to fetch relevant videos.
- Displays video title, description, and link to watch.
- Users can sort results based on:
- π Relevance (Default)
- π Date (Latest results first)
- π Source (Group Google & YouTube separately)
- Filters help refine search results for better accuracy.
- Search Bar in the Center:
- Neatly styled, like Google Search.
- Toggle button below it to switch AI search ON/OFF.
- Results Displayed in Two Columns:
- Left Side β π Google Search Results.
- Right Side β π₯ YouTube Search Results.
- Clean & Responsive Design:
- Fully mobile-friendly.
- Dark mode UI for better readability.
- Uses Pythonβs FastAPI + Multithreading to speed up search requests.
- Google & YouTube searches run in parallel, reducing load time.
demo.Video.mp4
- Query expansion sometimes changes the intent of the search.
- API rate limits for SerpAPI & YouTube Data API.
- Deployment issues with backend on Render, so it's running locally.
-
Expand Search Sources:
- Integrate additional platforms such as LinkedIn, Reddit, and Twitter for a more comprehensive search experience.
-
Enhanced Ranking & Filtering:
- Develop AI-based ranking algorithms to better prioritize the most relevant results.
- Implement customizable filtering options based on user preferences.
-
Database Integration:
- Cache frequently searched queries and results to improve response times.
- Store user search history and preferences for personalized recommendations.
-
User Authentication:
- Implement user accounts and secure login systems to provide personalized search experiences and save search histories.
-
Performance Optimization:
- Further optimize API calls and explore serverless architectures to scale with demand.
-
UI/UX Enhancements:
- Improve responsiveness and design for mobile devices.
- Add interactive elements and animations for a smoother user experience.
To contribute to this project, please follow these steps:
cd your-repository-name
git checkout -b feature-branch
git add .
git commit -m "Description of your changes"
git push origin feature-branch
This project is licensed under the MIT License. You are free to use, modify, and distribute this project with proper attribution.