Image endpoint
Render a Yatmo map as a static JPEG. Same look as the interactive map, but baked into an image you can embed anywhere — emails, PDF reports, social previews, server-rendered listing pages.
GET
https://{country}.yatmo.com/image
LicenseKey header
Returns a JPEG (Content-Type: image/jpeg). Computed live with a headless browser; expect ~1-2s latency on the first call.
When to use it
- Emails — clients send listing emails with an image of the property’s map (interactive maps don’t work in most mail clients).
- PDF reports — brochures, valuations, listing summaries that need to print.
- Open Graph / social media previews — the image that shows when someone shares a listing URL on LinkedIn, Facebook, etc.
- Server-rendered pages — SEO-critical listing pages that ship a map image in the HTML before JavaScript runs.
- Fallback for browsers / contexts where running the interactive map isn’t possible.
Request
Required parameters
| Name | In | Type | Description |
|---|---|---|---|
| latitude required | query | double | Latitude of the property to center on. |
| longitude required | query | double | Longitude of the property to center on. |
| hexaColor required | query | string |
Hex color for the pin marker, without the # — e.g. af0014 or 06A7EA.
|
| width required | query | integer | Image width in pixels (the resulting JPEG is rendered at 2× device-pixel-ratio for sharpness, then downscaled to this size). |
| height required | query | integer | Image height in pixels. |
Optional parameters
| Name | In | Type | Description |
|---|---|---|---|
| mapStyle | query | integer |
Basemap style. Matches the styles available on the interactive map.
Default: 1. |
| threeDMode | query | boolean |
If true, render the map in 3D perspective view instead of flat top-down.
Default: false. |
| bigIcon | query | boolean |
If true, render POI icons at a larger size — useful when the image will be displayed small but you still want POIs to read.
Default: false. |
| multiborders | query | boolean |
If true, draw multiple administrative borders (neighbourhood, commune, district) on the map.
Default: false. |
| customMarkerUrl | query | string |
HTTPS URL to a PNG or SVG to use instead of the default pin. When provided, customMarkerWidth and customMarkerHeight are also required.
|
| customMarkerWidth | query | integer |
Custom marker width in pixels. Required when customMarkerUrl is set.
|
| customMarkerHeight | query | integer |
Custom marker height in pixels. Required when customMarkerUrl is set.
|
Examples
# Save the rendered map straight to disk.
curl -H 'LicenseKey: YOUR_KEY' \
'https://be.yatmo.com/image?latitude=50.8520525&longitude=4.3442926&hexaColor=06A7EA&width=800&height=450&mapStyle=1' \
-o property-map.jpg
// Server-side (Node.js): download and persist the snapshot
const res = await fetch(
'https://be.yatmo.com/image?latitude=50.8520525&longitude=4.3442926&hexaColor=06A7EA&width=800&height=450',
{ headers: { LicenseKey: process.env.YATMO_BACKEND_KEY } }
);
const buffer = Buffer.from(await res.arrayBuffer());
await fs.writeFile('property-map.jpg', buffer);
// Or pipe it straight to an Express response:
// res.set('Content-Type', 'image/jpeg').send(buffer);
$qs = http_build_query([
'latitude' => 50.8520525,
'longitude' => 4.3442926,
'hexaColor' => '06A7EA',
'width' => 800,
'height' => 450,
'mapStyle' => 1,
]);
$ch = curl_init("https://be.yatmo.com/image?$qs");
curl_setopt($ch, CURLOPT_HTTPHEADER, ['LicenseKey: ' . getenv('YATMO_BACKEND_KEY')]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$jpeg = curl_exec($ch);
curl_close($ch);
file_put_contents('property-map.jpg', $jpeg);
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("LicenseKey",
Environment.GetEnvironmentVariable("YATMO_BACKEND_KEY"));
var qs = "latitude=50.8520525&longitude=4.3442926&hexaColor=06A7EA" +
"&width=800&height=450&mapStyle=1";
var jpeg = await http.GetByteArrayAsync($"https://be.yatmo.com/image?{qs}");
await File.WriteAllBytesAsync("property-map.jpg", jpeg);
Notes
First call is slower
Each image is rendered fresh: Yatmo spins up a headless browser, loads the interactive map, waits for tiles + POIs to settle, then captures a screenshot. Expect ~1-2 seconds on the first call for a new (latitude, longitude, style) tuple. Cache the result on your side — most use cases (emails, PDFs, social previews) only need to fetch each image once.
- Backend-only. Use your backend key. The endpoint is meant to be called server-side and its output cached; do not call it directly from a browser
<img src>in production. - Hex color without the
#. Unlike other endpoints,hexaColortakes the raw hex digits —af0014, not%23af0014or#af0014. - Sharp at 2×. The browser renders at
deviceScaleFactor: 2then downscales to your requestedwidth×height. Output looks crisp on high-DPI screens. - Custom markers. If you set
customMarkerUrlyou must also setcustomMarkerWidthandcustomMarkerHeight— the call returns 400 otherwise. - Output is always JPEG. Content-Type is
image/jpeg; quality is set to 100. If you need PNG or WebP, transcode on your side.