Google Maps Image APIs
Feedback on this document

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,%20-73.988354&fov=90&heading=235&pitch=10&sensor=false

API Key

Note: Maps for Business users must include a client and signature parameters with their requests instead of a key. Please refer to the Maps API for Business Web Services chapter for more information.

The Street View Image API uses an API key to identify your application. API keys are managed through the Google APIs console. To activate the Street View API and 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, then activate the Street View Image 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 Image API applications use the Key for browser apps.

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.

Including a key in your request allows you to track usage of the API in the APIs Console, and to purchase additional quota if required. 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,%20-73.988354&sensor=false&key=API_KEY

Note that the use of a key is not required, though it is recommended. Examples in this document do not include the key parameter so that they will work for all users who cut-and-paste the code.

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.

The Google Street View Image API has the following usage limits:

  • 25 000 Street View image requests per 24 hours.

Additional image requests can be purchased at the rate currently listed in the FAQ.

If a user exceeds these limits, the server will return an HTTP 403 status and display the below image to indicate that the quota has been exceeded:

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

  • 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.
  • 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.
  • 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 Community.



Authentication required

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

Signing you in...

Google Developers needs your permission to do that.