Error Messages

Beginning September 10, 2018, usage for self-serve customers in
Brazil, Canada, and India will be limited to $200/month. This situation is
temporary. Please see the Maps FAQ
for more details.

The Maps Static API may issue an error or warning when something goes
wrong. This guide explains each error message, and provides further
instructions for resolving errors.

Invalid requests

In the case of an invalid request, the Maps Static API returns
an HTTP 4xx status code and a message describing the
problem. Below are examples of such error conditions. Note: This is not
a complete list of the possible errors. Please check the actual error code
and message returned by the API for details of specific problems.

Example of error condition

Status code

The request includes an invalid parameter, or a required parameter is
missing. For example, the size parameter is not within the
expected range of numeric values, or is missing from the request.

400 BAD REQUEST

The API key included in the request is invalid.

403 FORBIDDEN

Errors that prevent a map from being displayed

If the request is valid, but another error occurs that prevents the map from
being displayed, the Maps Static API returns either text or an error
image instead of the map, depending on the error. An example of such an error
condition is when the application exceeds its
usage limits.
Figure: An error image displayed instead of a map

Errors related to API keys and billing

If you use the Maps Static API without an API key, or if billing
is not enabled on your account, the page displays an error image instead of a
map, with a link indicating the type of error. For example
"g.co/staticmaperror/key".

Keyless errors and solutions

You are using the Maps Static API without an API key. To
resolve, you must:

An error occurred while attempting to geocode the request. There are
many variants of this message, depending on the element where geocoding
failed (center, marker, visible, or path) and the number of elements
that failed. One example of this warning is
X-Staticmap-API-Warning:Error geocoding: marker 1, as
shown in the above example.

Too many geocoded markers requested (max is 15).

The request specifies more than the allowed maximum number of markers
with a human readable address. The maximum is 15. Note that this limit
applies only to markers specified as a human-readable address that
requires geocoding. It does not apply to markers specified with
latitude/longitude coordinates.

Too many geocoded polyline vertices requested (max is 15).

The request specifies more than the allowed maximum number of polylines
with a human readable address. The maximum is 15. Note that this limit
applies only to polylines with vertices specified as human-readable addresses that
require geocoding. It does not apply to polylines specified with
latitude/longitude coordinates.

Note: You should check for HTTP header warnings if
you notice the yellow error bar on the map indicating that something may be missing from
the map. It's also a good idea to check for warnings before launching a new application.
Consider also whether user input or internationalization could lead to unexpected characters
or malformed latitude/longitude coordinate specifications in the request.