A Python API wrapper for ImmobilienScout24
Project description
Immoscout API Wrapper
A robust, unofficial Python API wrapper for ImmobilienScout24. This library allows you to easily search for real estate listings and retrieve detailed expose information programmatically.
Features
- 🔍 Advanced Search: Filter by region, price type, real estate type, and more.
- 📄 Detailed Exposes: Fetch full details for any listing ID.
- 🚀 Performance: Built on
requests.Sessionfor connection pooling and faster requests. - 🛡️ Error Handling: Custom exceptions for clean error management.
- 📦 Type Hinted: Fully typed for excellent IDE support and autocompletion.
Installation
Install the package via pip:
pip install immoscout
Quick Start
Here's how to get started in just a few lines of code:
from immoscout import ImmoscoutClient
from immoscout.exceptions import ImmoscoutError
# Initialize the client
client = ImmoscoutClient()
try:
# 1. Search for apartments in Berlin
print("Searching for apartments...")
results = client.search(
region='/de/berlin/berlin',
price_type='calculatedtotalrent',
real_estate_type='apartmentrent'
)
print(f"Found {results.get('totalResults', 0)} results.")
# 2. Get details for a specific listing (Expose)
# Replace with a valid ID from your search results
expose_id = '123456789'
expose = client.get_expose(expose_id)
print(f"Expose Title: {expose.get('expose', {}).get('title')}")
except ImmoscoutError as e:
print(f"An error occurred: {e}")
Advanced Usage
Customizing the Client
You can customize the User-Agent if needed:
client = ImmoscoutClient(user_agent='MyCustomBot/1.0')
Pagination
The search method supports pagination:
# Get page 2
results_page_2 = client.search(
region='/de/berlin/berlin',
page_number=2
)
Custom Search Parameters
You can pass any additional parameters supported by the Immoscout API as keyword arguments:
results = client.search(
region='/de/berlin/berlin',
price_from=500,
price_to=1000,
rooms_from=2
)
Development
Setup
-
Clone the repository:
git clone https://github.com/yourusername/immoscout.git cd immoscout
-
Install dependencies:
pip install -e .
Running Tests
pytest
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Disclaimer
This is an unofficial wrapper and is not affiliated with, endorsed by, or connected to ImmobilienScout24. Use responsibly and in accordance with their Terms of Service.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file immoscout-0.1.1.tar.gz.
File metadata
- Download URL: immoscout-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b11a4842d27a507053c927266ceea07f5d319d5c259118d92caaae95a2b2178
|
|
| MD5 |
39bb0731b3a2a873791d766b785c9bea
|
|
| BLAKE2b-256 |
96ec96e153c2a70cee8c297f500d021d8cac5c2de7332e47c6540724118d49f0
|
File details
Details for the file immoscout-0.1.1-py3-none-any.whl.
File metadata
- Download URL: immoscout-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
492f39a3af1ac073c922aa37fa4e7318ffc2e585208abd7de6228debb0a141c3
|
|
| MD5 |
4f32b931f936d04c28ec547c76de08d9
|
|
| BLAKE2b-256 |
68d10b4858d68ed1539dbf2d57375c98b0434161cf584ff7ee93e6c0efd3c27c
|