Google Maps Image APIs

Google Street View Image API

  1. Introduction
  2. API Key
  3. Usage Limits
  4. URL Parameters
  5. More Information

Introduction

The Google Street View Image API lets you embed a static (non-interactive) Street View panorama or thumbnail into your web page, without the use of JavaScript. The viewport is defined with URL parameters sent through a standard HTTP request, and is returned as a static image.

http://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&fov=90&heading=235&pitch=10&sensor=false

API Key

Note: Maps for Business users must include client and signature parameters with their requests instead of a key.

All Street View API applications should use an API key. Including a key in your request:

  • Allows you to monitor your application's API usage in the APIs Console.
  • Enables per-key instead of per-IP-address quota limits.
  • Ensures that Google can contact you about your application if necessary.

The Street View API uses an API key to identify your application. API keys are managed through the Google APIs console. To create your key:

  1. Visit the APIs console at https://code.google.com/apis/console and log in with your Google Account.
  2. Click the Services link from the left-hand menu in the APIs Console, then activate the Street View API service.
  3. Once the service has been activated, your API key is available from the API Access page, in the Simple API Access section. Street View API applications use the Key for server apps.

To specify a key in your request, include it as the value of a key parameter.

Note: By default, a key can be used from any server. We strongly recommend that you restrict the use of your key by IP address to servers that you administer. You can specify which IP addresses are allowed to use your API key by clicking the Edit allowed referers... link in the API console.

Note: HTTPS is enforced for requests that include an API key.

Note: Maps for Business users must include client and signature parameters with their requests instead of a key.

All Street View API applications should use an API key. Including a key in your request:

  • Allows you to monitor your application's API usage in the APIs Console.
  • Enables per-key instead of per-IP-address quota limits.
  • Ensures that Google can contact you about your application if necessary.

The Street View API uses an API key to identify your application. API keys are managed through the Google APIs console. To create your key:

  1. Visit the APIs console at https://code.google.com/apis/console and log in with your Google Account.
  2. Click the Services link from the left-hand menu in the APIs Console, then activate the Street View API service.
  3. Once the service has been activated, your API key is available from the API Access page, in the Simple API Access section. Street View API applications use the Key for browser apps.

To specify a key in your request, include it as the value of a key parameter.

Note: By default, a key can be used on any site. We strongly recommend that you restrict the use of your key to domains that you administer. You can specify which domains are allowed to use your API key by clicking the Edit allowed referers... link in the API console.

Examples in this document exclude the key parameter so that they will work for people who cut and paste the code.

To specify a key in your request, include it as the value of a key parameter:

http://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&sensor=false&key=API_KEY

Usage Limits

Google Maps API for Business customers have different quotas than those listed below. A Static Street View request is considered a 'page view' for the purposes of Google Maps API for Business quota management and is applied against the total number of page views purchased with the Google Maps API for Business license.

Most websites and applications may use the Google Street View API free of charge. However, if you consistently generate a high amount of traffic, usage limits apply and you will need to pay for extra usage. If your site or application generates 25 000 Street View image requests or more each day, for more than 90 consecutive days, we'll attempt to get in touch with you to talk about payment. Don't worry, if you go over the limits, we won't immediately shut off your API access or display error messages on your site.

If you think your website or application will generate high Street View image requests consistently in the long term, you should consider one of the following options:

  • Modify your application so that your usage is less than 25 000 Street View image requests per day.
  • Enroll for automated billing of excess image requests in the Google APIs Console. Additional image requests can be purchased at the rate currently listed in the FAQ.
  • Purchase a Maps API for Business license.

Image Sizes

Street View images can be returned in any size up to 640 by 640 pixels.

Google Maps API for Business customers who are correctly signing their URLs can request images up to 2048 by 2048 pixels.

URL Parameters

A Street View Image request is an HTTP URL of the following form:

http://maps.googleapis.com/maps/api/streetview?parameters

The image is specified using request parameters. As is standard in URLs, all parameters are separated using the ampersand (&) character. Allowed parameters and their possible values are listed below.

Required parameters

Either:

  • location can be either a text string (such as Chagrin Falls, OH) or a lat/lng value (40.457375,-80.009353). The Street View Image API will snap to the panorama photographed closest to this location. Because Street View imagery is periodically refreshed, and photographs may be taken from slightly different positions each time, it's possible that your location may snap to a different panorama when imagery is updated.

Or:

  • pano is a specific panorama ID. These are generally stable.

As well as both of:

  • size specifies the output size of the image in pixels. Size is specified as {width}x{height} - for example, size=600x400 returns an image 600 pixels wide, and 400 high.
  • sensor indicates whether or not the request came from a device using a location sensor (e.g. a GPS) to determine the location sent in this request. This value must be either true or false.

Maps API for Business users must include valid client and signature parameters with their requests. Please refer to the Maps API for Business Web Services chapter for more information.

Optional parameters

  • heading indicates the compass heading of the camera. Accepted values are from 0 to 360 (both values indicating North, with 90 indicating East, and 180 South). If no heading is specified, a value will be calculated that directs the camera towards the specified location, from the point at which the closest photograph was taken.
  • fov (default is 90) determines the horizontal field of view of the image. The field of view is expressed in degrees, with a maximum allowed value of 120. When dealing with a fixed-size viewport, as with a Street View image of a set size, field of view in essence represents zoom, with smaller numbers indicating a higher level of zoom.



    (Left: fov=120; Right: fov=20)

  • pitch (default is 0) specifies the up or down angle of the camera relative to the Street View vehicle. This is often, but not always, flat horizontal. Positive values angle the camera up (with 90 degrees indicating straight up); negative values angle the camera down (with -90 indicating straight down).
  • key (optional) identifies your application for quota purposes, and enables reports in the APIs Console. For information about obtaining a unique key for your application, please read the API Key section of this document.

An example request is shown below.

http://maps.googleapis.com/maps/api/streetview?size=600x300&location=46.414382,10.013988&heading=151.78&pitch=-0.76&sensor=false

More Information

For more information on using the Street View Image API, or other Google Maps API products, be sure to check out the Maps API Support page.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.