Source: https://developers.woosmap.com/api-reference/static-map-api/get-maps-static/

> For clean Markdown of any page, append `.md` to the page URL.

> For a complete documentation index, see https://developers.woosmap.com/llms.txt

# Get Static Map



# Get Static Map

 GET 
https://api.woosmap.com/maps/static

Retrieve a static map

**Ratelimit:** 20/1s

### Authorization

[`key`](#authorization-maps-publicapikey)
apiKeyquery

Public key of the project usually starts with `woos-`

[`private_key`](#authorization-maps-privateapikey)
apiKeyquery

Private key with or without write permission.

[`X-Api-Key`](#authorization-maps-privateapikeyheader)
apiKeyheader

Private key with or without write permission.

### Query Parameters

[`language`](#query-language)
object

[`lat`](#query-lat)
numberrequired

Example:`43.6`

[`lng`](#query-lng)
numberrequired

Example:`3.883`

[`zoom`](#query-zoom)
numberrequired

The zoom

Example:`11`

[`width`](#query-width)
integerrequired

Width in pixels. width \* height must not exceed 409,600.

Example:`400`

[`height`](#query-height)
integerrequired

Height in pixels. width \* height must not exceed 409,600.

Example:`400`

[`markers`](#query-markers)
array

Adds a marker.

The images are by default are considered to be non retina images (pixel resolution=1)

If the image name contains @2x or the query parameter retina=yes are found in the marker url the image will be considered to be retina (pixel resolution=2).

> Note: the image size in bytes cannot exceed 65535 bytes.

Example:`{"lat": 43.6, "lng": 3.883, "url": "https://webapp.woosmap.com/img/geolocated_marker.png?retina=yes"}`

[`polylines`](#query-polylines)
array

Add a polyline.

> Note: enc should be a google encoded polyline see [Google-encoded polyline](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) for more information

Example:`{"enc": "ydjiG_}jVjn@cjAf`AycBnc@mqCp\\ewBrQmlBzrAeuCreBw_C", "color": "magenta", "weight": 4}`

[`polygons`](#query-polygons)
array

Adds a polygon.

> Note: shape should be a google encoded polyline see [Google-encoded polyline](https://developers.google.com/maps/documentation/utilities/polylinealgorithm) for more information

Example:`{"shape": "ymgiGm|rV~uAtaB|dAefCqeBwuFu~@njC??", "fill_color": "rgba(255, 20, 147, 0.5)", "color": "rgba(199, 21, 133, 0.7)"}`

[`retina`](#query-retina)
booleanDefaults to `false`

[`stylers`](#query-stylers)
string

Example:`[{"featureType": "points_of_interest.business", "stylers":[{"visibility": "off"}]}]`

### Response

200image/webp

Successful Response

No properties defined

### Errors

#401

Unable to locate credentials.

 

`application/json`

[`detail`](#err-401-detail)
stringrequired

#402

Out of free quota.

 

`application/json`

[`detail`](#err-402-detail)
stringrequired

#403

Credentials found, but not matching.

 

`application/json`

[`detail`](#err-403-detail)
stringrequired

#422

Validation Error

 

`application/json`

[`detail`](#err-422-detail)
object[]

Show 5 propertiesHide 5 properties

detail.[`loc`](#err-422-detail-loc)
any[]required

detail.[`msg`](#err-422-detail-msg)
stringrequired

detail.[`type`](#err-422-detail-type)
stringrequired

detail.[`input`](#err-422-detail-input)
any

detail.[`ctx`](#err-422-detail-ctx)
object

#429

Rate limit reached

 

`application/json`

[`details`](#err-429-details)
stringrequired

```shell
curl -L 'https://api.woosmap.com/maps/static?lat=48.8566&lng=2.3522&zoom=14&width=600&height=400&markers=48.8566%2C2.3522&language=en&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'
```

```javascript
const requestOptions = {
  method: "GET",
  redirect: "follow"
};

fetch("https://api.woosmap.com/maps/static?lat=48.8566&lng=2.3522&zoom=14&width=600&height=400&markers=48.8566%2C2.3522&language=en&key=YOUR_PUBLIC_API_KEY", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
```

```python
import requests

url = "https://api.woosmap.com/maps/static?lat=48.8566&lng=2.3522&zoom=14&width=600&height=400&markers=48.8566%2C2.3522&language=en&key=YOUR_PUBLIC_API_KEY"

payload = {}
headers = {
    'Referer': 'http://localhost'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)
```
