The Aerial View API supports two general workflows. Your approach depends on
whether the video you're requesting exists or not. If you're unsure whether the
video exists, you should use
to determine the video's state.
Workflow to generate or retrieve videos
Use the following workflow to generate or retrieve an aerial view video:
- Check if Google has already generated a video for the location using
- If no video exists (
lookupVideoMetadatareturned a 404), call
renderVideoto generate a new video.
videoIdor address to poll the endpoint until the video's state is
ACTIVE. Rendering can take several hours, so use exponential backoff to space out your calls.
If the video is active (
lookupVideoMetadatareturned a state of
lookupVideoto fetch the video's URIs.
This workflow is represented in the diagram below:
Save video IDs for later use
Subject to the Service Specific Terms for Aerial View API, Aerial View API video IDs are exempt from the caching restrictions stated in Section 3.2.3(b)(No Caching) of the Google Maps Platform Terms of Service. You can therefore store video ID values for later use.