YandexStatic

FREE
By raygorodskij
Updated 4 months ago
Mapping
-/10
Popularity Score
-
Latency
-
Success Rate

YandexStatic API Documentation

The Static API generates a map image based on the parameter values passed to the service.

View API Details
POSTgetStaticMap
POSTgetStaticMap

The Static API generates a map image in accordance with the values ​​of the parameters passed to the service.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
mapTypeLIST
REQUIREDThe list of layers that determine the type of map.
mapCenterMAP
REQUIREDLongitude and latitude of the center of the map in degrees.
Optional Parameters
markersDefinitionsLIST
OPTIONALContains descriptions of one or more labels that you want to display on the map.
geoFiguresDefinitionsLIST
OPTIONALContains a set of descriptions of geometric shapes (polygons and polygons) that you want to display on the map.
zoomNUMBER
OPTIONALThe zoom level of the map (0-17).Can not be used with viewportRange parameter.
keySTRING
OPTIONALAPI Yandex key.
scaleSTRING
OPTIONALThe coefficient of magnification of objects on the map. Can take a fractional value from 1.0 to 4.0.
showTrafficSELECT
OPTIONALShow traffic on map.
sizeSTRING
OPTIONALThe width and height of the requested map image (in pixels), see Map size. The default value is 650x450.Example - 400,400.
viewportRangeSTRING
OPTIONALThe length of the map display area by longitude and latitude (in degrees). Can not be used with zoom parameter. Example - 0.01,0.01
langSTRING
OPTIONALAPI allows you to display maps, localized in different languages, taking into account the specifics of individual countries.Example - en_US.
Code Snippet
unirest.post("https://YandexStaticraygorodskijV1.p.rapidapi.com/getStaticMap")
.header("X-RapidAPI-Host", "YandexStaticraygorodskijV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://YandexStaticraygorodskijV1.p.rapidapi.com/getStaticMap
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://YandexStaticraygorodskijV1.p.rapidapi.com/getStaticMap")
.header("X-RapidAPI-Host", "YandexStaticraygorodskijV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication