AI Generation of Real Estate Property Descriptions
Automatic generation of sales/rental property listings from structured data. Used by agencies, portals (CIAN, Avito, Yandex.Realty), and developers with large catalogs.
Listing Generator
from openai import AsyncOpenAI
from dataclasses import dataclass
client = AsyncOpenAI()
@dataclass
class PropertyData:
property_type: str # apartment, house, commercial, land
deal_type: str # sale, rent
rooms: int
area: float # m²
floor: int
total_floors: int
address: str
district: str
metro_distance: int # minutes walk
price: float
renovated: bool
amenities: list[str] # balcony, parking, elevator, storage...
year_built: int = None
ceiling_height: float = None
async def generate_property_listing(
property_data: PropertyData,
portal: str = "cian",
tone: str = "professional"
) -> dict:
PORTAL_CONFIGS = {
"cian": {"max_title": 100, "max_desc": 4000},
"avito": {"max_title": 80, "max_desc": 3000},
"yandex_realty": {"max_title": 100, "max_desc": 4000},
}
config = PORTAL_CONFIGS.get(portal, PORTAL_CONFIGS["cian"])
amenities_str = ", ".join(property_data.amenities)
response = await client.chat.completions.create(
model="gpt-4o",
messages=[{
"role": "system",
"content": f"""You are a realtor writing selling listings for {portal}.
Style: concrete, no filler, numbers and facts.
First paragraph — most important (size, location, condition).
DO NOT write: "wonderful apartment", "magnificent view", empty adjectives.
Title: up to {config['max_title']} characters.
Description: up to {config['max_desc']} characters.
Return JSON: {{title, description, key_features (3-5 facts)}}"""
}, {
"role": "user",
"content": f"""
Type: {property_data.property_type}, {property_data.deal_type}
Rooms: {property_data.rooms}, Area: {property_data.area} m²
Floor: {property_data.floor}/{property_data.total_floors}
Address: {property_data.address}, {property_data.district}
To metro: {property_data.metro_distance} min walk
Renovated: {'yes' if property_data.renovated else 'no'}
Amenities: {amenities_str}
{'Year built: ' + str(property_data.year_built) if property_data.year_built else ''}
"""
}],
response_format={"type": "json_object"}
)
return json.loads(response.choices[0].message.content)
Photo Analysis via Vision API
async def describe_from_photos(photo_urls: list[str], property_type: str) -> str:
"""Analyze property photos, describe condition"""
image_contents = [
{"type": "image_url", "image_url": {"url": url}}
for url in photo_urls[:5]
]
response = await client.chat.completions.create(
model="gpt-4o",
messages=[{
"role": "user",
"content": [
{"type": "text", "text": f"Describe {property_type} condition from photos. Indicate: renovation state, finishing materials, layout features, visible advantages. 3-4 sentences, concrete."}
] + image_contents
}]
)
return response.choices[0].message.content
Batch Processing Catalog
async def process_real_estate_catalog(
properties: list[dict],
portal: str = "cian"
) -> list[dict]:
generator_tasks = [
generate_property_listing(PropertyData(**p), portal=portal)
for p in properties
]
results = await asyncio.gather(*generator_tasks)
return [{"property": p, "listing": r} for p, r in zip(properties, results)]
For a large developer with 500+ properties — batch generation of entire catalog takes 15–30 minutes. Cost via GPT-4o: ~$0.01–0.03 per listing. Timeline: generation script + CRM integration — 1–2 weeks.







