The Street View Static API returns a static (non-interactive) Street View panorama or thumbnail image from a standard HTTP URL request, with the viewport set by URL parameters, so you can embed it in a web page without JavaScript. A metadata endpoint reports whether imagery exists at a location and returns the panorama ID, coordinates, date, and copyright.
Street View Static API: key facts
- Product: Street View Static API
- Also known as: Street View API
- Category: Maps
- Platform: Web service (REST)
- Runs on: Server (backend code)
- Launch stage: GA
- Lifecycle: Active
- Overview: Street View Static API overview
- Regional availability: Limited. Available only where Google Maps Street View imagery exists (same coverage as the Google Maps app). Send a
/maps/api/streetview/metadatarequest to check a location.
Street View Static API: when to use it
Use Street View Static API when:
- You need a static Street View image or thumbnail in a web page, requested with an HTTP URL and no JavaScript.
- You need to set the camera heading, pitch, and field of view for a fixed-size Street View image.
- You need to check whether Street View imagery exists at a location, or get its panorama ID, date, and copyright, before showing an image.
Don't use Street View Static API when:
- You need an interactive Street View panorama that users can pan and zoom in a web page. Use Maps JavaScript API instead.
- You need an interactive Street View panorama in an iframe without writing JavaScript. Use Maps Embed API instead.
- You need Street View tiles to stitch in your own panorama viewer, or panorama IDs for up to 100 locations in one request (such as along a route). Use Map Tiles API instead.
Street View Static API: setup
- Service to enable:
street-view-image-backend.googleapis.com - Authentication: API key
- Get started: Set up Street View Static API
- Reference: Street View Static API reference
- Pricing: Street View Static API usage and billing
- Policies: Street View Static API policies
Street View Static API: common mistakes
- Problem: When no imagery exists at the location, the API returns a generic gray 'Sorry, we have no imagery here.' image instead of an error, so the failure is silent. Fix: Set
return_error_code=trueto get a 404NOT FOUNDinstead, or send a metadata request first to check imagery availability. See /maps/documentation/streetview/request-streetview. - Problem: Panorama IDs can change or be deleted over time; a stored
panovalue can returnZERO_RESULTSor snap to a different panorama. Fix: Store the original address or latitude/longitude instead of the pano ID, and search again by location to refresh the panorama ID. See /maps/documentation/streetview/request-streetview. - Problem: The
locationparameter snaps to the closest panorama (lat/lng searches a 50 m radius by default), and an address or place ID can use a different camera location, so the returned image may not be the exact spot requested. Fix: Use theradiusparameter to control the search area, and usesource=outdoorto exclude indoor collections if needed. See /maps/documentation/streetview/request-streetview. - Problem: Depending on your usage, a digital signature (
signature) can be required in addition to an API key; unsigned requests have limited quotas and might fail. Fix: Sign requests server-side with your project's URL signing secret (signatureparameter), and limit unsigned requests per day on the Quotas page. See /maps/documentation/streetview/digital-signature. - Problem: Image URLs are usually embedded in browser
imgtags, so the end user's browser calls the API and exposes the API key in HTML; IP address key restrictions reject browser traffic, and client-side signing exposes your signing secret. Fix: Apply website (HTTP referrer) and API restrictions to keys used in web pages, and generate signed URLs (signature) on your server. See /maps/api-security-best-practices#protect-static-web-api-usage.
What you can do with Street View Static API
See the guides linked below for each task, or compare across products in the Capabilities Explorer.
- Return a URL of a static Google Street View image.
- Customize the point of view for a static Google Street View image.