The Unsplash Image Search Application is a web-based tool built with Streamlit that allows users to search and view images from Unsplash by simply entering a text prompt. The app leverages the Unsplash API to deliver high-quality, responsive images based on the user's input.
● Search Images: Users can input any text prompt to search for related images.
● Display Results: Up to 20 images are displayed in a 5-column grid layout for easy viewing.
● Responsive UI: The application is clean, simple, and responsive, built with Streamlit’s easy-to-use interface.
● API Integration: The app connects to the Unsplash API to retrieve real-time image data.
Ensure you have the following before starting:
● Python 3.x installed.
● An API key from Unsplash to access their services.
● Basic Python libraries including streamlit, requests, and python-dotenv.
-
Clone the repository:
● Clone the GitHub repository to your local machine.
-
Install dependencies:
● Install the required Python packages using pip.
-
Unsplash API Setup:
● Create a .env file in the root directory and add your Unsplash API key for authentication.
-
Run the application:
● Launch the app locally by running the Streamlit script.
The application securely loads the Unsplash API key from a .env file using python-dotenv to protect sensitive information. This key is required to interact with the Unsplash API.
The application takes a user-provided prompt and sends it as a query to the Unsplash API. In return, the API responds with a set of image URLs matching the prompt. The images are then processed and displayed dynamically.
Streamlit is used to build a simple and responsive UI. Users can input a search prompt, and the application will display the search results in a grid format, with each image labeled and resized for a clean viewing experience.
- Run the application.
- Input a search term: Type a keyword or phrase in the input box (e.g., “mountains” or “cityscape”).
- View results: The images related to your search will be displayed in a grid format.
- Explore: Scroll through the images and enjoy!
● Find Inspiration: Quickly search for creative or thematic images for your personal projects.
● Content Creation: Use the search tool to find visually appealing images for blogs, websites, or social media.
● Personal Use: Browse and explore beautiful imagery based on interests.
● Advanced Search Options: Include filters for image orientation, color schemes, and categories.
● Pagination: Enable navigation through more extensive image result sets.
● Photographer Credits: Display the photographer’s name and add direct download links for the images.
● Image Download Feature: Allow users to download their favorite images directly from the app.