Skip to main content

A thin Python client for the ImmoScout24 mobile API

Project description

immoscout-api-client

A thin Python client for the ImmoScout24 mobile API.

Installation

pip install immoscout-api-client

Or with uv:

uv add immoscout-api-client

Usage

Basic Example

import asyncio
from immoscout_api_client import ImmoscoutAPIClient, convert_web_to_mobile

async def main():
    # Initialize the client
    client = ImmoscoutAPIClient()

    # Convert a web URL to mobile API format
    web_url = "https://www.immobilienscout24.de/Suche/de/berlin/berlin/wohnung-mieten"
    mobile_url = convert_web_to_mobile(web_url)

    # Fetch first page of search results
    results = await client.search_list(mobile_url, page=1)
    print(f"Found {results['totalResults']} properties")

    # Get details for a specific property
    listing_id = results['resultListItems'][0]['item']['id']
    details = await client.get_property_details(listing_id)
    print(f"Property title: {details['sections'][0]['title']}")

asyncio.run(main())

API Reference

ImmoscoutAPIClient

Main HTTP client for the ImmoScout24 API.

Constructor:

ImmoscoutAPIClient(
    timeout: int = 30,
    impersonate: Impersonate = Impersonate.OkHttp5,
    user_agent: str = "ImmoScout24_1410_30_._"
)

Methods:

  • async search_list(mobile_url: str, page: int) -> dict

    • Fetch a page of search results
    • Returns raw JSON response
  • async get_property_details(listing_id: int) -> dict

    • Fetch detailed information for a specific property
    • Returns raw JSON response

URL Utilities

  • convert_web_to_mobile(web_url: str) -> str

    • Convert web URL to mobile API format
    • Raises ValueError for invalid URLs or unsupported parameters
  • get_page_url(mobile_url: str, page: int) -> str

    • Add/update page number in mobile API URL
  • get_expose_details_url(listing_id: int | str) -> str

    • Construct property details endpoint URL

Exceptions

  • ImmoscoutAPIError: Base exception for all API errors
  • ImmoscoutHTTPError: Raised when HTTP requests fail

License

MIT License - see LICENSE file for details

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_api_client-1.0.0.tar.gz (40.9 kB view details)

Uploaded Source

Built Distribution

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

immoscout_api_client-1.0.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file immoscout_api_client-1.0.0.tar.gz.

File metadata

  • Download URL: immoscout_api_client-1.0.0.tar.gz
  • Upload date:
  • Size: 40.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for immoscout_api_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d153690672328c57a4761b591d8e1b2db30fefdca65bfc2f90b9b47e93055815
MD5 74e2bcade795a67ef295e64f322e6e85
BLAKE2b-256 193e1ebbf523488b252855a358f78a36918dae0248125ee41f7731a560fd9878

See more details on using hashes here.

Provenance

The following attestation bundles were made for immoscout_api_client-1.0.0.tar.gz:

Publisher: publish.yml on libklein/immoscout-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file immoscout_api_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for immoscout_api_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0c1bea9362b8bcd5b878c141216b041a3cc37e0db5008a30cd47e042c3d5183
MD5 364ca81bc2235e0e6d9b245f7ff4e208
BLAKE2b-256 b89f6225c468ccb79a32afbc30892bd3c20396a8cd37341ba24732fb4197d1b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for immoscout_api_client-1.0.0-py3-none-any.whl:

Publisher: publish.yml on libklein/immoscout-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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