Skip to content

KevinLiebergen/idealiScrape

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏠 IdealiScrape

IdealiScrape is a real estate tool that monitors Idealista for new listings using the Official Idealista API. It sends instant notifications to your Telegram channel when new properties matching your criteria are found.

✨ Features

  • 🚀 Official API Integration: Fast, reliable, and no more CAPTCHAs or blocks!
  • 🔍 Parametric Search: Filter by location (coordinates or zone name), price, type (Sale/Rent), and distance.
  • 📱 Telegram Notifications: Instant formatted alerts with Price, Size, Location, and Link.
  • 💾 Database Storage: Prevents duplicate notifications by tracking listings in a local SQLite database (data/listings.db).

Notification Preview

🚀 Installation

Prerequisites

Steps

  1. Clone the repository:

    git clone https://github.com/yourusername/IdealiScrape.git
    cd IdealiScrape
  2. Create a Virtual Environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install Dependencies:

    pip install -r requirements.txt
  4. Configuration: Create a .env file in the root directory:

    cp .env.example .env

    Edit .env with your credentials:

    TELEGRAM_TOKEN=your_bot_token
    TELEGRAM_CHAT_ID=your_chat_id
    IDEALISTA_API_KEY=your_api_key
    IDEALISTA_API_SECRET=your_api_secret

🛠 Usage

Run the tool using main.py.

Basic Command (Madrid Sol default)

python main.py --type rent --price-max 1200

Options

Argument Description Default Example
--center Coordinates (Lat,Lng) 40.4167,-3.70325 (Madrid) --center "41.3851,2.1734"
--zone Name of zone/city to search via Nominatim None --zone "Valencia"
--distance Search radius in meters 3000 --distance 5000
--price-max Maximum price filter None --price-max 1500
--type Listing type: sale or rent sale --type rent

Examples

Rentals in Barcelona (Center) under 1500€:

python main.py --type rent --price-max 1500 --center "41.3851,2.1734"

Rentals in Valencia (Zone Name):

python main.py --type rent --zone "Valencia"

Sales in Madrid within 1km of Sol:

python main.py --type sale --zone "Madrid" --distance 1000

⏰ Automation (Cron)

To run the script periodically via cron, you can add a line to your crontab. If you need to use a proxy, make sure to export HTTP_PROXY and HTTPS_PROXY in the cron command.

# Example: Run every 30 minutes
*/30 * * * * HTTP_PROXY="http://proxy:port" HTTPS_PROXY="http://proxy:port" /path/to/IdealiScrape/venv/bin/python /path/to/IdealiScrape/main.py --zone "Madrid" >> /path/to/IdealiScrape/logs/ideali.log 2>&1
*/30 * * * * /path/to/IdealiScrape/venv/bin/python /path/to/IdealiScrape/main.py --zone "Madrid" >> /path/to/IdealiScrape/logs/ideali.log 2>&1

📂 Project Structure

IdealiScrape/
├── data/
│   └── listings.db       # SQLite database
├── src/
│   ├── api.py            # Official API Client (Auth, Search)
│   ├── database.py       # Database operations
│   ├── notifier.py       # Telegram notification logic
│   └── settings.py       # Configuration loader
├── main.py               # Entry point
├── requirements.txt      # Dependencies
└── .env                  # Secrets

⚠️ Disclaimer

This tool is for educational purposes. Ensure you comply with Idealista's API Terms of Service.

About

IdealiScrape is a real estate tool that monitors Idealista for new listings using the Official Idealista API. It sends instant notifications to your Telegram channel when new properties matching your criteria are found.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages