---
title: "Real Estate Listing Image API: Property Card Generator"
description: "Generate property cards with the real estate listing image API. POST address, price, beds, baths, and agent details, get back a 1200x900 PNG."
url: "https://html2img.com/templates/real-estate-listing/"
---

# Real Estate Listing Image Generator API

Send property data and agent details as JSON, get back a 1200x900 listing card PNG.

Brokerages and listing platforms use the real estate listing image API to keep social, email, and partner-portal artwork in sync with the active MLS feed. The 1200x900 layout gives space for one hero photo, the price and address, the bed and bath counts, and an agent block, which covers the fields buyers expect to see in a property card. You post the listing data and the response holds a PNG ready for posting or attaching to a CRM-driven email blast.

## At a glance

- **Template slug:** `real-estate-listing`
- **Category:** real-estate
- **Endpoint:** `POST https://app.html2img.com/api/v1/templates/real-estate-listing`
- **Authentication:** `X-API-Key` header
- **Cost:** one credit per render, PNG or PDF
- **Page:** https://html2img.com/templates/real-estate-listing/

## Fields

| Field | Type | Required | Example |
| --- | --- | --- | --- |
| `price` | string | Yes | $1,495,000 |
| `address` | string | Yes | 482 Maple Ridge Lane |
| `address_secondary` | string | No | Sausalito, CA 94965 |
| `beds` | string | No | 4 |
| `baths` | string | No | 3 |
| `sqft` | string | No | 2,840 |
| `status` | string | No | Just listed |
| `property_image_url` | url | No | https://picsum.photos/seed/real-estate/1200/600 |
| `agent_name` | string | No | Elena Martinez |
| `agent_title` | string | No | Senior Listing Agent |
| `agent_phone` | string | No | (415) 555-0142 |
| `agent_avatar_url` | url | No | https://i.pravatar.cc/160?img=23 |
| `brokerage_name` | string | No | Bay Bridge Realty |
| `logo_url` | url | No |  |
| `accent_color` | string | No | #0F172A |

## Defaults

| Field | Default |
| --- | --- |
| `width` | 1200 |
| `height` | 900 |

## Example request

```bash
curl -X POST https://app.html2img.com/api/v1/templates/real-estate-listing \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"price":"$1,495,000","address":"482 Maple Ridge Lane","address_secondary":"Sausalito, CA 94965","beds":"4","baths":"3","sqft":"2,840","status":"Just listed","property_image_url":"https://picsum.photos/seed/real-estate/1200/600","agent_name":"Elena Martinez","agent_title":"Senior Listing Agent","agent_phone":"(415) 555-0142","agent_avatar_url":"https://i.pravatar.cc/160?img=23","brokerage_name":"Bay Bridge Realty","accent_color":"#0F172A"}'
```

## In your language

### PHP

```php
<?php
$response = \Illuminate\Support\Facades\Http::withHeaders([
    'X-API-Key' => 'YOUR_API_KEY',
])->post('https://app.html2img.com/api/v1/templates/real-estate-listing', ['price' => '$1,495,000', 'address' => '482 Maple Ridge Lane', 'address_secondary' => 'Sausalito, CA 94965', 'beds' => '4', 'baths' => '3', 'sqft' => '2,840', 'status' => 'Just listed', 'property_image_url' => 'https://picsum.photos/seed/real-estate/1200/600', 'agent_name' => 'Elena Martinez', 'agent_title' => 'Senior Listing Agent', 'agent_phone' => '(415) 555-0142', 'agent_avatar_url' => 'https://i.pravatar.cc/160?img=23', 'brokerage_name' => 'Bay Bridge Realty', 'accent_color' => '#0F172A']);

$url = $response->json('url');
```

### Node.js

```javascript
const response = await fetch('https://app.html2img.com/api/v1/templates/real-estate-listing', {
  method: 'POST',
  headers: {
    'X-API-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "price": "$1,495,000",
    "address": "482 Maple Ridge Lane",
    "address_secondary": "Sausalito, CA 94965",
    "beds": "4",
    "baths": "3",
    "sqft": "2,840",
    "status": "Just listed",
    "property_image_url": "https://picsum.photos/seed/real-estate/1200/600",
    "agent_name": "Elena Martinez",
    "agent_title": "Senior Listing Agent",
    "agent_phone": "(415) 555-0142",
    "agent_avatar_url": "https://i.pravatar.cc/160?img=23",
    "brokerage_name": "Bay Bridge Realty",
    "accent_color": "#0F172A"
}),
});

const { url } = await response.json();
```

### Python

```python
import requests

response = requests.post(
    'https://app.html2img.com/api/v1/templates/real-estate-listing',
    headers={'X-API-Key': 'YOUR_API_KEY'},
    json={'price': '$1,495,000', 'address': '482 Maple Ridge Lane', 'address_secondary': 'Sausalito, CA 94965', 'beds': '4', 'baths': '3', 'sqft': '2,840', 'status': 'Just listed', 'property_image_url': 'https://picsum.photos/seed/real-estate/1200/600', 'agent_name': 'Elena Martinez', 'agent_title': 'Senior Listing Agent', 'agent_phone': '(415) 555-0142', 'agent_avatar_url': 'https://i.pravatar.cc/160?img=23', 'brokerage_name': 'Bay Bridge Realty', 'accent_color': '#0F172A'},
)

url = response.json()['url']
```

## What it is for

### Estate agencies generating shareable listing cards from MLS exports

Brokerages on a paid MLS feed get nightly exports with hundreds of properties and need a card per listing for social. Loop the export through this endpoint with each agent's branding, and the results post to scheduled queues without a designer in the loop. Bay Bridge Realty cards 240 listings every Sunday and the agents post directly from a shared cloud folder during the week. The cards reuse cleanly on the brokerage website too, replacing a Webflow template that needed manual updates.

### Agents posting from a CRM action

CRM-driven listing pipelines benefit from a "Generate share image" action on each property record. The button hits this endpoint with the property data and the agent's vCard fields, and the resulting URL drops into the property's Notes field for one-click sharing. Agents copy the link into Instagram, Facebook, or WhatsApp without leaving the CRM. Linden & Co rolled this out for 60 agents and saw social posting frequency double in the first month.

### Email marketing carousels

Newsletter tools that support multi-image email blocks render best with images at the same dimensions. Generate cards for the four featured listings of the week, embed in the email body, and the carousel reads as a coherent set rather than a mix of cropped photos. Riverside Realty publishes a Friday digest with five cards and the engagement runs 2x the rate of plain text-and-link emails.

### Partner portal embeds

Brokerages syndicate listings to partner sites that want to show the listing in a card without rebuilding their own templating. Generate the card once, host the URL, and the partner embeds via a simple <img> tag. The partner gets brokerage-branded artwork, the brokerage gets visibility, and there is no shared code between the two systems. Wren Analytics powers this for three regional MLS providers.

### Agency-branded WhatsApp share artwork

Agents in WhatsApp-heavy markets share listings through chat as a daily routine. A 1200x900 PNG renders cleanly inside a WhatsApp share, faster than a link preview and richer than a plain photo. Halberd Software ships this in its WhatsApp Business connector for Brazilian brokerages, and 90 percent of listing shares now use the rendered card instead of a stock photo.

## Output

- **Dimensions:** 1200x900
- **Colour space:** sRGB
- **Transparency:** Not supported
- **Typical file size:** 140 KB to 380 KB
- **Platform specification:** [Common MLS share format optimized for Instagram and email](https://www.realtor.com/research/topics/marketing/)

## Common mistakes

### Photo aspect ratio crops the property out of frame

A vertical phone photo of a kitchen crops the cabinets out of view when squeezed into a horizontal hero slot. Pre-crop the source photo to 4:3 or wider on your side, or supply a different photo for the card than the one in the MLS gallery.

### Price formatting differs by market

The same dollar value renders as "$450,000" in California, "£450k" in the UK, and "€450.000" in Germany. Format the price string per market on your side and pass the formatted result, since the renderer does not parse or localize the value.

### Agent contact details exposed on public cards

Cards intended for public Instagram should not show the agent's direct phone number. Set show_agent_contact to false for public posts and true for private CRM-driven shares, so the same template serves both audiences.

## Questions

### What size works for Instagram?

The 1200x900 output works for Instagram feed posts and crops cleanly to 4:5 portrait if your account favors that aspect. For Stories, switch to the instagram-story template at 1080x1920. Both can be generated from the same property data with two requests. Agents who need a window card can add format: "pdf" and print the listing straight from the A4 file.

### How many photos can I include?

The card shows one hero photo via property_image_url. For multi-photo carousels, render multiple cards with different photos and post them as an Instagram or Facebook carousel. The hero photo determines the visual hook, so pick the most attention-grabbing shot.

### Will this fit MLS exports?

Yes, the input fields map cleanly to standard MLS columns: list price, address, beds, baths, sqft, status, and agent details. Most brokerages script the mapping once and feed daily exports through it. Custom MLS fields can be ignored or appended via the description field.

### Can I show the agent photo?

Yes, pass agent_avatar_url with a public URL to a square portrait. The renderer crops it to a circle and places it in the agent block beside the listing details. For public-facing cards, agents often prefer a professional headshot rather than a casual photo.

### Should I include the address publicly?

Set show_address to false for cards posted publicly to keep the exact address private until a buyer expresses interest. For private agent-to-client cards, leave it true so the recipient knows exactly which property is being shared.

### Can I batch-render the entire portfolio?

Yes, loop through your listings and call the endpoint per property. The renders run in parallel from your worker pool, and most batches of a few hundred properties complete in under 5 minutes. Cache the URLs on the listing record to avoid re-rendering when the data has not changed.

## Preview

![Real Estate Listing Image Generator API example render](https://i.html2img.com/image-1777560079878-957965.png)

## See also

- [Every template](https://html2img.com/templates/)
- [Templates API reference](https://html2img.com/docs/templates/)
- [OpenAPI specification](https://html2img.com/openapi.json)
