Given a valid address or videoID, the
[`lookupVideoMetadata`](https://developers.google.com/maps/documentation/aerial-view/reference/rest/v1/videos/lookupVideoMetadata.md.txt)
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](https://developers.google.com/maps/url-encoding.md.txt) US postal
address or a
[`videoId`](https://developers.google.com/maps/documentation/aerial-view/reference/rest/v1/VideoMetadata.md.txt).

```json
curl -X GET "https://aerialview.googleapis.com/v1/videos:lookupVideoMetadata?X-Goog-Api-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.

```json
curl -X GET "https://aerialview.googleapis.com/v1/videos:lookupVideoMetadata?X-Goog-Api-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.

```json
{
  "videoId": "Ul1naoFmqo69U1zUVrQRkc",
  "captureDate": {
    "year": 2022,
    "month": 4,
    "day": 1
  },
  "duration": "40s",
  "state": "ACTIVE"
}
```

### Video is rendering

The video is rendering.

```json
{
  "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](https://developers.google.com/maps/documentation/aerial-view/overview#coverage_areas), you can use
[`renderVideo`](https://developers.google.com/maps/documentation/aerial-view/reference/rest/v1/videos/renderVideo.md.txt)
to initiate a render request.

```json
{
  "error": {
    "code": 404,
    "message": "Video not found.",
    "status": "NOT_FOUND"
  }
}
```