AI-generated Key Takeaways
-
The Aerial View API offers two workflows: one for retrieving existing videos and another for generating new ones.
-
To determine if a video exists for a location, utilize the
lookupVideoMetadata
function. -
If a video doesn't exist, initiate video generation using the
renderVideo
function and monitor its status withlookupVideoMetadata
until it becomes active. -
Once the video is active, retrieve its URLs via the
lookupVideo
function for access and use. -
Aerial View API video IDs can be stored for future use, unlike other Google Maps Platform content.
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
lookupVideoMetadata
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
lookupVideoMetadata
. - If no video exists (
lookupVideoMetadata
returned a 404), callrenderVideo
to generate a new video.- Call
lookupVideoMetadata
using thevideoId
or address to poll the endpoint until the video's state isACTIVE
. Rendering can take several hours, so use exponential backoff to space out your calls.
- Call
If the video is active (
lookupVideoMetadata
returned a state ofACTIVE
), calllookupVideo
to 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.