def clean_domain(listing: dict) -> dict:
    """Extracts key listing details for API return.

    Args:
        listing (dict): Domain listing object

    Returns:
        dict: Address, property details, price & some ID info
    """
    address = {
        "displayable_address": listing.get("property_details", {}).get(
            "displayable_address", ""
        ),
        "postcode": listing.get("property_details", {}).get("postcode", ""),
        "state": listing.get("property_details", {}).get("state", ""),
    }

    property_details = {
        "property_type": listing.get("property_details", {}).get("property_type", ""),
        "features": listing.get("property_details", {}).get("features", []),
        "bathrooms": listing.get("property_details", {}).get("bathrooms", None),
        "bedrooms": listing.get("property_details", {}).get("bedrooms", None),
        "carspaces": listing.get("property_details", {}).get("carspaces", None),
    }

    return {
        "id": listing.get("id", None),
        "listing_slug": listing.get("listing_slug", ""),
        "price": listing.get("price_details", {}).get("display_price", ""),
        "address": address,
        "property_details": property_details,
    }