API / Static Images
GET /v1/images/static

Static Images API.

Generate flat map images server-side — from a bounding box, a centre point, or a coordinate set with GeoJSON overlays — with no browser, no WebGL, and no rendering pipeline.

One HTTP request returns a PNG or WebP image ready to embed in PDFs, emails, dashboards, reports, and notification cards. Pass route geometry as GeoJSON and it renders directly into the image — no client-side compositing required.

API OPERATIONAL · View status
# Generate a 800×500 map centred on New Delhi
curl "https://api.farun.io/v1/images/static" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: farun-maps.p.rapidapi.com" \
  -G \
  --data-urlencode "center=77.2090,28.6139" \
  --data-urlencode "zoom=12" \
  --data-urlencode "size=800x500" \
  --data-urlencode "format=png" \
  --output map.png

# Response: binary PNG — ready to embed or store

Format

PNG or WebP

Max size

1280×1280 px

Overlay

GeoJSON supported

Output modes

Three ways to define the image.

Pass a centre point and zoom, a bounding box, or a GeoJSON geometry and let the API fit the frame automatically. Every mode returns a single image — no stitching, no post-processing.

Centre + zoom
?center=lon,lat&zoom=N

Fixed viewpoint

Specify a longitude/latitude centre and a zoom level. The image is centred exactly on that coordinate. Ideal for place cards, location thumbnails, and address previews.

Bounding box
?bbox=west,south,east,north

Geographic extent

Pass a bounding box and the API fills the requested image dimensions to that extent. Useful for region overviews, service area maps, and coverage summaries where the area matters more than a fixed zoom.

GeoJSON auto-fit
?geojson=...&padding=N

Geometry-fitted frame

Pass a GeoJSON Feature or FeatureCollection and the API fits the frame to the geometry bounds with optional padding. Route lines, polygons, and point clusters are rendered directly into the image.

Who uses it

Maps in documents, emails, and pipelines.

Static map images solve the problem of needing a map in a context where a live, interactive map is impossible — inside a PDF, an HTML email, a Slack notification, or a server-rendered report. One API call returns the image. No JavaScript required on the consuming side.

Fleet & Logistics

Trip summary maps

Attach a static route map to every completed trip report. Pass the route GeoJSON from the Routing API directly as an overlay — the image renders the full journey path on a clean map background, ready to embed in a PDF or email.

Insurance & Claims

Incident location snapshots

Generate a map image centred on a reported incident coordinate for every claims document. Combine with terrain map layers for context on accident reports in hilly or mountainous areas.

Real Estate & Property

Listing and valuation maps

Generate a property location map for every listing page, valuation report, or agent brochure — server-side, without embedding a live map widget. Bounding-box mode auto-frames the neighbourhood.

Operations & Dispatch

Operational briefing maps

Include a daily route map or zone coverage image in morning briefing emails. The Isochrone API generates the coverage polygon; pass it as GeoJSON to Static Images to produce a map card ready for any email client.

Developer Tools

Map previews in SaaS products

Add a map thumbnail to any SaaS dashboard card, user profile, or activity feed item — without loading a full interactive map widget per card. One cached image per location, generated once and stored.

Marine & Field Ops

Pre-departure chart printouts

Generate a nautical or terrain chart image before a voyage or field mission — printable, offline-ready, and embeddable in mission briefing documents. Use the bbox parameter to frame the operational area precisely.

GeoJSON Overlays

Routes, polygons, and markers — rendered into the image.

Pass a GeoJSON Feature or FeatureCollection as a query parameter and the API renders it directly into the map image. Route lines, isochrone polygons, bounding areas, and point markers are all supported. No client-side compositing needed.

  • LineString Route paths from the Routing API — rendered as a line with configurable colour and weight
  • Polygon / MultiPolygon Isochrone areas, service zones, and coverage polygons with fill and stroke styling
  • Point / MultiPoint Location markers rendered as pins or dots at specified coordinates
  • FeatureCollection Mix geometry types in a single overlay — render a route with start/end markers in one request
Route overlay — curl example Shell
# 1. Get a route from the Routing API
ROUTE=$(curl -s "https://api.farun.io/v1/routing/directions" \
  -d '{"origin":[77.20,28.61],"dest":[77.10,28.70]}' \
  | jq '.geometry')

# 2. Pass the geometry to Static Images as an overlay
curl "https://api.farun.io/v1/images/static" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -G \
  --data-urlencode "geojson=$ROUTE" \
  --data-urlencode "padding=60" \
  --data-urlencode "size=900x500" \
  --data-urlencode "overlay_color=%23ea580c" \
  --data-urlencode "overlay_width=3" \
  --output route-map.png
overlay_color

Hex colour for line/stroke

overlay_width

Stroke width in pixels

fill_color

Polygon fill colour + opacity

marker_color

Point marker colour

Endpoint reference

GET https://api.farun.io/v1/images/static

Query parameters

center
string
Longitude,latitude. Required if bbox and geojson are not provided. e.g. 77.2090,28.6139
zoom
integer
Zoom level 0–16. Required when using center mode.
bbox
string
west,south,east,north. Mutually exclusive with center.
geojson
string
URL-encoded GeoJSON Feature or FeatureCollection. Auto-fits frame to geometry bounds.
size
string
Output dimensions as WxH. Max 1280×1280. Default: 600x400.
format
string
png (default) or webp. WebP is ~30–50% smaller.
padding
integer
Pixel padding around geometry when using geojson or bbox mode. Default: 40.
style
string
Farun map style preset. Default: farun-standard. Options: farun-dark, farun-nautical, farun-terrain.
retina
boolean
Return a 2× resolution image for high-DPI displays. Default: false.

Response codes

200 image/png or image/webp Map image. Cache using standard HTTP cache headers.
400 Bad request Missing or conflicting parameters (e.g. center + bbox together), or invalid GeoJSON.
401 Unauthorized Missing or invalid RapidAPI key.
413 Payload too large GeoJSON overlay exceeds the maximum allowed size.
422 Unprocessable Valid parameters but geometry falls outside supported coverage area.
429 Rate limited Request rate exceeds your plan. Upgrade on RapidAPI.

Server-side integration

Node.js — generate and store a trip map TypeScript
async function generateTripMap(
  routeGeoJson: GeoJSON.LineString
): Promise<Buffer> 

  const params = new URLSearchParams(
    geojson:       JSON.stringify(routeGeoJson),
    size:          '900x500',
    padding:       '60',
    format:        'webp',
    overlay_color: '%23ea580c',
    overlay_width: '3',
  );

  const res = await fetch(
    `https://api.farun.io/v1/images/static?$${params}`,
    {  headers: { 'X-RapidAPI-Key': process.env.RAPIDAPI_KEY } }
  );

  return Buffer.from(
    await res.arrayBuffer()
  );
}

Always call this server-side. Never expose your RapidAPI key in client-side code. Generate the image on your backend and serve it as a static asset or embed it inline.

Output format

PNG or WebP

Max dimensions

1280 × 1280 px

Retina (2×)

Supported via ?retina=true

GeoJSON types

Point, Line, Polygon, Collection

Map styles

Standard, dark, nautical, terrain

Cache headers

Cache-Control: max-age=86400

How it compares

Farun vs Mapbox Static Images API.

Both APIs generate server-side map images from coordinates and overlays. The differences are in pricing structure, GeoJSON support, private hosting, and offline tile use.

Capability Farun Mapbox
Output formats PNG + WebP PNG + JPEG
GeoJSON overlay Full FeatureCollection support Limited — path and marker only
Auto-fit to geometry Yes — geojson mode with padding No — requires manual bbox
Nautical map style Built-in farun-nautical style Not available
Terrain / topo style Built-in farun-terrain style Satellite only
Retina (2x) support Yes — ?retina=true Yes — @2x suffix
Private hosting Available for enterprise Not available
Pricing model Pay-as-you-go via RapidAPI Mapbox account + map loads
Free tier 500 images / month 50,000 static tile requests / month

Often used together

Start building

A map in your PDF
in one request.

Subscribe on RapidAPI for instant key access. The free tier covers 500 static map images per month — enough to build and test a complete report or notification pipeline.