A FastAPI-based REST API that provides Google search suggestions with caching functionality.
- Fetch real-time Google search suggestions
- In-memory caching for faster repeated queries
- RESTful API endpoint
- FastAPI with automatic OpenAPI documentation
- URL:
/
- Method:
GET
- Response: Redirects you to /docs
- URL:
/api/v1
- Method:
GET
- Query Parameter:
search
(required) - Response: List of search suggestions based on the query
- Start the server:
python main.py
-
The server will run at
http://0.0.0.0:5000
-
Access the API documentation at:
- Swagger UI:
http://0.0.0.0:5000/docs
- ReDoc:
http://0.0.0.0:5000/redoc
GET /api/v1?search=python
Response:
[
"python compiler",
"python",
"python download",
"python online compiler",
"python programming",
"python tutorial",
"python interview questions",
"python install",
"python libraries",
"python snake"
]