To identify whether a Panoramic View is available for a specific location.
for example, lets assume that you have this parameters to request StreetView Image or Panorama:
https://maps.googleapis.com/maps/api/streetview?size=400x800&location=-6.2898696,106.7709091 &fov=90&heading=90&pitch=0 &key=[YOUR_API_KEY]
Paste to your browser for test and you will get an Image of Streetview.
A Street View image metadata request is an HTTP URL of the following form:
https://maps.googleapis.com/maps/api/streetview/metadata?parameters
so you have to little bit edit your parameters above to:
https://maps.googleapis.com/maps/api/streetview/metadata?size=400x800&location=-6.2898696,106.7709091 &fov=90&heading=90&pitch=0 &key=[YOUR_API_KEY]
Paste it again to your browser then you will get this response:
{
"copyright" : "© Google, Inc.",
"date" : "2017-09",
"location" : {
"lat" : -6.289908952742929,
"lng" : 106.7709156700797
},
"pano_id" : "6Q2SZz9GDC7X3_EWjjs96g",
"status" : "OK"
}
Don't forget to replace [YOUR_API_KEY] with yours.