Street View Tiles

Street View exampleStreet View Tiles are similar to 2D Tiles except that they contain panoramic imagery taken at street level. With Street View, you can explore world landmarks, see natural wonders, and step inside places such as museums, arenas, restaurants, or small businesses. This API endpoint gives you access to:

  • Google Maps Street View Tiles
  • Street View metadata
  • Street View thumbnails

You can stitch together image tiles taken from the street level to create a real-life panoramic effect. And you can query up to 100 panorama IDs for a set of locations (such as a route), and get more in-depth metadata about the camera position.

A viewer is required to stitch Street View Tiles together. For example, the Street View custom panorama viewer.

Once you have an API key, you can access the Street View imagery by performing the following steps.

  1. Get a session token. Be sure to set the value of mapType to streetview.

  2. Use the session token to get the panorama identifier (panoId) of one or more geographic locations.

  3. Use the panorama identifiers from the panoId search response to get:

    1. Street View metadata. You can also get Street View metadata by passing a set of coordinates and a radius.

    2. Street View thumbnails.

    3. Street View Tiles.

Street View methods

You can access Street View imagery and metadata by calling one of the following four methods.

Method Description
https://tile.googleapis.com/v1/streetview/tiles Returns the individual Street View Tiles. You can retrieve Street View Tiles at six zoom levels: from 512 pixels, up to 13,312 pixels.
https://tile.googleapis.com/v1/streetview/panoIds Lets you search in bulk for up to 100 locations. Returns panorama IDs for all locations with imagery.
https://tile.googleapis.com/v1/streetview/thumbnail Returns a thumbnail JPEG image of a Street View scene. Lets you provide a heading, pitch, dimensions, and field of view. Minimum dimensions are 16x16 pixels. Maximum dimensions are 250x600 pixels.
https://tile.googleapis.com/v1/streetview/metadata Provides detailed information about the specified panorama. Details include the related address, and links to adjacent panoramas.

You can find the panorama identifier of one or more geographic locations by passing their coordinates (lat, lng) to the panoIds method. The request body is a JSON object that contains a locations array and optionally, a radius, as shown in the following JSON code example.

curl -X POST -d '{
  "locations": [
    {"lat": -33.883837, "lng": 151.209307},
    {"lat": -33.883700, "lng": 151.210307},
    {"lat": 0, "lng": 0}
  ],
  "radius": 50
}' \
-H 'Content-Type: application/json' \
"https://tile.googleapis.com/v1/streetview/panoIds?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY"
locations
The locations array must contain at least one set of coordinate values, but you can include more—up to a maximum of 100.
radius
The radius value (measured in meters) defines the radius of the circle around the given location, in which to search for panoramas. The default value is 50 meters.

PanoId response

The Map Tiles API tries to find the panorama closest to each location, and then it returns their panorama IDs. A successful panoIds request returns a JSON object that contains a panoIds array. The array contains a list of panorama IDs, in the order in which you requested them. If Map Tiles API can't find any panoramas for the locations that you requested, then an empty string is returned at that location in the array. For an example, see the following JSON code.

{
  "panoIds": [
    "ACfH-n2HcBvRry_3oc9grw",
    "f5DJZatBAAAXHlooS2wKbw",
    ""
  ]
}

You can use panoIds to:

Street View metadata

Street View metadata requests retrieve information about panoramas. A Street View metadata request is an HTTPS GET request. You can retrieve information about panoramas in one of two ways:

  • If you pass a pano_id, then Map Tiles API returns the metadata for that panorama.

  • But if you pass a lat and lng, then Map Tiles API returns the metadata for the nearest panorama within the given search radius.

Pass a set of coordinates and a radius

curl "https://tile.googleapis.com/v1/streetview/metadata?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY&lat=lat&lng=lng&radius=meters"

Since panorama IDs are transient, we recommend that you pass a set of coordinates and a radius value in your initial Street View metadata request. For an example, see the following code snippet.

curl "https://tile.googleapis.com/v1/streetview/metadata?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY&lat=47.62066&lng=-122.34923&radius=50"

Pass the panoId of a Street View image

curl "https://tile.googleapis.com/v1/streetview/metadata?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY&panoId=panoId"

Metadata response

The following JSON code is an example of a typical metadata response.

{
 "panoId": "rZ9KeTyhA11i0VppYNzsSg",
 "lat": 37.420864219339165,
 "lng": -122.08446528377291,
 "imageHeight": 6656,
 "imageWidth": 13312,
 "tileHeight": 512,
 "tileWidth": 512,
 "heading": 94.35,
 "tilt": 88.39652,
 "roll": 1.7181772,
 "imageryType": "outdoor",
 "date": "2023-01",
 "copyright": "© 2023 Google",
 "reportProblemLink": "https://cbks0.googleapis.com/cbk?output=report&panoid=rZ9KeTyhA11i0VppYNzsSg&cb_client=api&cbp=1,0,,0,0&hl=en-US&gl=us",
 "addressComponents": [
  {
   "longName": "United States",
   "shortName": "United States",
   "types": [
    "country"
   ]
  },
  {
   "longName": "Mountain View, California",
   "shortName": "Mountain View, California",
   "types": [
    "locality"
   ]
  },
  {
   "longName": "Charleston Rd",
   "shortName": "Charleston Rd",
   "types": [
    "route"
   ]
  },
  {
   "longName": "1635",
   "shortName": "1635",
   "types": [
    "street_number"
   ]
  }
 ],
 "links": [
  {
   "panoId": "Yw4pqzA4FEq1qs-BwZSvSQ",
   "heading": 274.47998046875,
   "text": "Charleston Rd"
  },
  {
   "panoId": "1cODYwFRw1aZ45IignDIMw",
   "heading": 94.47999572753906,
   "text": "Charleston Rd"
  }
 ]
}

The following list contains definitions of the fields in the response body.

panoId
The unique ID of this panorama. You shouldn't rely on Panorama IDs being valid for longer than a single user session.
lat, lng
The coordinates (latitude and longitude) of the panorama. These values can be different from the coordinates that you passed in the request because the location snaps to the nearest panorama.
imageHeight, imageWidth
The dimensions of the stitched panorama image.
tileHeight, tileWidth
The dimensions of a single panorama tile.
heading
The compass heading, measured in degrees, clockwise from North. Headings are returned within the range [0,360], with 0 representing due North.
tilt
The tilt of the panorama, measured in degrees from the south pole of the panorama to the horizon. Returned values are within the range [0, 180]. A value of 90 degrees indicates that the horizon is already aligned at the equator of the panorama.
roll
The clockwise rotation around the line of sight that was applied to the panorama to level the horizon. Returned values are within the range [0, 360].
imageryType
Indicates the type of image. Valid values are indoor and outdoor.
date
The date when the image was taken. Not all images have date data. But when it's available, this field contains a combination of the year (YYYY) and month (MM). For example: 2023-05, or 2024.
copyright
The copyright text that you must display as attribution along with the Street View image.
reportProblemLink
A hyperlink for your users to use for reporting problems with this street view tile. You must display this hyperlink in the bottom right-hand corner of the image, and it must include link text that says something like "Report a problem with this image".
addressComponent
A structured Geocode that contains details about the address of the panorama. For more information, see Geocoding requests and responses in the Geocoding API documentation.
links
A list of panorama IDs that link to this one. Also contains the heading on which the link is found. For example, if the heading is 180°, then the linked panorama is due south of the current panorama. Note that because of the transient nature of panorama IDs, you should not rely on these for more than a single user session.

Street View thumbnails

You can request Street View imagery in thumbnail format. Thumbnails are non-tiled images with user-defined size, heading, pitch, and field of view. Thumbnail images have a lower resolution than tiles, and are smaller in file size. You make a thumbnail request by sending a GET request to the thumbnail endpoint, as demonstrated in the following code prototype.

curl "https://tile.googleapis.com/v1/streetview/thumbnail?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY&panoId=panoId&height=FROM_16_TO_250&width=FROM_16_TO_600&pitch=FROM-90_TO_90&yaw=FROM-360_TO_360&fov=FROM_30_TO_120"

Consider the following code example, which downloads a thumbnail of Street View imagery taken in Whistler, Canada.

curl "https://tile.googleapis.com/v1/streetview/thumbnail?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY&panoId=Zzl28rqGJgaL2IdkUleP8A&height=200&width=200&pitch=0&yaw=250&fov=80" --output /tmp/example_thumbnail.png

Street view thumbnail of Whistler, Canada

Required parameters

panoId
The unique ID of the thumbnail that you want. You can get panorama ID values from the panoIds endpoint, or from the metadata endpoint—both of which accept geographic coordinates, and return the appropriate panoId.
session
A valid session token.
key
Your API key.

Optional parameters

height
Specifies the height of the thumbnail in pixels, ranging from 16 pixels to 250 pixels. If you don't specify a height, then the height defaults to the maximum allowed value of 250 pixels. If you specify a value that's out of range, then the thumbnail snaps to the closest valid value.
width
Specifies the width of the thumbnail in pixels, ranging from 16 pixels to 600 pixels. If you don't specify a width, then the width defaults to the maximum allowed value of 600 pixels. If you specify a value that's out of range, then the thumbnail snaps to the closest valid value.
pitch
Specifies the angle of the camera along the vertical axis. Valid values are in the range -90 to 90 (inclusive). The default value is 0.
yaw
Specifies the direction of the camera along the horizontal axis. Valid values are in the range -360 to 360 (inclusive). The default value s 0.
fov
Specifies the horizontal field of view, expressed in degrees, with a maximum value of 120. When dealing with a fixed-size viewport, as with a Street View image of a set size, field of view represents zoom; where smaller values specify a higher level of zoom. The default value is 90.

Street View image tiles

Once you have a panoId, you can request a Street View image tile. Tile requests are HTTPS GET requests. Consider the following example.

curl "https://tile.googleapis.com/v1/streetview/tiles/z/x/y?session=YOUR_SESSION_TOKEN&key=YOUR_API_KEY&panoId=panoId"

In this code example, z is the zoom level, and x and y are the tile coordinates of the Street View tile that you want. Zoom levels in Street View panoramas must be in the range [0,5], with 0 representing the widest field of view.

Zoom Level Approximate Field of View
0 360°
1 180°
2 90°
3 45°
4 22.5°
5 11.25°

Street View Tiles responses

A successful Street View tile request returns an image of the format and size that you specified in your createSession response.

The result of a successful Tile request

At zoom level zero, the entire panorama is resized into a tile of dimensions tileWidth by tileHeight. Because panoramas are larger in the x dimension, the tile will contain empty space in the y dimension:

Zoom level zero

At zoom level five, the full-size panorama is used and divided into tiles.

You must display copyright information with every Street View panorama. The string to display can vary between panoramas. To get the copyright information, you must request Street View metadata, and then you can refer to the response's copyright field. For more information, see Data attributions.