Given a valid address or videoID, the
lookupVideoMetadata
method returns metadata associated with a given video. The metadata in the
response body lets you determine the freshness of the imagery, length of the
video, and also provides a free workflow for confirming the existence of videos.
How to use the API
Call this endpoint by passing it a URL-encoded US postal
address or a
videoId
.
curl -X GET "https://aerialview.googleapis.com/v1/videos:lookupVideoMetadata?key=YOUR_API_KEY&address=POSTAL_ADDRESS "
The API then returns one of the following two responses:
- If the video exists,
lookupVideoMetadata
returns the video's metadata. - If the video doesn't exist, the API returns a 404 error code.
Example request
The following code sample requests an aerial view video for the Transamerica Pyramid, located at 600 Montgomery St, San Francisco, CA 94111.
curl -X GET "https://aerialview.googleapis.com/v1/videos:lookupVideoMetadata?key=YOUR_API_KEY&address=600%20Montgomery%20St%2C%20San%20Francisco%2C%20CA%2094111"
Example response
The following JSON examples demonstrate all possible responses to the
lookupVideoMetadata
request.
Video found
The video has already been rendered.
{
"videoId": "Ul1naoFmqo69U1zUVrQRkc",
"captureDate": {
"year": 2022,
"month": 4,
"day": 1
},
"duration": "40s",
"state": "ACTIVE"
}
Video is rendering
The video is rendering.
{
"videoId": "Ul1naoFmqo69U1zUVrQRkc",
"state": "PROCESSING"
}
Video not found
The video isn't in Google's database. This could be because it either hasn't yet been rendered, or because the location is in an area that isn't supported.
If the location is in a supported
area, you can use
renderVideo
to initiate a render request.
{
"error": {
"code": 404,
"message": "Video not found.",
"status": "NOT_FOUND"
}
}