https://github.com/imacod3r/ebay-price-tracker-api
An api to track product prices on eBay and provide insights into the best deals.
https://github.com/imacod3r/ebay-price-tracker-api
ebay flask python webscraping
Last synced: about 1 year ago
JSON representation
An api to track product prices on eBay and provide insights into the best deals.
- Host: GitHub
- URL: https://github.com/imacod3r/ebay-price-tracker-api
- Owner: ImaCod3r
- License: mit
- Created: 2024-12-03T10:07:17.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-03T10:27:09.000Z (over 1 year ago)
- Last Synced: 2025-02-09T07:23:28.865Z (over 1 year ago)
- Topics: ebay, flask, python, webscraping
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eBay Price Tracker Api
eBayPriceTracker is a Python-based web api designed to track prices of products on eBay and provide insights into the best deals available. This project aims to help users make informed purchasing decisions by analyzing product prices and identifying below-average offers.
## Features
- Scrapes product titles, prices, and links from eBay search results.
- Calculates the average price of listed products.
- Identifies products priced below the average, helping users find better deals.
- RESTful API built with Flask for easy integration and access to data.
## Installation
To get started with eBayPriceTracker, follow these steps:
1. **Clone the repository:**
```bash
git clone https://github.com/ImaCod3r/ebay-price-tracker-api.git
```
2. **Enter the directory**
```bash
cd ebay-price-tracker-api
```
3. **Set up a virtual environment (optional but recommended):**
```bash
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
4. **Install the required packages:**
```bash
pip install -r requirements.txt
```
5. **Create a .env file in the root directory to store environment variables (if needed).**
## Usage
To run the application, use the following command:
```bash
python app.py
```
The application will start a local server, and you can access the API at http://localhost:5000.
## API Endpoints
- GET /search?q=YOUR_SEARCH_TERM
- Query the eBay database for products matching the search term.
- Returns a JSON response with the total number of items, average price, and a list of cheaper items.
**Example Request**
```http
GET http://localhost:5000/search?q=laptop
```
**Example Response**
```json
{
"total": 100,
"average price": 750.00,
"cheaper": [
{
"title": "Used Laptop Model A",
"price": "$600.00",
"link": "https://www.ebay.com/..."
},
{
"title": "Refurbished Laptop Model B",
"price": "$700.00",
"link": "https://www.ebay.com/..."
}
]
}
```
## Logging
Logs are stored in the `logs/` directory. Check `app.log` for any errors or important information while running the application.
## Contributing
Contributions are welcome! If you have suggestions for improvements or find bugs, please open an issue or submit a pull request.
## License
This project is licensed under the **MIT License**.
By: **ImaCod3r**