Skip to main content

A Python API wrapper for ImmobilienScout24

Project description

Immoscout API Wrapper

PyPI version Tests License: MIT

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.Session for 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

  1. Clone the repository:

    git clone https://github.com/yourusername/immoscout.git
    cd immoscout
    
  2. Install dependencies:

    pip install -e .
    

Running Tests

pytest

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

immoscout-0.1.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

immoscout-0.1.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

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

Hashes for immoscout-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6b11a4842d27a507053c927266ceea07f5d319d5c259118d92caaae95a2b2178
MD5 39bb0731b3a2a873791d766b785c9bea
BLAKE2b-256 96ec96e153c2a70cee8c297f500d021d8cac5c2de7332e47c6540724118d49f0

See more details on using hashes here.

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

Hashes for immoscout-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 492f39a3af1ac073c922aa37fa4e7318ffc2e585208abd7de6228debb0a141c3
MD5 4f32b931f936d04c28ec547c76de08d9
BLAKE2b-256 68d10b4858d68ed1539dbf2d57375c98b0434161cf584ff7ee93e6c0efd3c27c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page